From c80197d065439e4b65f1bfc3d65d50e79746bcd6 Mon Sep 17 00:00:00 2001
From: Dirk Dougherty The Google Play Developer Console provides several tools that help you test your In-app Billing
-implementation before it is published. You can use these tools to create test accounts and purchase
-special reserved items that send static billing responses to your application.In this document
-
See also
@@ -19,8 +20,13 @@ parent.link=index.html
To test In-app Billing in an application you must install the application on an Android-powered device. You cannot use the Android emulator to test In-app Billing. The device you use for testing @@ -31,9 +37,119 @@ requests to Google Play. For general information about how to set up a device fo developing Android applications, see Using Hardware Devices.
-The following section shows you how to set up and use the In-app Billing test tools.
+When your In-app Billing implementation is ready, you can test purchasing of your in-app SKUs in two ways:
+ +The sections below provide more detail about how to use these approaches for +testing and validation.
+ +Test purchases offer a secure, convenient way to enable larger-scale testing +of your In-app Billing implementation during development or in preparation for +launch. They let authorized user accounts make purchases of your in-app products +through Google Play while the app is still unpublished, without incurring any +actual charges to the user accounts.
+ +Once authorized with testing access, those users can side-load your app and +test the full merchandising, purchase, and fulfillment flow for your products. +Test purchases are real orders and Google Play processes them in the same way as +other orders. When purchases are complete, Google Play prevents the orders from +going to financial processing, ensuring that there are no actual charges to user +accounts, and automatically canceling the completed orders after 14 days.
+ +It’s easy to set up test purchases—any user account can be chosen to be +a test account, and any user of a test account can make test purchases with any +available payment method (even though there’s no charge to the payment +method).
+ +First, upload and publish in-app products that you want testers to be able to +purchase. You can upload and publish in-app products in the Developer Console. +Note that you can upload and publish your in-app items before you publish the +APK itself. For example, you can publish your in-app items while your APK is +still a draft.
+ +Next, create license test accounts for authorized users. In the Developer +Console, go to Settings > Account details, +then in the License Testing section, add the addresses to Gmail accounts +with testing status. For more information, see Setting Up for Test Purchases.
+ +Once you’ve added the users as license tester accounts and saved the change, +within 15 minutes those users can begin making test purchases of your in-app +products. You can then distribute your app to your testers and provide a means +of getting feedback.
+ +Note: To make test purchases, the license test +account must be on the user’s Android device. If the device has more than one +account, the purchase will be made with the account that downloaded the app. If +none of the accounts has downloaded the app, the purchase is made with the first +account.Users can confirm the account that is making a purchase by expanding the +purchase dialog.
+ +Authorized license test accounts are associated with your developer account +in Google Play, rather than with a specific APK or package name. Identifying an +account as a test account enables it to purchase any of your in-app products +without being charged.
+ +During a test purchase, users can test the actual merchandising, purchase, +and fulfillment flow in your app. During purchase, the inapp item is displayed +as a normal item with an actual price. However, Google Play marks test purchases +with a notice across the center of the purchase dialog, for easy identification. +
+ +Google Play accumulates completed test purchases for each user but does not +pass them on to financial processing. Over time, it automatically clears out +the purchases by cancelling them.
+ +In some cases, you might want to manually cancel a test purchase to continue +testing. For cancelling purchases, you have these options:
-If you plan to use test purchases, please note the requirements and limitations below:
+As you prepare to launch an app that uses In-app Billing, you can make use of +Google Play alpha/beta release options to do validation and load testing on your +implementation before distributing the app to all of your users.
+ +With alpha/beta test groups, real users (chosen by you) can install your app +from Google Play and test your in-app products. They can make real purchases +that result in actual charges to their accounts, using any of their normal +payment methods in Google Play to make purchases. Note that if you include test +license accounts in your alpha and beta distribution groups, those users will +only be able to make test purchases.
+ + +We recommend that you first test your In-app Billing implementation using static responses from Google Play. This enables you to verify that your application is handling the primary Google @@ -186,12 +302,12 @@ overrides the usual Google Play production system. When you send an In-app Billi reserved product ID, the quality of service will not be comparable to the production environment.
-After you finish your static response testing, and you verify that signature verification is working in your application, you can test your In-app Billing implementation by making actual in-app purchases. Testing real in-app purchases enables you to test the end-to-end In-app Billing -experience, including the actual responses from Google Play and the actual checkout flow that +experience, including the actual purchases from Google Play and the actual checkout flow that users will experience in your application.
Note: You do not need to publish your application to do end-to-end @@ -208,11 +324,6 @@ accounts.
Also, a test account can purchase an item in your product list only if the item is published. The application does not need to be published, but the item does need to be published.
-When you use a test account to purchase items, the test account is billed through Google Wallet -and your Google Wallet merchant account receives a payout for the purchase. Therefore, you may -want to refund purchases that are made with test accounts, otherwise the purchases will show up as -actual payouts to your merchant account.
-To test your In-app Billing implementation with actual purchases, follow these steps:
To perform end-to-end testing of In-app Billing, the primary account on your device must be - one of the test accounts - that you registered on the Google Play site. If the primary account on your device is not a - test account, you must do a factory reset of the device and then sign in with one of your test - accounts. To perform a factory reset, do the following:
-If your device is running Android 3.0, In-app Billing requires version 5.0.12 (or higher) of -- cgit v1.1