有没有办法在启用了Android Test Orchestrator 的情况下从 Android Studio 在 Firebase 测试实验室中运行仪器测试?
在我的build.gradle 我有所有必需的陈述:
android {
defaultConfig {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments clearPackageData: 'true'
}
testOptions {
execution 'ANDROID_TEST_ORCHESTRATOR'
}
}
dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestUtil 'com.android.support.test:orchestrator:1.0.2'
}
Run Code Online (Sandbox Code Playgroud)
当我在自己的物理设备上运行测试时,Orchestrator 正在运行。
我能够在 Android Studio 中创建运行/调试配置以在 Firebase 测试实验室中运行测试,并且它们运行成功,但没有 Orchestrator。是否有一个选项可以在 Android Studio 中启用 Orchestrator,以便它也可以在 Firebase 运行中运行?
android android-testing firebase android-studio firebase-test-lab
我正在运行我的测试使用gcloud firebase测试android运行命令带--use-orchestrator标志来启用Android Test Orchestrator.有一个Orchestrator参数clearPackageData可以清除应用程序在测试之间的状态,我可以在我自己的设备上运行Android Studio测试时使用它:
android {
defaultConfig {
...
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// The following argument makes the Android Test Orchestrator run its
// "pm clear" command after each test invocation. This command ensures
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'
}
testOptions {
execution 'ANDROID_TEST_ORCHESTRATOR'
}
}
dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestUtil 'com.android.support.test:orchestrator:1.0.2'
}
Run Code Online (Sandbox Code Playgroud)
但是,当使用上面提到的命令和标志在Firebase测试实验室中运行测试时,此参数设置为false.有没有办法设置这个参数true?