4. Integration Testing
4.1. Integration test instructions
This section explains how to enable test ads in the ads integration. It's important to enable test ads during development so you can click on them without charging the advertiser.
Here's how to get a test ad:
- Open a test request
- Enable test equipment
- Others
4.2. Open test request
TAdManager.init(this, new TAdManager.AdConfigBuilder()
// Whether to print advertising logs, the default is false; if set to true, logs will be printed, keywords ADSDK_M, ADSDK_N
.setDebug(false)
// Whether to request test ads, the default is false; if true, request test ads from the advertising platform, otherwise request formal ads from the advertising platform
.testDevice(false)
.build());
Important Reminder: Please be sure to change all the above parameter settings to false before going online to avoid confidential data leakage and dirty data affecting online statistics.
Enable log command
adb shell setprop log. tag. ADSDK DEBUG//Enable advertising log
adb shell setprop log.tag.AD_ NET_ LOG DEBUG//Enable ad network request log
4.3. Enable test device
If you want to conduct more rigorous testing of ads that look similar to the actual production environment, you can configure your device as a test device. Please refer to Add Test Device
4.4. Testing process
- Apply to the Hisavana platform for the official app ID and related advertising space ID. If you have any questions, please contact Operating Personnel.
- If you need to verify the test advertisement, please set the testDevice method parameter to true when opening the test request process. When enabling the test device process, keep the parameter settings before going online. Just Add Test Device.
- If you want to test third-party advertisements such as admob and facebook, first register on admob, facebook and other platforms, and then aggregate ad sources such as admob and facebook on the Hisavana platform.
- Be sure to change the testDevice method parameters to false before going online.
Reminder: When switching ad slots, because you need to update the ad slot configuration information, please clear the app cache data in time. Clear the cache operation in the application details, or execute the command adb shell pm clear package name
, otherwise an error may occur. The following error:
9009 ad unit is closed by operational staff
4.5. Integration Sample
Please download the integration sample code and refer to code integration.
4.6. Test advertising sources
Important Reminder: Please configure the third-party advertising ID on the Hisavana platform.