Test accounts let you try out new API implementations or account configurations
prior to implementing the changes in your production environment.

While production accounts serve ads that require billing and are rendered to
users, test accounts appear in the Google Ads UI as canceled accounts since there is
no active billing and they don't render ads to users.

Because test and production accounts cannot interact in any way, you cannot use
a test account under your existing production manager account. To use test
accounts, you need a new account hierarchy, with a test manager account as the
root.

> [!WARNING]
> **Note on Test Account Retention:**
>
>
> Google Ads API test accounts and their associated data are subject to automatic deletion. Any test account that remains inactive (has no API activity or logins) for a continuous period of **one year** will be permanently removed.
>
>
> To prevent unintended deletion, ensure you interact with your test accounts periodically if you want to retain them.

## Do you need a test account?

Before creating a separate test account hierarchy, verify which testing option
best matches your use case:

- **Making your first API calls or testing against real accounts (up to 2,880
  operations per day):** You don't need a test account unless you are testing [features restricted under Explorer access](https://developers.google.com/google-ads/api/docs/api-policy/access-levels#explorer-feature-restrictions) (such as account creation, user management, keyword planning, or billing). Apply for the automatic [Explorer access level](https://developers.google.com/google-ads/api/docs/api-policy/access-levels#explorer-access) on the [Google Ads API
  Overview page](https://console.cloud.google.com/google/ads-apis/overview) in the Google Cloud Console to query and manage production accounts directly.
- **Validating request syntax and policy compliance without changing data:** Set the [`validate_only`](https://developers.google.com/google-ads/api/docs/concepts/api-structure#mutate-validation) field on [`GoogleAdsService.Search`](https://developers.google.com/google-ads/api/reference/rpc/v26/GoogleAdsService/Search) or mutate requests (requires at least [Explorer access](https://developers.google.com/google-ads/api/docs/api-policy/access-levels#explorer-access) when targeting production accounts).
- **Developing with a [Test access](https://developers.google.com/google-ads/api/docs/api-policy/access-levels#test-account-access) project or testing
  full campaign creation in a free sandbox:** Follow the steps on this page to create a test manager account and a test client account.

## Why use test accounts?

Test accounts don't affect your live ads or charge your account. They provide
the following benefits during active development:

- Can be set up in a hierarchy and organized just like production accounts.
- Can be viewed and manipulated in the Google Ads UI, just like production accounts.
- Don't require production API access to be approved for your Google Cloud project, so you can start experimenting with the API immediately while your project has the [Test access level](https://developers.google.com/google-ads/api/docs/api-policy/access-levels#test-account-access). (If a Google Cloud project with Test access attempts to call a production account, the API returns [`AuthorizationError.CLOUD_PROJECT_NOT_APPROVED_FOR_PRODUCTION`](https://developers.google.com/google-ads/api/reference/rpc/v26/AuthorizationErrorEnum.AuthorizationError#cloud_project_not_approved_for_production) starting in `v25`, or [`AuthorizationError.ACTION_NOT_PERMITTED`](https://developers.google.com/google-ads/api/reference/rpc/v26/AuthorizationErrorEnum.AuthorizationError#action_not_permitted) in `v24` and earlier.)
- Can't serve ads or interact with your production accounts in any way. This gives you a safe environment to test code or configuration changes without impacting your serving accounts.
- Have the same restrictions, including [rate limits](https://developers.google.com/google-ads/api/docs/best-practices/quotas), as production accounts.

Since test accounts don't have budgets, you might see an error when creating a
test sub-account in a manager account. You can safely ignore this error.

## Create test accounts and campaigns

The following instructions create a test manager account, a test client account,
and a few campaigns to populate the test client account. For a full explanation
of these account types, see [Account types](https://developers.google.com/google-ads/api/docs/concepts/account-types).

1. Click **Create a test manager account** to open the Google Ads account selection
   page. If prompted, sign in with a [Google Account](https://www.google.com/account/about/) that
   isn't linked to your production [Google Ads manager account](https://ads.google.com/home/tools/manager-accounts/),
   or create a Google Account from the sign-in prompt.

   [Create a test manager account](https://ads.google.com/nav/selectaccount?sf=mt)
2. On the account selection page, click **New Google Ads Account** (or click
   **Create a new account** if the **Finish setting up your account?** dialog
   appears). The account selection page does not display a test indicator, but
   opening it from **Create a test manager account** configures the signup flow
   to create a test manager account.

3. On the **Confirm your business information** page, enter an **Account
   display name** , select a **Primary use of the account** option, and select
   your country, time zone, and currency. Confirm the red **Test account**
   label in the upper-right corner, click **Submit** , and then click
   **Explore your account** to open your test manager account dashboard.

4. In your test manager account, create a test client account: Click
   **Accounts** \>
   \>
   **Create new account**. Enter an account name, select your country, time
   zone, and currency, and save the account. Any client accounts you create
   from your test manager account are automatically test accounts.

5. Create one or more test campaigns under the test client account so that
   subsequent reporting queries return sample data.

6. Record both 10-digit Customer IDs (without hyphens) from the Google Ads UI for
   your API configuration:

   - **`customer_id` (target client account):** Use the 10-digit Customer ID of the new **test client account** where you created your test campaigns (API calls that query or mutate campaigns must target a client account, not a manager account).
   - **`login-customer-id` (manager account):** If you authenticate with a Google Account or service account linked to your **test manager
     account** , set `login-customer-id` to the 10-digit Customer ID of the **test manager account**.
7. Follow [Make your first API call](https://developers.google.com/google-ads/api/docs/get-started/make-first-call) to configure your client
   library or REST credentials and execute a test query against your new test
   client account.

> [!IMPORTANT]
> **Important:** Reuse the credentials from your Google Cloud project (your service account key or OAuth 2.0 client ID and client secret) when calling test accounts---even if the project only has Test access. Make sure the service account or the Google Account used to generate your OAuth refresh token has been granted access to the test manager or test client account.

## View test accounts

To view test client accounts under a test manager account in the Google Ads UI,
[unhide the accounts](https://support.google.com/google-ads/answer/7519830) by choosing to view canceled accounts.

During manager account setup and in some Google Ads UI views, test accounts display
a red **Test account** label:

![Google Ads UI showing a red Test account label](https://developers.google.com/static/google-ads/api/images/test-account.png)

> [!NOTE]
> **Note:** Some Google Ads navigation views omit the red **Test account** label after account creation completes. The absence of this label in the top bar does not indicate that the account is a production account.

To check whether an account is a test account through the API, query the
[`customer.test_account`](https://developers.google.com/google-ads/api/reference/rpc/v26/Customer#test_account) field using the
[`GoogleAdsService.Search`](https://developers.google.com/google-ads/api/reference/rpc/v26/GoogleAdsService/Search) or
[`GoogleAdsService.SearchStream`](https://developers.google.com/google-ads/api/reference/rpc/v26/GoogleAdsService/SearchStream) method:

    SELECT customer.id, customer.test_account
    FROM customer
    LIMIT 1

You can execute this query against either a test manager account or a test
client account. When querying a test client account through your test
manager account, include the manager account ID in the `login-customer-id`
header. Test manager and test client accounts return `true` for
`customer.test_account`, whereas production accounts return `false`.

## Limitations

Keep the following limitations in mind when working with test accounts:

- Since test accounts can't serve ads or interact with your production accounts in any way, serving metrics---like impressions, conversions, or cost data---are empty.
- You can't test certain features in test accounts, including bid simulations, conversion uploads, and billing. Other features, including recommendations, have limited capabilities within test accounts because test accounts don't generate serving data.
- Test manager account hierarchies can contain [up to 50](https://developers.google.com/google-ads/api/docs/best-practices/system-limits#account) test accounts. If you need additional test accounts, you can create another test manager account.
- Test accounts generating a high volume of continuous requests may be throttled without notice.

See [Testing best practices](https://developers.google.com/google-ads/api/docs/best-practices/testing#test-prod-accounts) for guidance on working
around these limitations.