I started using JakeWharton's DoubleExpresso library and I was able to set it up as per instructions but unfortunately it's not able to find test cases.
My gradle config looks like this:
androidTestCompile('com.jakewharton.espresso:espresso:1.1-r2') {
exclude group:'com.google.guava', module:'guava'
}
androidTestCompile('com.jakewharton.espresso:espresso-support-v4:1.1-r2') {
exclude group:'com.android.support', module:'support-v4'
exclude group:'com.google.guava', module:'guava'
}
And my test case looks like this (src/androidTest/NavigationTest.java)
public class NavigationTest extends ActivityInstrumentationTestCase2<MainActivity> {
public NavigationTest() {
super(MainActivity.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@SmallTest
public void testAddition() {
assertEquals(1 + 1, 2);
}
}
Any ideas why this test case is not being caught by Expresso?
Update: It works perfectly if I run it on command line, seems like this happens only on Android Studio.