1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Adds espresso testing for add_to_app/android_fullscreen (#323)

This commit is contained in:
Andrew Brogdon
2020-03-12 20:12:24 -07:00
committed by GitHub
parent bff4d459f7
commit face0f564a
18 changed files with 294 additions and 97 deletions

View File

@@ -53,4 +53,28 @@ do
popd
done
# If the credentials don't exist, this script isn't being run from within the
# flutter/samples repo. Rather than throw an error, allow the test to pass
# successfully.
if [ ! -f "svc-keyfile.json" ]
then
echo "Keyfile for Firebase Test Lab not found. Skipping integration tests."
exit 0
fi
# At this time, espresso tests only exist for android_fullscreen. These will
# eventually be rolled out to each Android project and included in the loop
# above.
echo "== Espresso testing 'android_fullscreen' on Flutter's ${FLUTTER_VERSION} channel =="
pushd "add_to_app/android_fullscreen"
./gradlew app:assembleAndroidTest
./gradlew app:assembleDebug -Ptarget=../flutter_module/test_driver/example.dart
gcloud auth activate-service-account --key-file=../../svc-keyfile.json
gcloud --quiet config set project test-lab-project-ccbec
gcloud firebase test android run --type instrumentation \
--app app/build/outputs/apk/debug/app-debug.apk \
--test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk\
--timeout 5m
popd
echo "-- Success --"