Skip to main content

4. Integration Testing

4.1. Integration Testing Instructions

This section explains how to enable test ads in ad integration. Enabling test ads during development is very important so you can click on them without charging advertisers.

Methods to obtain test ads are as follows:

  1. Enable test requests
  2. Enable test devices
  3. Others

4.2. Enable Test Requests

TAdManager.init(this, new TAdManager.AdConfigBuilder()
// Whether to print ad logs, default is false; if set to true, logs will be printed with keywords ADSDK_M, ADSDK_N
.setDebug(false)
// Whether to request test ads, default is false; if true, request test ads from ad platforms, otherwise request production ads
.testDevice(false)
.build());

Important Reminder: Before going live, be sure to change all the above parameters to false to avoid confidential data leakage and dirty data affecting online statistics.

Enable Log Commands

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 Devices

If you want more rigorous testing with ads that look similar to the actual production environment, you can configure your device as a test device. For specific procedures, please refer to Add Test Device

4.4. Testing Process

  1. Apply for official app id and related ad unit ids from the Hisavana platform. If you have questions, please contact Operations Personnel.
  2. If you need to verify test ads, set the testDevice method parameter to true when enabling test requests, or when enabling test devices, maintain pre-release parameter settings and simply Add Test Device.
  3. If you want to test third-party ads like Admob, Facebook, etc., first register on the Admob, Facebook and other platforms, then aggregate Admob, Facebook and other ad sources on the Hisavana platform.
  4. Before going live, be sure to change the testDevice method parameter to false.

Reminder: When switching ad units, due to the need to update ad unit configuration information, please clear the app cache data promptly. Clear cache operation is in app details, or execute the command adb shell pm clear package name, otherwise the following error may occur:

9009 ad unit is closed by operational staff

4.5. Integration Examples

Please download the integration example code and refer to the code for integration.

Mediation Demo

4.6. Test Ad Sources

Important Reminder: Please configure the third-party advertising ID on the Hisavana platform.

Advertising Source
Open Test Request
Enable Test Device
Other
Hisavana
AdmobUse test IDs provided by Google, reference link:
https://developers.google.com/admob/android/test-ads
Facebook
Applovin
Unity
Iron_sourceSet test device reference link:
https://developers.is.com/ironsource-mobile/android/integration-testing/#step-1
PangleUse test IDs provided by Pangle, reference link:
https://www.pangleglobal.com/zh/integration/How-to-Test-Pangle-Ads-with-Ad-ID
Error code reference link:
https://www.pangleglobal.com/integration/error-code
InmobiSet test device reference link:
https://support.inmobi.com/monetize/getting-started#test-your-integration
MintergralTest id reference:
https://dev.mintegral.com/doc/index.html?file=sdk-m_sdk-android&lang=cn
Search for Test ID
Adcolony
VungleHow to use test mode and test devices, reference link:
https://support.vungle.com/hc/zh-cn/articles/360036210192-%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E6%B5%8B%E8%AF%95%E6%A8%A1%E5%BC%8F%E5%92%8C%E6%B5%8B%E8%AF%95%E8%AE%BE%E5%A4%87#-test-mode-0-1
YandexTest id reference:https://ads.yandex.com/helpcenter/zh/dev/android/demo-blocks
BigoTest id reference:https://www.bigossp.com/guide/sdk/android/clientBidding