Test Plan
The following is a test procedure which allows you to verify that your Rover integration is complete and working.
1. Installation and Initialization
1.1 Validate Correct Token
Using Charles, inspect the network traffic and ensure the proper account token
is being used. You can find this in the x-rover-account-token
header. The
correct value can be found in the Rover Settings app labelled “SDK Token”.
2. Deep Links
Rover deep links use a specific URL scheme assigned to your Rover account. You
can find this in the Rover Settings app
labelled “URL Scheme”. Throughout this section of the test plan we will use
rv-my-app
when constructing example deep links. Any time you see this value
you should replace it with the correct URL scheme for your app.
Note that typing your deep links into Chrome or another web browser will likely not work: it will just search for your deep link on Google. As a workaround, consider installing Firefox for Android and typing or pasting the link into its address bar.
Alternatively, if you have a workstation with the Android debug tools installed, you can also use:
adb shell am start -W -a android.intent.action.VIEW -d <deep link>
2.1 Settings Screen Deep Link
Visit rv-my-app://presentSettings
on your device.
It should prompt to open the URL in your app. The app should open and display the Rover Settings screen.
2.2 Experience Deep Link
Open an Experience in the Rover Experiences app, and click on the chain/link icon on the right side of the grey top bar. In the dialog box find experience’s Deep Link.
Open the link on your device. It should prompt to open the URL in your app. The app should open and display the experience associated with the URL.
2.3 Notification Center Deep Link
Visit rv-my-app://presentNotificationCenter
on your device. It should prompt
to open the URL in your app. The app should open and display the Rover
Notification Center.
3. Universal Links
Rover Universal Links use a specific domain assigned to your Rover account. You
can find this in the Rover Settings app
labelled “Associated Domain”. Throughout this section of the test plan we will
use my-app.rover.io
when constructing example Universal Links. Any time you
see this value you should replace it with the correct associated domain for your
app.
3.1 App Links File
After following the Site
Association
instructions on the Rover developer website, Rover will host an App
Links
Digital Asset Links
JSON
for you. You can access the file at your associated domain and the path expected
by Google. E.g. https://my-app.rover.io/.well-known/assetlinks.json
. View
your association file in the browser and ensure the package_name
value is
correct as outlined on the Rover developer website.
3.2 Experience Universal Link
Open an Experience in the Rover Experiences app, click the chain/link icon on the right side of the grey top bar, copy the Published Web Link and paste the copied URL to the Chrome/browser address bar on your device. It should directly open the Experience in the app. Note that it must not prompt you to choose between the app and the web browser, the so-called Disambiguation Dialog. If it does, that means App Links verification is not working correctly.
In the event you see the disambiguation dialog, use adb shell dumpsys package
domain-preferred-apps
to get a dump of all the App Links URLs on your device.
Search for the Package:
line with your app’s application id, and underneath
ensure that the domain’s status is ‘Always’ and not ‘Ask’.
4. Syncing Data
4.1 Foreground Syncing
Ensure your device is connected to Charles and start in the terminated state
(app swiped away in the task switcher). Open the app to initiate the app
initialization process. Watch the network traffic and look for a query to
Rover’s GraphQL API named Sync
. Put the app in
the background by pressing the home button (or on newer Android P devices using
the Home gesture) and open it again. You should see the same call made again.
5. Events
5.1 Foreground Flushing
With your device connected to Charles, open your app and wait 30 seconds. You
should see the trackEvents
mutation being called on Rover’s GraphQL
API.
5.2 Background Flushing
With your device connected to Charles, open your app and then immediately return
to the home screen. You should see a trackEvents
mutation being called on
Rover’s GraphQL API.
6. Push Notifications
6.1 Push Token
Open the Settings view in your app via the deep link described in 2.1. Take note of your device identifier. Open the Rover Audience app in a browser and find your device. Make sure your device has a valid push token assigned to it.
6.2 Push
Create a scheduled notification campaign. With your app in the background, press the Send a Test button and select your test device. Verify the push notification is received.
6.3 Rich Media
Create a scheduled notification campaign. Add an attachment to the notification. Press the Send a Test button and select your test device and verify the push notification is received and the image is attached.
6.4 Open Experience Tap Behaviour
Create a scheduled notification campaign with the tap behavior set to “Present an experience”. With your app in the foreground, with the notification centre area displayed if it has one, press the Send a Test button and select your test device. Tap the push notification when it is received. Verify the experience is displayed.
7. Location
7.1 Location Permissions
Open your app, and ensure that you’ve opted into the Location Permission. Verify in Android Settings → Apps → Your App → that Location Permission is enabled.
7.2 Location Updates
With your device connected to Charles, open your app and then immediately return
to the home screen. You should see a trackEvents
mutation being called on
Rover’s GraphQL API. Look for the location
key inside variables
→events[0]
→device
and ensure that it isn’t null, and
had a latitude and longitude appropriate to your current location.
8. User Info
The User Info section of the Rover documentation explains how you can attach properties about the current user to the device which will show up in the Audience app and can be used for segmentation or personalization.
8.1 Setting User Info
Perform an action in your app which causes your app to set some user info
properties on the Rover SDK. Perform an event flush with your device connected
to Charles. Assuming 5.2 Background
Flushing
is working correctly, the easiest way to perform an event flush is to put your
app in the background. Watch the network traffic in Charles and look for the
trackEvents
mutation. The JSON payload contains an array of events
. Inspect
one or more of the events and ensure it contains a device.userInfo
property.
Ensure the value of this property matches the expected user info properties set
by your app.
9. Ticketmaster
9.1 Ticketmaster Sign In
Open the app and sign-in to Ticketmaster through the Presence SDK. After you’ve
signed in, perform a sync with your device connected to Charles. Assuming 4.1
Foreground
Syncing
is working correctly, the easiest way to perform a sync is to just open the app.
Watch the network traffic in Charles and look for a query to Rover’s GraphQL
API named Sync
and ensure that the request
contains a value for ticketmasterHostMemberID
or ticketmasterMemberID
.
Ensure the HTTP response body includes a value for data.ticketmaster
.
9.2 Ticketmaster Credentials Persisted
Terminate the app by using the Force Stop option in app info. Re-open the app, and confirm that the same fields and response body results are present in the subsequent Sync request.
9.3 Ticketmaster Sign Out
After completing step 9.1, verify that the ticketmaster fields disappear from subsequent sync requests after signing out of ticketmaster in the app.