Test ad units

  • Ad Inspector offers both in-context and out-of-context testing of ad units, with in-context testing recommended for full parameter support.

  • Before requesting a test ad, ensure prerequisites like setting up a test device and initializing the SDK are met.

  • You can request a test ad either in-context by loading an ad in your app's UI or out-of-context directly within Ad Inspector.

  • Ad Inspector allows testing a single ad source by restricting ad requests to a specific bidding or waterfall source to verify adapter integration and ad serving.

  • To stop a single ad source test, simply toggle off the setting in Ad Inspector and confirm the action.

Ad inspector supports the following tests:

  • In-context testing: load ads from the ad units in your app. You can open ad inspector to view details on requests made from ad units.
  • Out-of-context testing: test your ad unit directly in ad inspector without navigating to your app's UI. You can test multiple ad units at once, asynchronously load and view your test ad requests, and perform single ad source tests.

When running an out-of-context test, your requests don't carry the parameters to run in your app's UI, including child-directed treatment configuration, custom targeting, network extras, and different sizes. Due to the limitation of these requests, we recommend you use in-context testing in your app's UI.

Prerequisites

Before you continue, do the following:

  • Complete all items in the initial Prerequisites to create an AdMob account, set your test device, initialize Google Mobile Ads Unity Plugin, and install the latest version.
  • Launch ad inspector.

Request a test ad

To request a test ad in ad inspector, complete the following steps. For more details, see How to use ad inspector in your app.

  • In-context:

    1. On a test device, navigate to your app's UI and load an ad.
    2. Open ad inspector. In the Ad unit tab, find the ad unit where you loaded the ad.
    3. In SDK request log, view details on your requested test ad.
  • Out-of-context:

    1. In the Ad unit tab, tap on your ad unit and click Request test ad.
    2. In SDK request log, view details on your requested test ad.

If the ad unit format shows Unknown, you see Request test ad greyed out.

Customize a test ad

Ad inspector lets you build a custom test ad through the Configure custom ad request page. This page contains parameters you use to define and request a custom test ad. To request a test ad with default settings, follow Request a test ad.

To build a custom test ad, do the following:

  1. In the Ad unit tab, tap on the ad unit you want to build a custom test ad.
  2. Click editEdit:

    SDK request log page with the edit icon

    The Configure custom ad request page appears. The following example shows the Configure custom ad request page for a banner ad:

    Configure custom ad request page for a banner ad

  3. Input your ad request and details into the following fields:

    • Ad Request:
      • Content URL: the URL of the surrounding content. For details, see Content URL.
      • Neighboring Content URLs: the URL of the content that appears before and after an ad. For details, see Content mapping for apps.
    • Depending on the ad format, input the following ad details:
      • Banner Ads: enter the width and height of the ad. For details, see Banner ads.
      • Native Ads:
        • Media Aspect Ratio: select your preferred media aspect ratio.
        • Disable Image Loading: defines whether Google Mobile Ads Unity Plugin must load image asset content.
        • Custom Mute This Ad: defines whether to use the custom mute this ad feature.
        • Preferred Ad Choices Position: indicates the preferred location of the AdChoices icon.
    • Video Options:

      • Start Muted: a toggle to mute your content on start.
      • Click to Expand Requested: defines whether the requested video must have the click to expand behavior.
  4. Click Request custom test ad. If successful, you see the custom test ad in SDK request log.

Test a single ad source

Ad inspector can restrict ad requests in your app to serve ads from a single bidding or waterfall ad source. This approach lets you verify that you've correctly integrated with the third-party adapter, and the ad source serves as expected.

To test a single ad source, complete the following steps:

  1. In Ad inspector, click the