Mediation Test Suite Beta

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 Unity app. The first step is integrating the tool into your app.

Prerequisites

Installation

Download Mediation Test Suite

After downloading the Mediation Test Suite, with your Unity project open, double-click the Unity package and import the files into your project.

Once this is complete, you have integrated the GoogleMobileAdsMediationTestSuite into your Unity project.

Launching the Mediation Test Suite

To include the test suite into a script, you must first add the following imports:

using GoogleMobileAdsMediationTestSuite.Api;

Next, call MediationTestSuite.Show() with your AdMob App ID as the parameter to launch the test suite. You can find the App ID for your app in the AdMob UI.

private void ShowMediationTestSuite()
{
    #if UNITY_ANDROID
    string appId = "<Your Android application ID>";
    #elif UNITY_IPHONE
    string appId = "<Your iPhone application ID>";
    #else
    string appId = "unexpected_platform";
    #endif

    MediationTestSuite.Show(appId);
}

The Unity plugin provides a convenient wrapper to enable you to easily integrate and launch the test suite from the Unity environment. Once the test suite is launched, it looks the same as the iOS and Android test suites. Follow these respective guides for help navigating the test suite.

Knowing when the Test Suite is dismissed

If you want to be notified when the test suite is dismissed, you can register a delegate to the MediationTestSuite.OnMediationTestSuiteDismissed event handler.

public void Start()
{
    MediationTestSuite.OnMediationTestSuiteDismissed += this.HandleMediationTestSuiteDismissed;
}

public void HandleMediationTestSuiteDismissed(object sender, EventArgs args)
{
    MonoBehaviour.print("HandleMediationTestSuiteDismissed event received");
}

One practical use case for this event is to know when to resume your game.

Send feedback about...

Google Mobile Ads SDK for Unity
Google Mobile Ads SDK for Unity
Need help? Visit our support page.