We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
Application DistributionAppGallery Connect Help CenterTesting an AppSandbox Testing

Sandbox Testing

In the app test phase, you can configure sandbox test accounts in AppGallery Connect, use relevant services, such as downloading paid apps, making in-app purchases, and using Game Service with the test accounts, and test your app functions free of charge in the simulated environment.

Before You Start

To use sandbox tests for order, subscription, and game function services, integrate the HMS Core SDK 3.0 or a later version to your app. Other sandbox tests are as follows:

Adding a Test Account

  1. Sign in to AppGallery Connect and click Users and permissions.
  2. Go to Sandbox > Test accounts and click Add.

  3. Enter your test account information and click OK.
    NOTICE

    A test account must be a registered HUAWEI ID.

Clearing the Purchase History

To use a test account to repeatedly test the function of purchasing subscriptions and non-consumables, you can clear the purchase history.

  1. Sign in to AppGallery Connect and click Users and permissions.
  2. Go to Sandbox > Test accounts, select one or multiple accounts, and click Clear purchase history. After the operation is successful, purchase subscriptions and non-consumables again.

Interrupting Purchases for a Test Account

To verify whether the handling logic works correctly when a purchase is interrupted due to network issues, you can simulate a failure by interrupting the purchase process for a test account.

  1. Sign in to AppGallery Connect and click Users and permissions.
  2. Go to Sandbox > Test accounts. Click an account to go to its details page and select Interrupt purchases for this test account.

    After you click OK, all purchase attempts by this test account in the sandbox environment will be interrupted.

  3. To restore the purchase or subscription renewal of the test account, deselect Interrupt purchases for this test account and click OK.
Search in Distribute Apps
Enter a keyword.