How to run Firebase test lab automation tests on Android release builds
Tutorial shows how to run Espresso automation test on release builds.
By default Android projects are configured to run on debug builds, to be able to run the tests on release builds we need to add a configuration to our build.gradle file. Add below snippet to your Android project.
- Using Android Studio change the build type to “Release”.
- Inside the file build.gradle add ```testBuildType ‘release’ ```
3. The above change will add the dir folder ```code/AndroidTest ``` to your release build path.
4. Clean and build.
5. Run tests.
6. The tests now run on the release build, and will generate the release test APKs:
app-release-androidTest.apk and app-release.apk (sign with release key)
7. Go to firebase Test lab. And upload the TestAPK and the Release APK.
8. Run tests. Happy testing :)
Thanks for spending your time reading it and let me know if I’m wrong somewhere or if there’s something that could do differently or better. I’m open to your feedback 🙌🏻
Learn how Firebase is strengthening integrations across Google's developer products and the open ecosystem of developer…