Skip to content

Commit

Permalink
add android test orchestrator
Browse files Browse the repository at this point in the history
  • Loading branch information
Elise Alix committed May 24, 2023
1 parent 8278d92 commit 40e002a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,15 @@ android {
versionName "1.0.0"
// For Espresso
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
testInstrumentationRunnerArguments useTestStorageService: 'true'
testInstrumentationRunnerArgument('useTestStorageService', 'true')
// 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.
testInstrumentationRunnerArgument('clearPackageData', 'true')
}

testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
managedDevices {
devices {
// run with ../gradlew nexusOneApi30DebugAndroidTest
Expand Down Expand Up @@ -264,6 +269,7 @@ dependencies {
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation "androidx.test.ext:junit-ktx:1.1.5"
androidTestUtil "androidx.test.services:test-services:1.4.2"
androidTestUtil 'androidx.test:orchestrator:1.4.2'
}

apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
Expand Down

0 comments on commit 40e002a

Please sign in to comment.