콘텐츠로 건너뛰기

자주 방문한 페이지

최근 방문한 페이지

navigation

Testing Your In-app Billing App

This lesson teaches you to

  1. Test with static responses
  2. Test with your own product IDs

You should also read

To ensure that In-app Billing is functioning correctly in your app, you must test the app before you publish it on Google Play. Early testing also helps to ensure that the user flow for purchasing in-app items is not confusing or slow, and that users can see their newly purchased items in a timely way.

Test with static responses

Test your In-app Billing app with static responses by using Google Play's reserved product IDs. By using reserved product IDs instead of actual product IDs, you can test the purchase flow without specifying an actual payment method or transferring money. To learn more about reserved product IDs, see Testing In-app Billing.

Test with your own product IDs

Because Google Play doesn't allow you to use your developer account to directly purchase in-app products that you create yourself, you need to create test acccounts under your developer account profile. To create a test account, simply enter a valid Google email address. Users with these test accounts are able to make in-app-billing purchases from uploaded, unpublished apps that you manage. The signature of the unpublished apps doesn't need to match the published versions.

To test your In-app Billing app using your own product IDs:

  1. In the Play Console, add one or more tester accounts to the developer account that you are using to publish your app by completing the following steps:

    a. Login to the Play Console with your developer account.

    b. Click Settings > Developer account > Account details, and then in the License Testing section, add the Google email addresses for your tester accounts.

  2. Build a signed APK file for your In-app Billing app. To learn how to build and sign your APK, see Building Your Application for Release.

  3. Make sure that you have uploaded the signed APK for your app to the Play Console, and associated one or more in-app products with your app. You don't need to publish the app on Google Play to test it.

  4. Install the APK file to your physical test device by using either the adb tool, or the Play button in Android Studio. To learn how to install the app, see Running on a Device. Make sure that your test device is running on Android 2.2 (API level 8) or higher and is installed with Google Play client Version 3.9.16 or higher.

  5. Login to the test device by using a tester account. Test your In-app Billing app by purchasing a few items, and fix any issues that you encounter. To learn more about how you can perform large-scale testing of your In-app Billing app, see Test Purchases (In-app Billing Sandbox).

이 사이트는 쿠키를 사용하여 사이트별 언어 및 표시 옵션에 대한 환경설정을 저장합니다.

Google Play에서 성공을 거두는 데 도움이 되는 최신 Android 개발자 뉴스 및 도움말을 받아 보세요.

* 필수 입력란

완료되었습니다.

WeChat에서 Google Developers 팔로우하기

이 사이트를 (으)로 탐색할까요?

페이지를 요청했지만 이 사이트의 언어 환경설정은 입니다.

언어 환경설정을 변경하고 이 사이트를 (으)로 탐색할까요? 언어 환경설정을 나중에 변경하려면 각 페이지 하단의 언어 메뉴를 사용하세요.

이 클래스를 사용하려면 API 수준 이상이 필요합니다.

문서에 대해 선택한 API 수준이 이므로 이 문서가 표시되지 않습니다. 왼쪽 탐색 메뉴의 선택기로 문서 API 수준을 변경할 수 있습니다.

앱에 필요한 API 수준 지정에 관한 자세한 내용은 다양한 플랫폼 버전 지원을 참조하세요.

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)