Fla*_*h99 10 android android-testing android-espresso androidx androidx-test
我最近迁移了我的项目以使用AndroidX,并使用以下文档在gradle上为我的espresso测试配置了测试编排器:
https://developer.android.com/training/testing/junit-runner#using-android-test-orchestrator
我有依赖:
androidTestUtil 'androidx.test:orchestrator:1.1.0-beta01'
Run Code Online (Sandbox Code Playgroud)
但是,我没有执行任何测试,看起来他们在运行gradle时失败运行以下adb shell命令,即:
adb shell 'CLASSPATH=$(pm path android.support.test.services) app_process / \
android.support.test.services.shellexecutor.ShellMain am instrument -w -e \
targetInstrumentation com.example.test/androidx.test.runner.AndroidJUnitRunner \
android.support.test.orchestrator/.AndroidTestOrchestrator'
Run Code Online (Sandbox Code Playgroud)
从上面看:似乎它试图用android支持版本而不是androidx版本执行此命令.
似乎没有记录什么用于androidx.
Fla*_*h99 18
纯粹通过猜测,我在gradle配置中更改了以下内容
从:
testOptions {
execution 'ANDROID_TEST_ORCHESTRATOR'
}
Run Code Online (Sandbox Code Playgroud)
至
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
Run Code Online (Sandbox Code Playgroud)
一切似乎都有效.
| 归档时间: |
|
| 查看次数: |
2284 次 |
| 最近记录: |