Test Suite

Last Updated on: 10 Nov, 2023

Introduction

The Meson Test Suite is a collection of test cases that allows you to check whether your app is properly set up and ready to mediate using Meson mediation. It is an essential tool for you to verify:

  • Selected mediated networks are integrated successfully,

  • Adlines are configured correctly,
  • Ad units are setup accurately and running as expected,
  • Serves Ads successfully,
  • User data is set as expected.

IMPORTANT

After using the Test Suite, ensure you do not add it to the production.

Prerequisites

  • You must include the TestSuite dependencies compatible with Meson SDK.
  • You must initialize the Meson SDK with the correct App ID.

Integrate Test Suite

Follow the instructions below to integrate the Test Suite.

  1. On the Meson UI, click Testing from the left navigation and register your device ID [GAID] on the Testing page.

    Note

    You should use the Device ID to integrate the Test Suite, as the support for the emulator is unavailable. It takes 15 minutes for the test device registration to reflect.

  2. After the test, remove the Device ID from the Meson UI and proceed with the integration.
  3. Follow the instructions below to add TestSuite to your project.

Gradle

Add the following code to your app's build.gradle file inside the repositories section:

allprojects {  
  repositories {  
    mavenCentral()  
    . . .  
  }  
}

On successful synchronization, you’ll be able to add any Android dependency hosted on the mavenCentral repository to build.gradle. Add the Meson SDK to your build.gradle dependencies:

implementation 'ai.meson.sdk:meson-testsuite:1.0.0-beta14'

Manual

  1. Click here to download the Test Suite.
  2. Copy the .AAR files to your application module’s libs/directory.

Add Dependencies

Add the following code to your build.gradle file under the dependencies section.

implementation fileTree(dir: 'libs', include: ['*.aar'])

Mandatory Dependencies

implementation 'androidx.core:core-ktx:1.7.0' 
implementation 'androidx.appcompat:appcompat:1.2.0' 
implementation 'com.google.android.material:material:1.2.1' 
implementation 'androidx.constraintlayout:constraintlayout:2.1.1' 
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.1' 
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' 
implementation 'com.squareup.picasso:picasso:2.8' 
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1' 
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'

Enable View and Data Binding

Use the following code to enable view and data binding:

android {  
 buildFeatures { 
 viewBinding true 
 dataBinding true  
 } 
}

Enable Jetifier in gradle.properties File

If you're using AndroidX, use the following code to enable the Jetifier in gradle.properties file.

android.enableJetifier=true

Launch Test Suite

Use the following code to launch the Test Suite.

Kotlin

MesonSdk.presentTestSuite()

Java

MesonSdk.Companion.presentTestSuite();

Test Network integration

Testing helps to validate the network configuration on the Meson UI and ensures the correct integration of network SDK and adapters. Before you start, ensure that you have already configured the networks on the Meson UI (Networks tab). Follow the instructions below:

  1. On the Test Suite UI, select Mediated Networks Integration, and click Review. You can view the list of enabled networks.

  2. From the list of all configured networks, select your desired one. After you select the network, the Test Suite UI displays the Integration Status based on the network type (SDK or S2S network):

    • Configured on Platform: Displays whether you have set up the network credentials for the network.
    • Credentials Found: Displays whether you have set up all the required app credentials on Meson UI for the network.
    • SDK Adapter <version> found: It is applicable for SDK networks and displays whether you have added the correct adapter dependencies. If you have added incompatible adapters, the Test Suite displays an error.
    • SDK integrated: It is applicable for SDK networks and assists you in testing correct SDK dependencies. If not set up, it would be disabled.
  1. Ensure that all the checkpoints in the Integration Status are green. A red cross indicates issues at that specific checkpoint.

Test Ad Lines

Test your ad lines' setup on the Meson UI and the corresponding network UI.

Ensure you have enabled the line items with credentials for the networks and auction to be set up on the Meson UI. You must also set up the corresponding placements on the Network UI.

  1. On the Mediated Networks Integration screen, select the Mediated Network, which displays the list of all the configured ad lines.
  2. Select the ad lines to be verified.
  3. Click Request.

Here is a video for your ease:

Test Ad Units

Test your ad unit's whole auction workflow and ensure effectiveness. Ensure that you have set up the ad unit and ad lines on the Meson UI.

  1. Click Review under the Ad Units section of the Test Suite UI, and it displays all the enabled ad units' set up for the app.
  2. Select the desired ad unit.
  3. Click Request.

Here is a video for your ease:

Verify User Data

On the Test Suite UI, select User Data Selection, which displays all the user data passed to Meson SDK.

Supported Networks

Network Test Mode Supported
Xandr Yes
MobileFuse Yes
Magnite Yes
Pubmatic Yes
InMobi Audience Bidding Yes
Vungle Yes
AdColony Audience Bidding Yes
Mintegral Yes
Index No
EngageBDR No
PubNative No
Liftoff No
PulsePoint No
ScaleMonk No
Luna Media No
Unruly No
Sonoboi No
SpotX No
Criteo No
AdMob Passive Bidder
Unity Passive Bidder
GAM Passive Bidder
Applovin Passive Bidder
IronSource Passive Bidder

For Passive bidders, you must enable the test mode from their respective portals.

DISCLAIMER

It is recommended that you use the networks the Test Suite supports for your ads to have a seamless experience. Your experience may not be as expected when you use a network that doesn't support the test mode.