I'm running my tests using gcloud firebase test android run command with --use-orchestrator
flag to enable Android Test Orchestrator. There is an Orchestrator argument clearPackageData
to clear app's state between tests, which I'm able to use when run tests from Android Studio on my own device:
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'
}
However, when running tests in Firebase Test Lab with the command and the flag I mentioned above, this argument is set to false
. Is there a way to set this argument to true
?
Use this on the gcloud command line:
--environment-variables clearPackageData=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With