Skip to content

Instantly share code, notes, and snippets.

@Aidan128
Last active December 9, 2021 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aidan128/5e2d31dae91632b1284b050389753928 to your computer and use it in GitHub Desktop.
Save Aidan128/5e2d31dae91632b1284b050389753928 to your computer and use it in GitHub Desktop.
build.gradle
android {
...
defaultConfig {
...
// 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 'ANDROIDX_TEST_ORCHESTRATOR'
}
}
dependencies {
...
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestUtil 'androidx.test:orchestrator:1.4.0'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment