Mediation Test Mode

Use mediation test mode to easily enable testing in your app without disturbing your production waterfall.

Understand Test Mode

We have built test mode into the MoPub Publisher UI, where you can register test devices, and enable test mode only for those devices, and only for the networks you want to test. You can also use it to test Marketplace line items. You can use test mode for both integration testing and production testing.

Integration Testing with Test Mode

Test mode means you no longer risk sending test ads to your users should you forget to turn off test mode. It also means we have removed the complications inherent in temporarily altering your waterfall, replacing your production ad units with our test ad units, or enabling and disabling networks in your production waterfall.

Managing the process entirely in the Publisher UI makes it easy to test your networks, as well as MoPub Marketplace. Mediation test mode also facilitates integrating new networks, and updating to each new release of the MoPub SDK and of network SDKs.

Production Testing with Test Mode

A live test uses your production waterfall, and you can enable specific line items to test using live ads. With MoPub mediation test mode, you don’t need to change anything in your production waterfall to test; you can simply turn production line items off and on for testing in this test mode.

Production testing is useful in various situations; for example, some networks don’t support test mode, and so to test, you must test in production. Live ads are a real representation of how an ad would function and it is useful to test them in a very limited quantity from time to time.

Test Mode Logistics

A test device can only be assigned to one ad unit per format at a time per user. You can register test devices in two ways:

  • You can register a test device in the Account settings page.

    Test Mode Account Settings

  • You can register a test device in the Apps tab’s Test mode sub-menu, using the test mode New device button.

    Test Mode New Device

When an ad unit is in test mode, you can detect it in two ways:

  • Publisher UI: In the Test Mode tab, the Test mode active visual indicator at the upper right corner of the page.

  • Ad response payload: Whenever a test device requests an ad for that ad unit, the ad response payload contains the field mediation_test with a value of ‘1’.

Integration Testing

You don’t have to be in production with a network to test with it; the network doesn’t have to appear in your Mediation tab yet. Our mediation test mode is specifically geared to let you test with networks you’re about to integrate, as well as networks that are already in your waterfall.

Set Up an Integration Test

To prepare for an integration test with a network:

  1. Add the network in the Ad partners page.

  2. Integrate the network SDK on the backend. Use our mediation integration tool to make this easy.

  3. Register test devices either in the in the Account settings page or in the Apps tab’s Test mode sub-menu, using the test mode New device button.

  4. To test Advanced Bidding, make sure that the network you test with supports Advanced Bidding. All the Advanced Bidding networks in the Self Serve Ad partners page are supported Advanced Bidding networks.

Run an Integration Test

After completing the setup steps in the previous section, you can now perform an integration test. To test with a network using network test IDs:

  1. Consult the network-specific article under the Mediation section of our docs. Each network-specific article has a section called Test an Ad, with information about how (or if) that network supports test mode, and what you must do to enable it on the network side.

  2. In the Apps page, navigate to the Test mode sub-menu and toggle to the Integration test view.

  3. Select the name of the desired network from the drop menu of the test device.

  4. Enter the network’s equivalent of line item IDs for the test line items you created on the network side for this purpose (you did this in the first step of these instructions), along with the network-specific key required for testing.

  5. For each ad format you have integrated, enter that network’s test line item ID and other key information, such as App ID or SDK Key. Note that different ad networks have different terminology for line items, such as zone or placement, etc. Ad networks also differ in their key information (some have an Application ID; others have and SDK Key, etc.). Our UI displays each network’s specific terminology.

  6. Enable the network whose test ads you want to serve to your device by toggling the Enable switch next to the desired test device. You can only enable one network and one device at a time.

Test Mode Integration Test

Once an active test is running, you will see the Test mode active green indicator on the top right corner of the page.

Production Testing

The production test allows only the one specified production ad partner instance to be used for this ad unit, provided that test mode is active for your device.

Set Up a Production Test

Preparation for production testing is very similar to integration testing, and most of the instructions for integration tests apply:

  1. You must still register a test device as described in this article, either in the Account settings page or in the Apps tab’s Test mode sub-menu, using the test mode New device button.

  2. If you are testing with networks, follow all the steps to enable a network for testing.

  3. Finally, enable an ad unit for testing, but notice that the Test Mode page has both an Integration test and a Production test mode.

Run a Production Test

To run a production test:

  1. Toggle to the Production test mode to serve live ads from the ad partner instance you specify. Your production mediation displays.

  2. Enable the instance you want to test by sending them live ads. You can find the instance by specifying the Ad Partner and then selecting from Instance drop menu.

  3. Toggle the Enable switch next to the test device from which you want to serve live ads to your test device.

Test Mode Production Test

Similar to integration testing, once an active test is running, you will see the Test mode active green indicator on the top right corner of the page.


Last updated August 25, 2021

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2021 MoPub (a division of Twitter, Inc.)