我正在尝试在 Android 上运行仪器测试(或 Espresso 测试)。我从 Android Studio 和控制台得到的错误是:
Tests on Nexus_5X_API_23_2(AVD) - 6.0 failed: Unable to find instrumentation info for:
ComponentInfo{com.android.example.country1.demo.debug.test/android.support.test.runner.AndroidJUnitRunner}
com.android.builder.testing.ConnectedDevice > No tests found.[Nexus_5X_API_23_2(AVD) - 6.0] FAILED
No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don't inherit from TestCase or lack @Test annotations).
Run Code Online (Sandbox Code Playgroud)
这是我的 build.gradle:
buildscript {
repositories {
jcenter()
}
}
apply plugin: 'com.android.application'
android {
signingConfigs {
release
}
compileSdkVersion 23
buildToolsVersion '24.0.0rc3' …Run Code Online (Sandbox Code Playgroud)