每当我尝试创建覆盖率报告时,我都会收到此错误:
Instrumentation run failed due to 'Process crashed.'
com.android.builder.testing.ConnectedDevice > No tests found.[Pixel 2 - 8.1.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).
我修改了一个样本仓库以重现问题: https://github.com/suarezjulian/unified-code-coverage-android
只需下载并执行:
./gradlew jacocoTestReport
答案 0 :(得分:4)
您正在运行Test Orchestrator版本1.0.2,请尝试将版本降低到1.0.1。我也遇到了麻烦,也许1.0.2在Jacoco上表现不佳。