How to test your app with the SDK
  • 08 Feb 2024
  • Dark
    Light

How to test your app with the SDK

  • Dark
    Light

Article Summary

What should be tested

Testing, as you probably know, it's an important step to ensure quality application. First, let's discuss on what you should focus on when testing your app with the SDK:

  1. Challenge - you should simulate a challenge in different scenarios in your app and verify that the challenge is shown correctly to the user.
  2. Stat your app without internet connection - in the mobile world internet connection is sometimes not available. Make sure that your app behave the as you except when you start it without internet connection and have a connection later.

How to simulate a challenge

There are 2 ways to simulate a challenge in your app:

  1. Enforcement Verification
  2. Doctor App

Using the Testing tool in the Portal

  1. Open the Testing tool in the portal.
  2. Retrieve the VID
    1. Using the VID Extractor
      1. Click on the Find your VID button.
      2. Enter your device's public IP.
      3. Select the relevant session.
    2. Using the SDK's API
      1. Use the PerimeterX/vid(forAppId:) function to get VID.
      2. Enter the value in the VID field.
  3. Click on the Start testing button.
  4. In your app, trigger an URL request to your server.
  5. You should get a challenge.

Using the Doctor App

  1. Start the SDK with the Doctor App enabled.
  2. In the "instruction screen", press the "x" button.
  3. Navigate in your app to the place you wish to get a challenge (don't make the URL request yet).
  4. Shake the device to bring the Doctor App back.
  5. Continue to the "test selection screen" and start the relevant test.
  6. In your app, trigger an URL request to your server.
  7. You should get a challenge.

Was this article helpful?

What's Next