Google Play Free Trial Period testing strategy
Asked Answered
S

4

23

We are introducing Google Play subscriptions that include a 30 day trial, and I'm looking for some advice on how to test this.

As described in more detail here, the trial period for a testing account only lasts 3 minutes. Moreover, if an account (either a test account or not) has once received the free trial, they won't receive the free trial again. That means that every time that we want to test the onboarding and signup flow, we need to create a new Google account (add it to the group of accounts with license testing access, make it part of the group of testers that can download the app, opt-in for the internal test release and sign the new account in on the respective phone). This is tedious.

However, as I tried to create a new Google account for another round of testing, Google told me that my phone number (which is mandatory verification step) has been used too many times, and so I can't create any more accounts with this number.

I find it hard to believe that this is the only/the best way to test free trials with Google Play, so I'm happy with any help that can be offered on how to best approach this.

Sims answered 8/1, 2019 at 15:41 Comment(4)
Any solution on that?Ellipsis
Unfortunately not. We've had to buy about 20 SIM cards in order to be able to create new accounts...Sims
Thanx for the answer. I followed your steps (add it to the group of accounts with license testing access, make it part of the group of testers that can download the app, opt-in for the internal test release and sign the new account in on the respective phone) but I get the following error from GPay "the item you were attempting to purchase could not be found". Do you have any idea?Ellipsis
There are a number of reasons why this can happen. Make sure to read online and follow the many check lists that are out there (e.g. #23918690). In my personal experience the one step that often messes up my test flow is the step of opting in. When clicking on the opt-in link, make sure you're doing that with the right Google account. So for example, tap in the top right icon to check what account you're currently signed in to (in the browser you're opening the link with).Sims
O
3

Maybe this is still relevant for someone. So, you need to ensure that a Google Play product with a trial period is set up correctly. But you can't download test builds if you are not in the internal testers group. And you won't see a trial offer after 3 minutes in the app if you are in the internal testers group. So, here's how to see a real trial offer in a test build anytime:

  1. You're basically gonna need 2 Google accounts: one in the internal testers group and one not in the internal testers group (just a default personal account). Let's assume you have [email protected] and [email protected]. A real payment method should be linked to [email protected]
  2. Add both [email protected] and [email protected] in Google Play Settings so you can switch between them
  3. Switch to [email protected]
  4. Download the test build (I am assuming developers share test .apk files with internal app sharing)
  5. Remove [email protected] in Google Play Settings. This step is crucial because, for some reason no matter which accounts you switch to, Google Play will always prioritize [email protected] over test@gmail and put you in a test subscription flow
  6. Make sure you are logged in with [email protected]
  7. Open your app under test, go to a subscription entry point, and click the "subscribe" button evoking a Google Play purchase widget.

Then the internal test build will behave as if you were a real (not internal test) user. Confirming a subscription will lead to a withdrawal from a real payment method. The duration of subscriptions will be real (not 5 оr 30 minutes). If the product is set up correctly, you'll see a trial offer before confirming a purchase. The duration of the trial will be whatever your offer is instead of 3 minutes. Most importantly, trial eligibility will be real. As long as you don't subscribe you'll see a trial offer. It'll only disappear if you add [email protected] back to Google Play accounts.

The 5th step was the least obvious for me as I've never seen it clarified in Google documentation. Hope this helps!

Overbalance answered 20/9, 2023 at 12:52 Comment(1)
Remark to 5th step: This is because of the following reason: If you have a look into the official documentation "Test your Google Play Billing Library integration" (developer.android.com/google/play/billing/test), you will find the following statement from Google: "If the device has more than one account, the purchase is made with the account that downloaded the app.". That's why you have to remove the [email protected] from Google Play Settings because this was the account you used to download the app.Wellchosen
U
1

Umm, even if this is not a complete solution, it's rather an alternative to the main problem. It might be faster to just open another subscription from Google Play Console with free-trial enabled. You can subscribe to other free trials if the subscription ID is different from what you've activated the free trial with. That way you can use the same account but can activate free trial with different IDs.

You would also change the sku in the development section (remote or local, up to you.) It might take a while to get the information though, so I'd say open a bunch before start testing it next time.

The downside of this is, if anyone purchased a subscription, even if it's a test, it will not be possible to remove the test subscription, so be careful and be 100% sure to change your subscription IDs on production.

Unquestionable answered 22/10, 2020 at 11:47 Comment(1)
Careful: there might be a limit on how many subscriptions Google Play allows. Deleting a subscription does not let you reuse the same ID so it may still count towards some limit.Empson
C
0

Include dev-environment-specific logic that treats specific users (or users having particular characteristics) as TRIAL-period users whose start date can also be finagled similarly. E.g., [email protected] could represent a user whose trial is 2-days old. This logic could be essentially inaccessible for apps in production.

Colza answered 19/11, 2022 at 3:53 Comment(0)
I
0

To be able to test free trial several times for same google account, you can download and use Play Billing Lab application, as described here

Illboding answered 14/6, 2024 at 7:33 Comment(1)
Good to see Google has finally provided the right tools for testing these scenarios.Sims

© 2022 - 2025 — McMap. All rights reserved.