title: RunTimeException in UIAutomator Testing In Android
body: <p>Actually I am new to UIautomator testing. I have made a class which has to be tested. Can any one please tell me some steps how can I make my UIAutomator testcase class? I have got some errors like...</p>
  
  <pre><code>java.lang.RuntimeException: Exception during suite construction
  at 
  
  android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests.testSuiteConstructionFailed(TestSuiteBuilder.java:238)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
  at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1661)
  Caused by: java.lang.reflect.InvocationTargetException
  at java.lang.reflect.Constructor.constructNative(Native Method)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
  at android.test.suitebuilder.TestMethod.instantiateTest(TestMethod.java:87)
  at android.test.suitebuilder.TestMethod.createTest(TestMethod.java:73)
  at android.test.suitebuilder.TestSuiteBuilder.addTest(TestSuiteBuilder.java:262)
  at android.test.suitebuilder.TestSuiteBuilder.build(TestSuiteBuilder.java:184)
  at android.test.InstrumentationTestRunner.onCreate(InstrumentationTestRunner.java:379)
  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4382)
  at android.app.ActivityThread.access$1300(ActivityThread.java:141)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:137)
  at android.app.ActivityThread.main(ActivityThread.java:5041)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
  at dalvik.system.NativeStart.main(Native Method)
  Caused by: java.lang.RuntimeException: Stub!
  at com.android.uiautomator.testrunner.UiAutomatorTestCase.&lt;init&gt;(UiAutomatorTestCase.java:5)
  at com.example.automatorapp.test.Test2.&lt;init&gt;(Test2.java:11)
  ... 18 more
  </code></pre>
  
  <p>and my code is...</p>
  
  <pre><code>     package com.example.automatorapp.test;
  
      import com.android.uiautomator.core.UiObjectNotFoundException;
      import com.android.uiautomator.testrunner.UiAutomatorTestCase;
  
  public class Test2 extends UiAutomatorTestCase 
  {
  
      public Test2()
      {
      super();
      }
  
      public void testDemo() throws UiObjectNotFoundException
      {
  
          getUiDevice().pressHome();
  
      }
  
  
  }
  </code></pre>
  
  <p>plz some one help me??</p>