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.
You can register a test device in the Apps tab’s Test mode sub-menu, using the test mode New device button.
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_testwith a value of ‘1’.
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:
Add the network in the Ad partners page.
Integrate the network SDK on the backend. Use our mediation integration tool to make this easy.
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:
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.
In the Apps page, navigate to the Test mode sub-menu and toggle to the Integration test view.
Select the name of the desired network from the drop menu of the test device.
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.
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.
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.
Once an active test is running, you will see the Test mode active green indicator on the top right corner of the page.
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:
If you are testing with networks, follow all the steps to enable a network for testing.
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:
Toggle to the Production test mode to serve live ads from the ad partner instance you specify. Your production mediation displays.
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.
Toggle the Enable switch next to the test device from which you want to serve live ads to your test device.
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.
How can we make this article better for you?
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.)