This test plan shows how to test Exposure Notfications (EN) in different scenarios and environments.
- Accessing EN framework on device
- Test exposed state on the same date without notification (as developer)
- Test exposed state with notification (as end user)
- Troubleshooting
Device Settings > Google > COVID-19 Exposure Notifications
Device Settings > Privacy > Bluetooth > COVID-19 Exposure Logging
This test could be applied for all environments: Android + Android, iOS + iOS, Android + iOS.
Note: Because the server doesn't return Temporary Exposure Keys (TEKs) for current date (https://github.com/CovidShield/server/blob/master/pkg/server/retrieve.go#L83), for this test to work, the server needs to remove that restriction. This is possible if you run server locally or modify production server.
- Run server locally, set
SUBMIT_URL
andRETRIEVE_URL
in.env
accordingly. - Build and run the app on two devices.
- Go through onboarding flow on both devices. Make sure EN and bluetooth are turned on properly.
- For Android only, see
Debug mode
section below. - Disable and re-enable
COVID-19 Exposure Notifications
(Android) orCOVID-19 Exposure Notifications
(iOS). This forces the EN framework to re-scan Bluetooth Random IDs. - On 1st device:
- Get OneTimeCode from server.
- Enter the code to set the device to positive.
- Verify that the positive state shows as expected.
- On 2nd device:
- If you have
Test Mode
:- Press on app logo or swipe right to left to show
Test Mode
. - Press on
Clear exposure history and run check
. This will force the app to re-fetch all TEKs from the last 14 days. - Expect to see the app changes to exposed state
You have possibly been exposed to COVID-19
.
- Press on app logo or swipe right to left to show
- If you don't have
Test Mode
:- Clear data or re-install the app.
- Go through onboarding flow.
- Expect to see the app changes to exposed state
You have possibly been exposed to COVID-19
.
- If you uninstall the app and re-install, expect to see exposed status show immediately after onboarding flow.
- If you have
This test runs everything on production. That means you only receive notification on the next one or two dates. Same date testing doesn't work for this scenario. Test mode
cannot be used in this scenario.
- Build and run the app on two devices.
- Go through onboarding flow on both devices. Make sure EN and bluetooth are turned on properly.
- For Android only, see
Debug mode
section below. - Keep two devices approximately close together for about 5 minutes.
- On 1st device:
- Get OneTimeCode from server.
- Enter the code to set the device to positive.
- Verify that the positive state shows as expected.
- Wait for next date (UTC timezone).
- On 1st device:
- Expect to receive reminder notification about uploading new RANDOM_IDs.
- Submit new RANDOM_IDs.
- On 2nd device:
- Open app.
- Expect the app in still in monitoring state.
- Wait for next date (UTC timezone).
- On 1st device:
- Expect to receive reminder notification about uploading new RANDOM_IDs.
- Submit new RANDOM_IDs.
- On 2nd device:
- Expect to receive exposed notification saying
You have possibly been exposed to COVID-19
. - Tap on notification will open the app.
- Expect to see exposed status showing in the app.
- If you uninstall the app and re-install, expect to see exposed status show immediately after onboarding flow.
- Expect to receive exposed notification saying
- Build and run the app on two devices.
- Go through onboarding flow on both devices. Make sure EN and bluetooth are turned on properly.
- For Android only, see
Debug mode
section below. - Keep two devices approximately close together for about 5 minutes.
- Wait for next date (UTC timezone).
- On 1st device:
- Get OneTimeCode from server.
- Enter the code to set the device to positive.
- Verify that the positive state shows as expected.
- On 2nd device:
- Open app.
- Expect the app in still in monitoring state.
- Wait for next date (UTC timezone).
- On 1st device:
- Expect to receive reminder notification about uploading new RANDOM_IDs.
- Submit new RANDOM_IDs.
- On 2nd device:
- Expect to receive exposed notification saying
You have possibly been exposed to COVID-19
. - Tap on notification will open the app.
- Expect to see exposed status showing in the app.
- If you uninstall the app and re-install, expect to see exposed status show immediately after onboarding flow.
- Expect to receive exposed notification saying
Debug mode
is only available for developer email that has been whitelisted by Google to test EN. With this mode, you can use any APP_ID / Package Name that have been whitelisted by Google, ex: com.google.android.apps.exposurenotification
to test the framework.
- If you have
Debug mode
, make sureBypass app signature check
toggle are ENABLED. - If you don't, you have to use app with APP_ID / Package Name that has been whitelisted with correct signed key.
On devices that haven't been using any apps supporting Google / Apple Exposure Notifications before, the device hasn't been generating / collecting Temporary Exposure Keys (TEKs) yet. So, there is no key to submit to server after you enter OneTimeCode. In this case, the only option is to come back the next date and test again. Make sure you EN and bluetooth are enabled properly.
There are two types of notification:
Reminder notification
: it's about uploading new RANDOM_IDs and uses device timer.Exposed notification
: it's about user has been exposed to COVID-19 and uses UTC timezone.