当我ANDROIDX_TEST_ORCHESTRATOR
进来testOptions
testOptions {
unitTests.includeAndroidResources = true
animationsDisabled = true
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
然后我运行仪器化测试
./gradlew connectedStudioDebugAndroidTest --stacktrace
我收到未找到测试的错误
com.android.builder.testing.ConnectedDevice > No tests found.[emu1(AVD) - 9] 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).
当我注释掉ANDROIDX_TEST_ORCHESTRATOR
在testOptions
testOptions {
unitTests.includeAndroidResources = true
animationsDisabled = true
// execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
测试运行。
那么我如何才能运行测试ANDROIDX_TEST_ORCHESTRATOR
呢?
编辑
我取得了一些进展:androidTests在我的真实设备(API 28)上运行,但没有任何模拟器(API 28)。我在OSX上。
这似乎是ANDROIDX_TEST_ORCHESTRATOR
版本1.2.0
或更旧的错误。
受撞击的版本,我把它拿到工作1.3.0-rc01
在dependencies
中build.gradle
文件。
androidTestUtil 'androidx.test:orchestrator:1.3.0-rc01'
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句