Created
April 30, 2018 17:17
-
-
Save markcerqueira/e4942b8dfd0afdf91038a26511cc4615 to your computer and use it in GitHub Desktop.
Script to build and run UI testing for Android using Spoon runner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uninstall existing APKs and install our app APK and test APK | |
./gradlew uninstallAll installDebug installDebugAndroidTest | |
# List all APKs installed with adb shell 'pm list packages -f' | |
# Grant the app APK write and read to external storage permissions | |
adb shell pm grant gg.mark.debug android.permission.WRITE_EXTERNAL_STORAGE | |
adb shell pm grant gg.mark.debug android.permission.READ_EXTERNAL_STORAGE | |
export APK=build/outputs/apk/debug/debug.apk | |
export TEST_APK=build/outputs/apk/androidTest/debug/debug-androidTest.apk | |
# TEST_APK and APK are positional arguments that need to be in the order specified here | |
# Disable GIF generation because it's slow | |
java -jar spoon-runner-2.0.0-20180425-all.jar --debug --disable-gif "$TEST_APK" "$APK" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment