Blog / Android App Testing: How It Differs and How to Build a Test Plan
Guide

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.

SectionWho decidesWhat you test
StabilityGoogle Play, from user data, overall and per phone modelCrashes and freezes on the models your users carry
Background workAndroid and the phone maker, from how the app is usedJobs, alarms and messages while the phone is idle
Release pathPlay Console, by track and version codeWhich 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:

  1. 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).
  2. Add the background checks. Force Doze and App Standby with adb, then run one overnight test per phone maker your users carry (background work).
  3. Use the release path. Send the release candidate through a Play track, read the pre-launch report and roll out in stages (release tracks).
  4. 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.

MetricOverall linePer-model line
User-perceived crash rate1.09% of daily active users8% of daily active users on one model
User-perceived ANR rate0.47% of daily active users8% 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 modelDaily usersUsers who crashedCrash rate
Model A4,000160.40%
Model B3,000150.50%
Model C2,700160.59%
Model D3003010.00%
All models10,000770.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:

  1. In Play Console, break crash rate and ANR rate down by device model.
  2. Sort by rate instead of popularity, among the models with enough users to show one.
  3. 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.
  4. 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.

  1. Find the blocking work. Turn on StrictMode in Application.onCreate() for debug builds. It flags disk and network access on the main thread.
  2. Make it slow. Use your weakest supported phone, a large account and a slow network.
  3. Interrupt it. During launch, login, search and checkout, tap and press Back before the screen settles.
  4. 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 usesWhat Doze doesWhat to check
WorkManager or JobSchedulerHolds jobs until a maintenance windowThe job runs once after exit, and the data is current
Standard alarms, including setExact()Defers them to the next windowNothing user-facing depends on the exact minute
setAndAllowWhileIdle() and setExactAndAllowWhileIdle()Lets them fire, at most once per nine minutes per appTwo reminders set close together both reach the user, the second possibly late
setAlarmClock()Fires normallyThe alarm rings on time
Network and sync adaptersSuspends themNo 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.

BucketRegular jobsAlarmsNetwork
ActiveUp to 20 minutes in any 60 on Android 16 and aboveNo limitNo restriction
RareUp to 10 minutes in any 24 hours1 per hourDisabled
RestrictedOnce a day, up to 10 minutes1 per dayDisabled

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.

TrackWho gets itWhat it tells you
InternalUp to 100 testers per appWhether the Play-delivered build installs, updates and signs in. New bundles reach testers within minutes
ClosedEmail lists, Google Groups or organizations you pickHow the build behaves with a wider set of people you chose
OpenAnyone who joins the programHow 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 youWhere it stops
Stack traces and screenshots from lab devicesDevices start at Android 9 and sit in the United States
A crawl that types, taps and swipes without a scriptNo purchases, so paid areas may stay unseen
Sign-in with test credentials or Sign in with GoogleCredentials can’t be filled into a WebView login or OpenGL-drawn controls
A Robo script to steer the crawler through a journeyNo 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.

  1. No phone model has reached its per-model line for crashes or ANRs, and none is climbing toward it.
  2. The app is under both overall lines, with room to spare.
  3. StrictMode shows no new main-thread disk or network work.
  4. Launch, login, search and checkout were tapped while loading, on the weakest supported phone.
  5. Forced Doze was entered and exited, with jobs, alarms and messages checked on both sides.
  6. App Standby was forced with the battery set to unplugged.
  7. 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.
  8. One overnight run passed on a physical phone from each maker your users carry.
  9. Testers installed from a Play track, and every bug names a version code.
  10. A pre-launch report ran for this bundle, and someone read it.
  11. 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.

Frequently Asked Questions

Upload the bundle to the internal testing track so the team installs it through Google Play, then read the pre-launch report. Force Doze and App Standby with adb, tap through your slowest screens to look for ANRs, and roll updates out in stages.
Yes, for a large part of the plan. Google documents its Doze and App Standby test steps for virtual devices as well as hardware, and the pre-launch report runs in its own device lab. Manufacturer battery behavior still needs the actual phone.
Stability, Android compatibility, performance and accessibility issues. Google installs your build on a set of lab devices and crawls it for several minutes. Those devices sit in the United States, run Android 9 and above, and can't make purchases.
Stay below 0.47% of daily active users across your whole audience, and below 8% on every individual phone model. Those are Google's bad behavior thresholds, so treat them as the failing line and set your own release target lower.
No. Google says Android vitals excludes problems on app versions that were not installed through Google Play, along with problems on uncertified device models. A crash in a sideloaded QA build has to be caught by your own logging.
Doze is the first suspect. WorkManager uses JobScheduler, which Doze holds back until a maintenance window, and those windows get less frequent over time. Check the standby bucket next, since rare and restricted apps get less job time and no background network.
No, Pie works alongside them. Pie takes the user flows you regression test on every release. Android vitals, adb and Play Console stay with your engineers, because crash thresholds, Doze and release tracks are read and controlled there.
Adithya Aggarwal
Adithya Aggarwal
CTO & Co-founder at Pie

Eight years building search and delivery systems at Amazon. The kind of scale where flaky tests block billion-dollar releases. Now CTO at Pie, building AI agents that adapt when your UI changes. LinkedIn →