My Espresso tests were running until I had to support multidex.
My build.gradle, I have
minSdkVersion 14
targetSdkVersion 23
multiDexEnabled = true
testInstrumentationRunner "com.android.test.runner.MultiDexTestRunner"
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.1'
androidTestCompile 'com.android.support.test:runner:0.4.1'
androidTestCompile 'com.android.support.test:rules:0.4.1'
dexOptions {
jumboMode true
javaMaxHeapSize "4g"
incremental true
}
Test1AuthenticationEspressoTest
@RunWith(AndroidJUnit4.class)
@SmallTest
public class Test1AuthenticationEspressoTest {
@Rule
public ActivityTestRule<WelcomeActivity> mActivityRule = new ActivityTestRule(WelcomeActivity.class);
}
Here is the Error I get
junit.framework.AssertionFailedError: No tests found in com.livestrong.tracker.test.Test1AuthenticationEspressoTest
Any help will be appreciated. Any one has espresso working with multidex ?