To test your Audience Network implementation, you can override all set-ups by sending test mode as true. This option allows you to test ads on your physical and simulator devices before releasing your app to the public. This approach allows you to test any type of ad. To be able to see a test ad, you will need to send both bid request and ad request with test mode as true.
To enable test override features, ensure that both bid request and ad requests are sent in test mode, this will override the rest of the signals and show a test ad. This is available through real devices and simulators as outlined below:
test:1 in the bid requestPlease note that simply using a test payload is not sufficient.
When integrating through Mediation Partners, you will need to go through the partner’s testing methods and turn test mode on. Here are a few examples of a few partner’s testing tools:
Unity / IronSource
Google Ad Manager
Google AdMob
Applovin
Adobe Air
For direct bidding integrations, not done through a mediation platform, you should send the test mode setting in the bid request test=1 where 0 = live mode, 1 = test mode
For the test ad to be shown, the test mode should be sent in the bid request as well as the ad request. Any inconsistencies between the calls will result in a no fill. The SDK changes need to be reviewed for all type of integrations (direct or through Mediation Partners).
If you are integrating with a Mediation Partner on Android, the AN SDK will be downloaded as part of the adapter package. Make sure the following class is imported:
import com.facebook.ads.AdSettings;
Once the class is imported, use either of the following methods from the SDK before loading the ad, there are 2 methods to achieve this:
Enable test mode globally
AdSettings.setTestMode(true);
After you have finished testing, you should clear the test device setting using this line of code:
AdSettings.clearTestDevices();
If you are integrating with a Mediation Partner on iOS, the AN SDK will be downloaded as part of the adapter package. Make sure the following class is imported:
#import <FBAudienceNetwork/FBAdSettings.h>
Use the following method from the SDK before loading the ad:
[FBAdSettings addTestDevice:[FBAdSettings testDeviceHash]];
For more information on how to set test devices consult the Test Your Implementation on a Test Device section.
After you have finished testing, you should clear the test device setting. Sample code:
[FBAdSettings clearTestDevice:[FBAdSettings testDeviceHash]];
Please note that test requests will not trigger real impressions in Monetization Manager.