I've been trying to build a unit test project with robotium, but running it keeps failing with an error.
ComponentInfo{com.ha.team.test/android.test.InstrumentationTestRunner} Empty test suite.
I've found a lot of links with this issue, but none seam to help. Why is the Android test runner reporting "Empty test suite"? Unable to get Robotium to work in Android Studio
I've stated in my gradle file :
sourceSets { main { java.srcDirs = ['src/main/java', 'src/androidTest/java'] } }
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.jayway.android.robotium:robotium-solo:5.4.1'
}
My test class :
public class ExampleTest extends ActivityInstrumentationTestCase2<MainCardActivity> {
private Solo solo;
public ExampleTest() {
super(MainCardActivity.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
solo = new Solo(getInstrumentation(), getActivity());
}
@Override
protected void tearDown() throws Exception {
try {
solo.finalize();
} catch (Throwable e) {
e.printStackTrace();
}
getActivity().finish();
super.tearDown();
}
@SmallTest
public void test_login() {
assertEquals(true, true);
}
}
i have a package for the application : com.ha.team and i've placed a test project under : src->androidTest->java->com.ha.team.test package.
Under run / debug configurations i'm running the project as android Test on the project's module with my test class : com.ha.team.test.ExampleTest
As i said, i've covered a lot of whats out there, but didn't find anything to help me with this issue. Thanks in advanced