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 SDK, 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:
- On a test device, navigate to your app's UI and load an ad.
- Open ad inspector. In the Ad unit tab, find the ad unit where you loaded the ad.
- In SDK request log, view details on your requested test ad.
Out-of-context:
- In the Ad unit tab, tap on your ad unit and click Request test ad.
- 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.
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:
In Ad inspector, click the Single ad source test toggle. A Single ad source test dialog appears:
Select an ad source to test. Afterwards, you receive the Force restart app page:
The single ad source test setting applies to any future ad requests you make. This test doesn't apply to previously cached ads in that session. We recommend you to force restarting your app when applying a single ad source test. This approach invalidates cached ads that might display instead of your chosen ad source receiving a request.
After restarting your app, all ad unit placements attempt to show an ad from the selected ad source. Launching ad inspector when a single ad source test is active shows the active test ad source:
In single ad source test mode, all ad requests attempt to fill with the selected ad source, regardless of whether that ad source was configured for bidding or waterfall. If the ad source you're testing is not set up for bidding or waterfall for the ad unit, you receive the following error message:
Ad Unit has no applicable adapter for single ad source testing on network: AD_SOURCE_ADAPTER_CLASS_NAME
To verify whether the ad source filled the ad requests after you start a single
ad source test, tap an ad unit to view the SDK request log. If the ad source
failed to load an ad, an error message appears describing the error, such
as Adapter failed to initialize
.
If you've added multiple instances of the selected ad source to a waterfall, you see each call instance to the ad source. This process renders until the ad is either filled or the waterfall ends without a fill.
Stop a single ad source test
To stop the test, complete the following steps:
- In Ad inspector, click off the Single ad source test toggle. The Stop single ad source test? dialog appears.
Tap Stop test.
If successful, a confirmation message appears over Force restart app:
To revoke cached ads for the tested ad source, we recommend you to force restart the app after stopping the test.