Integration Tests¶
Following are some test cases to validate the SDK integration by recieving beacon and geofence based interactions on the app.
Begin by setting up a Beacon and Geofence targetting campaign, that serves the notification when triggerred.
Testing Tips
-
Ensure that you don't have any Campaign and App
throttles
that would prevent the Campaign from being served repeatedly -
Wait 60 seconds between running consequtive tests
-
Ensure Bluetooth and Location Services are enabled on the device
-
Ensure the phone is connected to the Internet. Notifications will not be displayed without an Internet connection
-
When using multiple beacons, physically separate them during testing to avoid confusion. The app will generally interact with the most powerful beacon signal – not necessarily the closest beacon.
-
Third party tools such as iBeaconFinder can be used to determine all beacons in range of the mobile.
-
You will need to emulate an ‘exit event’ before the app will display another notification from the same beacon/location:
- Turn off bluetooth or move out of range of the beacon for 2-3 minutes before moving back in to range or turning on bluetooth.
- Move out of the geofence, or use a location emulator to change smartphone location.
-
Beacons and geofences can take up to 90 seconds to be detected by the app before an interaction is displayed
-
If additional locations or beacons are added to the app, it can take few hours for the app to become aware of them, depending on configuration:
- You can uninstall & reinstall the app to download the updated configuration
Beacon Testing
-
Install the Demo App or your Test App on the device
-
Activate Bluetooth and Location Services
-
Have the app running in the background
-
Place beacons in dispersed locations, at least 20m apart
- You can use the Locate Beacon app to emulate a beacon
-
Move to within a 1 meter radius of the beacon
-
Notification should appear on device within 60-120 seconds (Fig A)
-
Click the notification to open an in-app web view html page (Fig B)
-
Verify it against the expected result i.e. the Campaign you were expecting to see served
Geofence Testing
Simulated testing using Fake GPS
Fake GPS Location App is a 3rd party app developed by Lexa. The app can be downloaded directly from Google play store. While there are many Fake GPS apps available from the Google Play store that may serve our purpose, we have found the version from Lexa reliable enough for our testing.
In order to test the SDK, its often not practical to physically travel to various locations and test the Campaigns. This is where Fake GPS Location app comes in handy. Once this app is installed on your device, you can manually set the GPS location of the device without physically having to going to the location.
Steps
- Install the Fake GPS Location app from Google Play store on the test Android device
- Open the app and set the location by entering a specific address or interactively choosing the location on the map.
- Set the GPS location to the one that is defined in the Catalyst campaign to receive the corresponding push notification.