Test apps on Android Part of Android Jetpack.
Testing your app is an integral part of the app development process. By running tests against your app consistently, you can verify your app's correctness, functional behavior, and usability before you release it publicly.
Testing also offers the following advantages:
- Rapid feedback on failures.
- Early failure detection in the development cycle.
- Safer code refactoring, allowing you to optimize code without worrying about regressions.
- Stable development velocity, helping you minimize technical debt.
Documentation
The documentation covers best practices around testing Android apps:
- Fundamentals of testing Android apps
- Build local unit tests that run on the host
- Build instrumented tests that run on devices or emulators
- Verify UIs with Behavior and Screenshot tests
- Test different screen sizes
Additional resources
For more information about testing on Android, consult the following resources.
Samples
- Android testing samples
- Now In Android demo app, which makes use of the Android testing libraries.
Codelabs
Media
Test smarter, not harder: new testing strategies documentation
We work closely with many teams and one thing they all have in common is a justified growing focus on automated testing. More features, more form factors, and more supported Android releases make tests increasingly important. These guides don’t focus
Testing Wear OS fitness apps without breaking a sweat
Compared to phone apps, developing high quality health and fitness experience for Wear — and especially performing manual QA — can be a bit tricky. Capabilities vary between devices, and running (or swimming!) over and over to test a user journey is
Android vitals on Google Play Console
Welcome to the Game Quality series. We will walk you through the tools & techniques you can use to understand, troubleshoot and then improve your app quality. The first tool we want to share in this video is a Google effort to help you monitor
Write better tests with the new testing guidance
As apps increase in functionality and complexity, manually testing them to verify behavior becomes tedious, expensive, or impossible. Modern apps, even simple ones, require you to verify an ever-growing list of test points such as UI flows,
What's New in Scalable Automated Testing
We know it can be challenging to run Android instrumented tests at scale, especially when you have a big test suite that you want to run against a variety of Android device profiles. At I/O 2021 we first introduced Unified Test Platform or UTP. UTP
Now in Android: 40 - Google I/O 2021, Jetpack Compose, Android 12 beta, and more!
Welcome back to Now in Android, your ongoing guide to what’s new and notable in the world of Android development. In this episode, Manuel Vivo and Dan Galpin cover updates on Jetpack Compose, Android 12 and privacy, tooling, Kotlin, large screens,
What's new in Android testing tools
Testing is a critical component within the development lifecycle—it helps build confidence in your product and leads to a higher quality experience for your users. We discuss what we're doing to help make testing for Android more reliable, scalable,
Running tests in your games more efficiently, feat. SuperScale & Traplight (Playtime 2019 - Games)
It is hard to prioritize which tests to perform, results might be confusing and actions are often postponed or never implemented. In this session top developers their experience with testing, their methodology, how they prioritize a pipeline of tests
Optimizing your A/B testing roadmap, feat. Duolingo, Dailymotion & Monzo (Playtime 2019 - Apps)
Top partners share how they ensure their efforts are bringing actionable results and avoid the "spaghetti testing" approach - throwing it against the wall and seeing if it sticks. Speakers: Vesna Doknic - Partner Development Manager, Google
dumpsys
A tool that runs on the device and provides information about the status of system services.
Android Developer Story: Rayark improves game quality and conversion rate with Google Play Console
Learn how Ming-Yang Yu, CEO at Rayark - a chinese game developer, has worked with their team to improve their game quality and conversion rates using Google Play Console. Hear how they used testing to reduce crash rates and Android vitals to improve
Verifying your Google Assistant media action integrations on Android
The Media Controller Test (MCT) app is a powerful tool that allows you to test the intricacies of media playback on Android, and it's just gotten even more useful. Media experiences including voice interactions via the Google Assistant on Android
Frictionless Android testing: write once, run everywhere (Google I/O '18)
This session showcases the AndroidX Test libraries, which allows you to write tests of all sizes across different execution environments.
Manage your CEO: How to avoid opinion-based product prioritization (Apps track - Playtime EMEA 2017)
In a competitive marketplace, developers that adopt a long-term approach of continuous improvement in app quality, content, and value win. Regardless of the platform, data is at the core of their decision making process - does a new feature launch,
Test-Driven Development on Android with the Android Testing Support Library (Google I/O '17)
Learn how to use the official testing library for Android. This technical deep dive into the library showcases some of the newest features that make it even easier for you to write high-quality Android apps.
Create UI tests with Espresso Test Recorder
Learn how to use the Espresso Test Recorder in Android Studio 2.3 to add UI test to your app. Whether you’re just learning the Espresso framework or you want to create a base for your UI test suite quickly, the Test Recorder is a great tool that will
Tips from developers Peak and Soundcloud on how to grow your startup on Google Play
At Playtime 2016, Google Play's series of developer events, we met with top app and game developers from around the world to share learnings on how to build successful businesses on Google Play. Several startups, including game developer Peaklabs and
Test on Android 7.1 Developer Preview in Firebase Test Lab
To deliver the best user experience right out of the gate, Firebase Test Lab for Android allows you to test your apps and ensure their compatibility with multiple device configurations, across OS versions, screen orientations, and locales. With a
Android Developer Story: Hutch improves player engagement with beta testing
Hutch is a London based mobile studio focusing entirely on racing games, with more than 10 million players on Google Play. Learn how they improved game design and user engagement with beta testing, by providing more informed data to make the best
Idling Resource - Android Testing Patterns #4
Learn up-to-date Android testing practices by checking out the new testing course material: Advanced Android in Kotlin Testing codelab course, lesson 3 - https://goo.gle/2SJfV8A Advanced Android in Kotlin video course (Testing Lessons) -
AdapterViews and Espresso - Android Testing Patterns #3
Learn up-to-date Android testing practices by checking out the new testing course material: Advanced Android in Kotlin Testing codelab course, lesson 2 - https://goo.gle/37N3Pzk Advanced Android in Kotlin video course (Testing Lessons) -
UI testing with Espresso - Android Testing Patterns #2
Learn up-to-date Android testing practices by checking out the new testing course material: Advanced Android in Kotlin Testing codelab course, lesson 2 - https://goo.gle/37N3Pzk Advanced Android in Kotlin video course (Testing Lessons) -
Video: Android Testing Patterns
Learn about the two main types of tests that you should write for your app: unit tests and instrumented tests.
Advanced Espresso - Google I/O 2016
Automated UI testing is not an easy matter. With Espresso, a UI testing framework for Android, we are helping developers raise the bar for app quality. Come to this talk to learn how we're improving Espresso to make handling complex testing scenarios
Android Testing (Android Dev Summit 2015)
Writing automated software tests should be a fundamental part of your app development strategy. Writing tests helps you to quickly catch and fix software regressions introduced by code changes to your app. In this talk, Stephan Linzner, Jose
10 ways to improve your app’s rating
A good app rating is a key to encouraging users to install your app. In this video you’ll find 10 tips you can use to help improve your apps’ rating: 0:14 — Use the Android creative vision to guide your app design:
10 tips to master the Google Play Console
From the Google Play Console, you publish your apps and games to the over 1 billion active Android users around the world. But it’s not just a publication tool, the Google Play Console is packed with features that can help grow your apps business. In
Testing your app for Android for Work
Testing is important whether you’re building a dedicated app for the workplace, rolling out new features, or making it easy for IT departments to deploy. Test DPC is now available for you and is a fully featured, open-source, sample Device Policy
Advanced Android Espresso (Big Android BBQ 2015)
Do you test? It’s okay if you don’t - historically the tools had not been stellar. But they have gotten much better, and I am going to show you my favorite, instrumentation testing with Espresso. In this talk you will learn: * The basic structure of
Iterate faster on Google Play with improved beta testing
Today, Google Play is making it easier for you to manage beta tests and get your users to join them. Since we launched beta testing two years ago, developers have told us that it’s become a critical part of their workflow in testing ideas, gathering