I have created a "UiAutometerTest" class as follow to verify my UiAutomator API.
public class UiAutometerTest extends InstrumentationTestCase{
private UiDevice device;
@Override
protected void setUp() throws Exception {
super.setUp();
device = UiDevice.getInstance(getInstrumentation());
device.pressHome();
// Wait for the Apps icon to show up on the screen
device.wait(Until.hasObject(By.desc("Apps")), 3000);
UiObject2 appsButton = device.findObject(By.desc("Apps"));
appsButton.click();
// Wait for the ResMed icon to show up on the screen
device.wait(Until.hasObject(By.text("My Application")), 3000);
UiObject2 SplusApp = device.findObject(By.text("My Application"));
SplusApp.click();
assertTrue(true);
}
}
On Test Run, I am getting following exception
Running tests Test running started junit.framework.AssertionFailedError: No tests found in com.example.ajitp.myapplication.UiAutometerTest at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1889)
Finish
Thanks in advance