lundi 23 février 2015

Android Studio Empty test suite

i have a problem adding tests to my android application. If i want to run my example-test the following error occurs:


Running tests Test running startedTest running failed: Unable to find instrumentation info for: ComponentInfo{xxx/android.test.InstrumentationTestRunner} Empty test suite.


My test class looks like this:



public class ExampleTest extends AndroidTestCase {

public void test() throws Exception {
final int expected = 1;
final int reality = 5;
assertEquals(expected, reality);
}


}


The strange thing is that it works all well in a different project which contains of just one module. In that small testing project the project structure doesnt matter. I tried everything. The Structure with src/androidTest/java/my.package.test worked as well as to put the test class directly somewhere into my real sources. There is also no need to specify an instrumentation runner in the run configuration or in the build.gradle.


But in my real Project it doesn't work at all. What else i can try?


Aucun commentaire:

Enregistrer un commentaire