我正在使用带有标志的gcloud firebase test android run命令运行我的测试,--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'
}
但是,当使用上面提到的命令和标志在 Firebase 测试实验室中运行测试时,此参数设置为false
. 有没有办法将此参数设置为true
?