Android Subscription Testing: A Complete Google Play Test Plan
Subscriptions are among the highest-stakes code paths in a mobile app. A broken purchase, a stuck renewal, or an entitlement that survives a refund all cost real money and trust. This guide walks through the full Google Play subscription test surface — sandbox setup, licensed testers, test tracks, and every state a subscription can enter — and explains when a store-free test environment is the faster option.
How Google Play subscriptions actually behave
Before writing a single test, it helps to know the rules the store enforces. A subscription grants one or more entitlements — access to content that would otherwise be locked — for as long as the subscription is active. On Google Play:
- Purchases attach to the buyer's Google account, not to your app's account system.
- The same subscription cannot be active twice on one Google account at the same time.
- A subscription renews each period unless it is canceled — or, for licensed testers, after six renewals.
- After a cancellation, access continues until the current period ends.
Those four rules drive most of the test cases below. If your app's entitlement logic assumes otherwise, the test will catch it.
The tools you test with
Licensed testing. Google's licensed-tester mechanism lets designated Google accounts buy your products without being charged, and it is the recommended way to test during development and after launch. Add the account as a licensed tester in the Play Console and expect a propagation delay of a couple of hours. Licensed testers can purchase even when installing directly from the Play Store, so treat this as an internal tool only — not something to hand to external testers. Test purchases show a notice in the purchase dialog, and renewal and feature periods are substantially shortened, which makes them practical to observe. A licensed tester can also pick a test payment card that always declines, which is how you exercise purchase failures, grace periods, and account hold.
Test tracks. Tracks let you ship to a smaller audience before production. Open tracks accept anyone from the Play Store up to a count you set. Closed tracks require a link to join. Internal tracks behave like closed tracks but are limited to internal users and capped at 100. You can run several closed tracks but only one open and one internal track. Testers on these tracks are charged for purchases unless they are also licensed testers — so either give them a build with paid features unlocked (at the cost of testing something other than the production build) or grant entitlements manually or programmatically.
Order management and subscription management. The Play Console's order management view lists every purchase and lets you act on subscriptions, which is how you confirm a test purchase landed correctly on Google's side. The Play Store's subscription management page shows renewal status, the current billing cycle's expiry, payment methods, and price, and lets you cancel, pause, resubscribe, upgrade, or downgrade. Give users a direct route to it: the subscription-specific URL takes a product ID and package name, and the general URL works when there is no active subscription.
Setup checklist before your first test purchase
Work through these in order; several steps have propagation delays that will waste an afternoon if skipped.
- Upload a signed build to a closed test track in the Play Console and wait a couple of hours. Once the app is approved, later tests can run on a local build.
- Confirm the app is approved for testing.
- Use a device or emulator with Android 1.6+ and Play Store / Play Services installed. A real device is preferred; on an emulator, pick an image that includes the Play Store.
- Set a PIN or other device lock. This is undocumented, but testing has been observed to fail without it.
- Sign in with a Google account that is also registered as a tester on the track. Multiple signed-in accounts can produce unexpected results.
- Opt into the track with that account using the track's opt-in URL, then wait for propagation.
- Open the Play Store at least once after signing in and before testing purchases.
- Make sure the build under test uses the same applicationId as the build on the Play Console.
- Create your subscriptions in the Play Console and wait a couple of hours for them to propagate.
After that, in-app purchases should go through.
Mandatory tests: every subscription app needs these
Run these with a licensed tester first, then repeat a basic pass on a non-licensed account before shipping. Repeat the whole set whenever you make a significant change to the purchase implementation.
Initial purchase. Buy with a Google account that does not already hold the subscription. The purchase should succeed with no errors, Google should email a confirmation (licensed or not), the entitlement should unlock, and the period shown in the Play Store should match what you configured.
Failed initial purchase. Force a failure — a declining test card on a licensed account, or no network connection. The user should see a meaningful error message and must not receive the entitlement.
Renewal. Buy, confirm the content unlocks, then wait out the first period (licensed tester periods are shortened). The content should stay unlocked.
Cancellation. Buy, confirm unlock, cancel from the Play Store. Access should continue until the period ends and stop after it.
Resubscribing from the Play Store. Buy, cancel, then resubscribe from the Play Store before the period ends. Access should continue past the original expiry.
Refund. Buy, confirm unlock, then refund — from order management in the Play Console using the order ID from the receipt email or the account email, or from your subscription dashboard if you use one. Access should be revoked and the subscription should not auto-renew.
Account hold. A failed renewal payment puts the subscription into account hold after any grace period. The user loses access but is told about the billing problem and can fix it; the state lasts up to 30 days (10 minutes in internal testing). To test: buy, switch to a failing payment method before renewal, confirm access continues until the period ends and stops after, then switch to a valid method. The subscription should resume and access should return. If the hold runs out without a fix, the subscription is canceled.
Optional tests: only if you support the feature
Free trials. You need a subscription with a new-customer-acquisition offer that includes a free-trial phase. Eligibility is set when you create the offer and is tied to the Google account, not your app's account system: either the user has never bought that specific subscription, or has never bought any subscription in your app. Never advertise a trial to an ineligible user. To test, buy as an eligible user; the dialog should state that the trial is free and show the price and period. Access should be live during the trial, the subscription should renew at full price after it (3 minutes in internal testing), and access should continue afterward unless canceled.
Pause. Enable pause under Monetization setup in the Play Console. A paused subscription stops renewing until the pause is lifted or expires. To test, buy, pause, confirm access continues until the period ends and stops after, then resume from the Play Store. Access should return and renewals should resume. Pause is not available on annual subscriptions, Google resumes automatically when the pause ends (entering account hold if the payment method fails), and users can pause for up to 3 months (15 minutes with licensed testing).
Grace period. Each subscription can have its own grace period, giving the user time to fix a failed payment without losing access. To test, buy a subscription with a grace period, switch to a failing payment method before renewal, and confirm access continues through the period and through the grace window (5 minutes in licensed testing). Then branch: if the user fixes the method before the grace period ends, access continues and the subscription renews normally; if not, access is lost, the subscription enters account hold, and it stops renewing.
Resubscribing from the app. If you let users reactivate a canceled subscription before it expires, test buying, canceling, and reactivating in-app. Access should continue past the original expiry as if the cancellation never happened. Note that this creates a new subscription internally with the remaining time prorated, which matters when reconciling data and finding purchases in the console.
Restore purchases. Without an app account system, the app must restore access after a reinstall or on a second device signed into the same Google account. Test both. With an app account system, Google offers little direct support: because a subscription can only be active once per Google account, you must decide whether to grant entitlements to every app account on that Google account, provide a transfer mechanism, or use another approach. Test this flow hard — it is one of the most complex you will build. In all cases, confirm that restoring does not grant access after expiry.
Upgrades and downgrades. While a subscription is active — canceled or not — you can offer a different subscription with a different price, period, or offer. Each proration mode has its own expected duration and price; verify both after the change.
Promo codes. Promo codes grant a free trial when redeemed, either in the purchase dialog or from the Play Store. One-time and custom codes differ: custom codes can only be redeemed in the in-app purchase dialog and only by users who have never subscribed, so tell users that up front. Google recommends testing at least three scenarios: redemption before the app is installed (the offer should be granted as soon as the app opens), redemption while the app is in the foreground (use a second device, and try it from different screens), and redemption in multi-window mode with the app and Play Store visible together.
Subscription offers. Google added offer support at I/O 2022, covering free trials, discounted periods, and other pricing structures for new and existing users. Test coverage for these is still evolving.
Account hold vs. grace period: telling them apart
These two states both follow a failed renewal payment, and testers often confuse them. The difference is access.
| State | Access during state | How it ends |
|---|---|---|
| Grace period | Retained | Payment fixed → normal renewal; not fixed → account hold |
| Account hold | Removed | Payment fixed → subscription resumes; not fixed → canceled |
If a subscription has a grace period configured, it enters grace period first and only moves to account hold once that window closes. If it has none, it goes straight to account hold. When you run a failure test, record which state you observed and when — that timestamp is what tells you whether your entitlement logic is reading the right signal.
Worked example: one subscription through four states
Take a single monthly subscription with a grace period, tested on a licensed account. The expected entitlement state at each step:
- Purchase. Entitlement active. Google sends a confirmation email. The Play Store shows the period you configured.
- Cancel. Entitlement stays active until the period ends, then goes inactive. The Play Store shows that the subscription will not renew.
- Resubscribe from the Play Store before expiry. Entitlement stays active past the original end date.
- Refund. Entitlement goes inactive and the subscription does not auto-renew.
Now repeat with a failing payment method at renewal instead of a cancellation. The entitlement should stay active through the period and through the grace window, then go inactive and move into account hold. Fix the payment method and it should come back. This four-step sequence catches the most common entitlement bugs: access that outlives a refund, access that dies at cancellation instead of at period end, and access that never returns after a recovered payment.
Automation limits and the pre-launch pass
Every test above is manual, and Google currently offers no way to simulate the purchase environment in unit tests. UI-driven purchase tests are the alternative, but they are slower and more brittle, and they run into real constraints: subscriptions are tied to Google accounts, so parallel or rapid runs on one account cause problems and test accounts must be licensed testers; renewals force a wait of at least a few minutes; and promo codes have a redemption cap. Automation here is possible but limited.
For pre-launch, create an internal closed track, upload the build, and get it approved. Run the full feature set with a licensed account first. Then run a smaller pass on a non-licensed account covering at minimum: initial purchase, renewal (a weekly subscription makes this faster), cancellation, free trials, and restoring purchases. Refund anything bought on a non-licensed account afterward so you are not paying for test purchases.
When a store-free test environment is the better choice
Google Play sandbox testing is thorough, but it is slow to set up and slow to iterate on. A test environment that bypasses the real billing flow can remove much of that friction: no licensed testers to configure, no propagation waits, no payment methods to manage, and no requirement to be signed into a specific Google account. Rather than invoking Google Play billing, such an environment typically presents a modal with your product metadata and buttons that simulate a successful purchase, a failed purchase, or a cancel. Simulated purchases are designed to behave like real ones — updating customer info, triggering entitlements, and appearing in your dashboard — though you should confirm each of those behaviors against your own implementation before relying on them as proof of correctness. Renewals in a simulated environment are usually accelerated and capped at a fixed number of cycles, which makes expiry and renewal logic quick to verify; check the current documented rates and limits rather than assuming them. To get started, follow the setup steps published for the test environment you adopt, and confirm whether any store-side configuration is still required for your case. Never ship a build that uses a test key. Switch to your platform-specific key before submitting for review, and verify the failure mode of a misconfigured key in a staging build rather than in production.
Choosing between the two approaches
The two approaches are complementary rather than competing. Use the store-free environment while you are building and iterating, and use the Google Play sandbox for the final pass where real billing behavior matters. The comparison table below lays out the split.
| Use a store-free test environment when… | Use Google Play sandbox when… |
|---|---|
| Starting development | Final pre-release testing |
| Writing automated tests | Testing real billing UI |
| Quick iteration on purchase flows | Verifying store-specific behavior |
| CI/CD pipelines | Testing promo codes or offers |
This split reflects the captured guidance from the original article; treat it as a starting heuristic and adjust to your release process.
Frequently asked questions
Do test track users get free purchases?
No. Open, closed, and internal testers are charged for purchases unless they are also licensed testers. If you need non-licensed testers to exercise paid features, either ship them a build with those features unlocked or grant entitlements manually or programmatically.
What is the difference between account hold and a grace period?
Both follow a failed renewal payment. During a grace period the user keeps access while they fix the payment method; if they do not, the subscription moves into account hold. During account hold the user loses access but is notified and can still recover by fixing the payment method. Without a grace period configured, a failed renewal goes straight to account hold.
Why do I need to wait a couple of hours after configuring testers or subscriptions?
Google Play propagates changes to licensed testers, test tracks, and subscription products with a delay. Testing before propagation completes produces confusing failures that look like bugs in your app.
Can I ship a build that uses a store-free test environment key?
No. A test-environment API key in a production build will crash the app. Switch to your platform-specific key before submitting for review.
Can subscription purchases be unit tested?
Not against the real Google Play billing flow — Google provides no way to simulate the purchase environment in unit tests. UI-driven purchase tests are possible but slower and more brittle, and they are constrained by Google account association, renewal wait times, and promo code redemption limits.