I annotated my class like here
@RunWith(AndroidJUnit4.class)
public class WorkdayProviderTest
Futhermore, annotated also my test method like this
@Test
public void insert_dataInsertsCorrectly()
Finally, configured my build.gradle defaultConfig and dependencies like this
defaultConfig {
applicationId 'com.jueggs.workinghours'
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
androidTestCompile "junit:junit:4.12"
androidTestCompile "com.android.support:support-annotations:23.3.0"
androidTestCompile "com.android.support.test:runner:0.4.1"
androidTestCompile "com.android.support.test:rules:0.4.1"
androidTestCompile "com.android.support.test.espresso:espresso-core:2.2.1"
androidTestCompile "com.android.support.test.espresso:espresso-contrib:2.2.1"
androidTestCompile "org.hamcrest:hamcrest-library:1.3"
and configured the test run like this
and it´s telling me
No tests were found
Test running failed: Instrumentation run failed due to 'java.lang.ClassNotFoundException'
How to fix this issue?