The AdMob Mediation Test Suite allows you to test whether you have correctly configured your application and ad units to be able to display ads from third-party networks via AdMob mediation.
This guide outlines how to use the AdMob Mediation Test Suite in your Android app. The first step is integrating the tool into your app.
Prerequisites
Android SDK 4.0 (API level 14) or later.
Google Play services 9.8.0 or later.
Installation
Using Gradle
Copy the following required dependencies into your apps build.gradle
file:
dependencies {
// You should already have the ads dependency in your app.
implementation 'com.google.android.gms:play-services-ads:18.3.0'
implementation 'com.google.android.ads:mediation-test-suite:1.2.1'
}
Include the google()
repository in your top-level build.gradle
file:
// Top-level build file where you can add configuration options common to all // sub-projects/modules. buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() jcenter() } }
Launching the Mediation Test Suite
Use the following line of code to launch the Mediation Test Suite:
MediationTestSuite.launch(MainActivity.this);
Note that this requires that you have
correctly entered your AdMob app ID
in your AndroidManifest.xml
.
The tool opens with the following disclaimer:

Tick the checkbox and press Agree to proceed.
You're then presented with a list of ad units for your account, separated into two tabs: Failing Ad Units and Working Ad Units.
The Failing Ad Units list is separated into Missing Components and Configuration Errors:

After all of an ad unit's networks are tested successfully, the ad unit will move from the Failing tab to the Working tab. If you don't see a list of ad units, either the network call failed or no ad units were found.
If you want to search the list of ad units, press the search icon at the top and enter a string of an ad unit ID. You can also search by network name or by ad format.
For each ad unit, this screen provides warnings if:
- An ad source SDK is not installed
- An ad source adapter is not installed
- An ad source requires manifest entries that are not configured
If testing is possible, the screen also shows overall test result status for all ad sources.
Select an ad unit to move to the Ad Unit Details screen.
Ad Unit Details
This screen shows the details for the ad unit, including the ad unit ID, the ad format, and the mediation waterfall configured for the ad unit:

Note the following aspects on this screen:
- Ad Source Summary
For each ad source, there are indicators showing whether the SDK and adapter is installed, any required manifest entries are found,and the result of the last test for this configuration in this session.
Note that for custom events, a Custom Event: custom event label is used. The adapter status indicator for a custom event will be positive if the class you've specified for the custom event is found. You can load and view ads for custom events in the same way as other networks.
- Search
Pressing the search icon presents a search screen where you can search for ad sources according to their name.
- Batch testing
Each ad source can be selected to be tested in a batch by checking the checkbox to the left of the ad source name. A new option then appears in the navigation bar:
Press the Load Ads button in the top right to load ads for the selected ad sources in sequence. A progress indicator is displayed while testing takes place. Pressing the back icon in the top left clears the selection.
Loading and displaying ads
Tap on an ad source entry to see the ad source details screen:

The screen indicates, for the given ad source:
- If the SDK is installed and, if available, the SDK version.
- If the adapter is installed and, if available, the adapter version.
- If any required manifest entries are properly configured.
- The adapter initialization status, if available.
- The parameters for the configuration that were entered in the AdMob console.
After you've installed all required components, you can proceed to test loading an ad. Tap on Load Ad to send an ad request to the ad source's SDK. Once the ad request completes, an update saying whether the request succeeded or failed is presented.
If the request failed, check your console logs for messages from the SDK being tested.
If the request succeeded:
- For banner ads, the ad is shown inline.
For interstitial or rewarded ads, you can show the ad by tapping on Show Ad.
The ad opens in a new screen, for example:
When you return to the Ad Unit Details screen, the results of the last time you tested the ad in the ad units list screen are displayed. The successfully loaded ad sources are moved to the bottom of the list surfacing the ad sources needing further testing. Note that these results are only stored for the duration of the session.
Enabling testing in production
By default, the mediation test suite will only launch in debuggable builds. This is meant to prevent end users from inadvertently launching the test suite.
If you need to run the mediation test suite on a device once your app is in production, you should whitelist your device using the AdMob test device ID retrieved from your console logs prior to distributing the build.
To add the device to the whitelist, register the test device ID with the mediation test suite:
Java
MediationTestSuite.addTestDevice("33BE2250B43518CCDA7DE426D04EE231"); // An example device ID
Kotlin
MediationTestSuite.addTestDevice("33BE2250B43518CCDA7DE426D04EE231") // An example device ID