gpt4 book ai didi

安卓测试 : No tests found

转载 作者:行者123 更新时间:2023-12-04 23:38:28 31 4
gpt4 key购买 nike

Starting 0 tests on test(AVD) - 10
Tests on test(AVD) - 10 failed: Instrumentation run failed due to 'Process crashed.'

com.android.build.gradle.internal.testing.ConnectedDevice > No tests found.[test(AVD) - 10] 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).
所以我在我的 CI 上运行测试,这个错误随机弹出,有时它会找到 2 个测试并运行它。但大多数时候我得到这个。

最佳答案

对我来说,这发生在仪器测试的测试运行器错误时。我变了

android {
// ...
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
// ...
}
android {
// ...
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
// ...
}
请注意,我使用了 KTS (build.gradle.kts),但这对问题没有影响,只是语法略有不同。

关于安卓测试 : No tests found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65949416/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com