使用ANDROIDX_TEST_ORCHESTRATOR时未找到测试

the_prole

当我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_ORCHESTRATORtestOptions

testOptions {
    unitTests.includeAndroidResources = true
    animationsDisabled = true
    // execution 'ANDROIDX_TEST_ORCHESTRATOR'
}

测试运行。

那么我如何才能运行测试ANDROIDX_TEST_ORCHESTRATOR呢?

编辑

我取得了一些进展:androidTests在我的真实设备(API 28)上运行,但没有任何模拟器(API 28)。我在OSX上。

bruno_eiterer

这似乎是ANDROIDX_TEST_ORCHESTRATOR版本1.2.0或更旧的错误

受撞击的版本,我把它拿到工作1.3.0-rc01dependenciesbuild.gradle文件。

androidTestUtil 'androidx.test:orchestrator:1.3.0-rc01'

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章