JUnit4 - AssertionFailedError: No tests found
I found the problem.It was missed code in build.gradle
in the main module.If you have this problem I advise to start with adding this line:
android { ... defaultConfig { ... testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' }...}
android { defaultConfig { testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' }}dependencies { androidTestImplementation "androidx.test:runner:1.4.0" androidTestImplementation "androidx.test.ext:junit:1.1.3"}
@RunWith(AndroidJUnit4::class)class SomeInstrumentedTest {}