Android App Testing: How It Differs and How to Build a Test Plan
Where to start with Android testing: build a plan around the crash and ANR rates Google Play grades per phone model, background limits and release tracks.
Google Play grades an Android app twice. Once across everyone who uses it, and once for each phone model they use it on. You can pass the first grade and fail the second, and Play may then show your app to fewer people on that phone.
A good Android test plan starts from that grade and works backward to the bugs that cause it. By the end you have a plan in three parts and a checklist to sign an Android release against.
What you’ll learn
- Which crash and ANR rates Google Play treats as bad behavior
- Where to start, and the order to build the plan in
- How to reproduce an ANR before a user does
- The adb commands that force Doze and App Standby
- What each Play release track can tell you before launch
Where Do You Start, and How Do You Create an Android Test Plan?
Android testing differs from a shared mobile checklist in three places, and each has an outside authority that decides whether you passed. Start with stability, because Google Play already publishes the numbers. Then add the background checks and the release path.
| Section | Who decides | What you test |
|---|---|---|
| Stability | Google Play, from user data, overall and per phone model | Crashes and freezes on the models your users carry |
| Background work | Android and the phone maker, from how the app is used | Jobs, alarms and messages while the phone is idle |
| Release path | Play Console, by track and version code | Which build a tester receives, and what Google checks first |
This guide is for an engineer or QA lead who already runs regression on every build and now has to sign off an Android release. Build the plan in this order:
- Rank your phones. Open Play Console and sort crash and ANR rate by phone model. That list is your device list (crash and ANR numbers).
- Add the background checks. Force Doze and App Standby with adb, then run one overnight test per phone maker your users carry (background work).
- Use the release path. Send the release candidate through a Play track, read the pre-launch report and roll out in stages (release tracks).
- Sign off. Run the Android-only checklist at the end, which turns each section into a pass line (checklist).
No vitals data yet? Start from the pre-launch report and your own analytics, and add the per-model view once Play has users to show.
Which Crash and ANR Numbers Does Google Play Grade?
Google Play grades user-perceived crashes and user-perceived ANRs. An ANR is “application not responding”, the freeze where Android offers to close the app. Each metric has an overall line and a per-model line, which Google calls bad behavior thresholds.
| Metric | Overall line | Per-model line |
|---|---|---|
| User-perceived crash rate | 1.09% of daily active users | 8% of daily active users on one model |
| User-perceived ANR rate | 0.47% of daily active users | 8% of daily active users on one model |
Reach the overall line and Google says your app is likely to be less discoverable on every device. Reach the per-model line and that applies on the affected models, where a warning may also show on your store listing. Google generally looks at the last 28 days and may act sooner on a spike.
A crash counts as user-perceived when the app is showing a screen or running a foreground service. For ANRs, Google currently counts one type only, input dispatching timed out. It fires when the app has not responded to a tap or key press within 5 seconds.
Why a Green Average Can Hide a Failing Phone
Take an invented app with 10,000 daily users. Every figure in this table is made up to show the arithmetic.
| Phone model | Daily users | Users who crashed | Crash rate |
|---|---|---|---|
| Model A | 4,000 | 16 | 0.40% |
| Model B | 3,000 | 15 | 0.50% |
| Model C | 2,700 | 16 | 0.59% |
| Model D | 300 | 30 | 10.00% |
| All models | 10,000 | 77 | 0.77% |
The app sits at 0.77%, under Google’s overall 1.09%. Model D is at 10%, past the 8% per-model line. Only 3% of users carry it, so the app stays under the overall line even with that model at 10%.
Divide one threshold by the other and you get a working rule. A model crashing at exactly 8%, with no crashes anywhere else, needs 13.6% of your users before it pushes the overall rate to 1.09%. A model with a smaller share can fail its own grade while the headline number stays green.
Size the device list from the per-model line:
- In Play Console, break crash rate and ANR rate down by device model.
- Sort by rate instead of popularity, among the models with enough users to show one.
- Test on your top models by users, plus any model past 4%. Half the line is our starting point, and Google publishes no such number.
- Split each model by Android version, because Google notes that one model can ship with different Android versions, RAM and chips.
Vitals has a limit too. It leaves out uncertified devices and any version not installed through Google Play, and it draws on users who opted in to sharing diagnostics. Your sideloaded QA build never appears there.
How to Reproduce an ANR Before Release
An input ANR needs two ingredients, a blocked main thread and a finger. A test that waits politely for the spinner can sit through a six-second freeze and pass, because nothing ever asked the app to respond. So tap while the app is busy.
- Find the blocking work. Turn on StrictMode in
Application.onCreate()for debug builds. It flags disk and network access on the main thread. - Make it slow. Use your weakest supported phone, a large account and a slow network.
- Interrupt it. During launch, login, search and checkout, tap and press Back before the screen settles.
- Pull the trace. Android stores one when it hits an ANR, and the commands are below.
// Debug builds only: log main-thread disk and network work
if (BuildConfig.DEBUG) {
StrictMode.setThreadPolicy(
StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork()
.penaltyLog()
.build()
)
}
# Emulator image without the Play Store, or a rooted phone
adb root
adb shell ls /data/anr
adb pull /data/anr/<filename>
# On a physical phone without root
adb bugreport
StrictMode sees only part of it. Google also lists long calculations, slow calls to another process, lock contention and deadlocks, and the trace is where you look for those.
How to Chase a Crash on One Model
Split the symptom first. Is it the model, or something the model happens to carry? Filter crash rate to that model in vitals, then compare Android versions inside it.
- One version holds the crashes: An emulator on that version may reproduce it.
- The crashes spread across versions: Get that phone, because the cause may live in the maker’s software or hardware.
Our comparison shows when an emulator is enough and when you need the phone. On Android 11 and above, read ApplicationExitInfo at the next launch. It records why the last exit happened, whether a crash, an ANR, low memory or the system stepping in.
How Do You Test Doze, App Standby and Battery Killers?
Force the state with adb, then check the app while it is idle and again after it wakes. Doze starts when a phone sits unplugged and still with its screen off. App Standby applies to one app its user has stopped opening.
Test Doze
Doze works like a building that locks at night and opens its doors for a few minutes every so often. Work queues outside until the next opening, which Google calls a maintenance window, and the openings get further apart as the night goes on.
# Run the app, leave it active, then force Doze
adb shell dumpsys deviceidle force-idle
# Check jobs, alarms and messages here, then exit
adb shell dumpsys deviceidle unforce
adb shell dumpsys battery reset
| Your app uses | What Doze does | What to check |
|---|---|---|
| WorkManager or JobScheduler | Holds jobs until a maintenance window | The job runs once after exit, and the data is current |
Standard alarms, including setExact() | Defers them to the next window | Nothing user-facing depends on the exact minute |
setAndAllowWhileIdle() and setExactAndAllowWhileIdle() | Lets them fire, at most once per nine minutes per app | Two reminders set close together both reach the user, the second possibly late |
setAlarmClock() | Fires normally | The alarm rings on time |
| Network and sync adapters | Suspends them | No crash, no lost write, one clean retry |
The middle column follows Google’s Doze documentation. The checks are ours. Messages follow their own rule. An FCM message type meant for user-visible notifications gets through Doze, while background sync messages may be delayed. Testing push notifications covers delivery layer by layer.
Test App Standby
# Tell the phone it is on battery, then force standby
adb shell dumpsys battery unplug
adb shell am set-inactive <packageName> true
# See the bucket: 10 active, 20 working set,
# 30 frequent, 40 rare, 45 restricted
adb shell am get-standby-bucket <packageName>
# Wake the app and confirm its state
adb shell am set-inactive <packageName> false
adb shell am get-inactive <packageName>
# Put the battery back to normal
adb shell dumpsys battery reset
Do not skip the first line. Android lifts its job limits while a phone charges, apart from the restricted bucket, and a phone on your USB cable is charging. Leave it plugged in and the test can pass for the wrong reason.
Android 9 introduced App Standby Buckets, and Google now lists five priority buckets. These are the top one and the bottom two.
| Bucket | Regular jobs | Alarms | Network |
|---|---|---|---|
| Active | Up to 20 minutes in any 60 on Android 16 and above | No limit | No restriction |
| Rare | Up to 10 minutes in any 24 hours | 1 per hour | Disabled |
| Restricted | Once a day, up to 10 minutes | 1 per day | Disabled |
Google calls these limits approximate and says they can change. The date worth testing is day eight. On Android 13 and above, an app without an exemption goes to restricted after 8 days without interaction. Days the phone spends switched off don’t count, so leave one install untouched on a phone that stays switched on, confirm the bucket, then open the app and see whether a returning user meets stale content or fresh.
Test Battery Killers on the Phones That Have Them
Google warns that every manufacturer might write its own bucketing, so run this one on physical phones. The open-source project Don’t Kill My App ranks makers by how hard they treat background work. Its list starts with Huawei, Xiaomi, OnePlus and Samsung. Treat that as a shortlist and let your analytics pick from it.
- Set up: One phone per maker your users carry, default battery settings, app installed from Play.
- Run: Schedule a job and a message for the morning, then leave the phone unplugged overnight with the screen off.
- Read: Did the job run, did the message arrive, and does the app open to current data?
Use Play Release Tracks as a Test Stage
Play Console has three testing tracks before production, and each one answers a different question. Three rules decide whether a tester has the build you think they have.
| Track | Who gets it | What it tells you |
|---|---|---|
| Internal | Up to 100 testers per app | Whether the Play-delivered build installs, updates and signs in. New bundles reach testers within minutes |
| Closed | Email lists, Google Groups or organizations you pick | How the build behaves with a wider set of people you chose |
| Open | Anyone who joins the program | How it behaves at volume, with your test version visible on Google Play |
- Internal testers get internal builds only. Someone who opts in to internal stops being eligible for closed and open tests until they opt out.
- The highest version code wins. Publish a higher code to production and your closed and open testers receive that one.
- Internal is lighter on review. Google says internal tests might not be subject to standard policy or security reviews, so a clean internal run tells you nothing about approval.
Write the version code into every bug report. It settles which build someone was holding.
What the Pre-Launch Report Catches and Misses
After an upload, Google can install your build on lab phones, crawl it for several minutes and report stability, compatibility, performance and accessibility issues. It depends on lab capacity, so confirm that one actually ran.
| What it gives you | Where it stops |
|---|---|
| Stack traces and screenshots from lab devices | Devices start at Android 9 and sit in the United States |
| A crawl that types, taps and swipes without a script | No purchases, so paid areas may stay unseen |
| Sign-in with test credentials or Sign in with Google | Credentials can’t be filled into a WebView login or OpenGL-drawn controls |
| A Robo script to steer the crawler through a journey | No support for apps that check for root access |
Roll Out in Stages
Then release the update with a staged rollout, which reaches a percentage of users and can be halted. Google offers it for updates and not for a first publish. Vitals updates daily, so give each step time to show a rate, and read the models before you read the total.
Let an Agent Run the Repeat Flows
Part of an Android release is inspecting the platform, with vitals, adb and Play Console. The rest is walking through the app the way a user does, on every release. That second part is what Pie runs.
Pie is an agentic testing platform that explores your app, generates tests for the flows it reaches, and runs your .apk on Android emulators. Real devices are available on demand. Pie looks at the screen the way you do, so there are no scripts to write and no locators to break. Point it at login, search, checkout and settings, and it runs those flows on a schedule you set or each time you upload a build, on the Android version you pick, across Android phones, tablets and a foldable emulator.
If your team prefers to write the scripts, Espresso versus Appium is the choice you face first, and mobile tests in CI/CD is the setup. Surprises still belong to people, in a timed manual testing session.
Run Your Repeat Flows on a Schedule You Set
Login, search and checkout, tested without a script to write.
The Android-Only Release Checklist
Run your shared mobile checklist first, since it already holds the target API level and page-size rules. Then run this one on the release candidate.
- No phone model has reached its per-model line for crashes or ANRs, and none is climbing toward it.
- The app is under both overall lines, with room to spare.
- StrictMode shows no new main-thread disk or network work.
- Launch, login, search and checkout were tapped while loading, on the weakest supported phone.
- Forced Doze was entered and exited, with jobs, alarms and messages checked on both sides.
- App Standby was forced with the battery set to unplugged.
- The app was opened after eight untouched days on a phone that stayed switched on, and the first screen was current. This is a standing check: run it once, and again when background sync changes.
- One overnight run passed on a physical phone from each maker your users carry.
- Testers installed from a Play track, and every bug names a version code.
- A pre-launch report ran for this bundle, and someone read it.
- A named person watches vitals by model at each rollout step.
Look for the Phone Your Average Hides
Open Play Console, break the crash rate down by device model and sort by rate. Start with the model closest to, or past, the 8% line, and make that phone your first test of the next release.
See Your Android Flows Tested
Bring one build and watch its main flows run from start to finish.