2018-03-22 13:54:06 +03:00
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE - RUN doctoc TO UPDATE -->
**Contents**
* [Test plan for this add-on ](#test-plan-for-this-add-on )
* [Manual / QA TEST Instructions ](#manual--qa-test-instructions )
* [Preparations ](#preparations )
* [Install the add-on and enroll in the study ](#install-the-add-on-and-enroll-in-the-study )
* [Expected User Experience / Functionality ](#expected-user-experience--functionality )
* [Do these tests ](#do-these-tests )
* [Design ](#design )
* [Note: checking "sent Telemetry is correct" ](#note-checking-sent-telemetry-is-correct )
* [Debug ](#debug )
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2018-02-15 14:39:58 +03:00
# Test plan for this add-on
2017-11-01 23:20:07 +03:00
2018-02-15 14:39:58 +03:00
## Manual / QA TEST Instructions
### Preparations
2018-02-15 13:54:32 +03:00
2018-02-23 02:24:09 +03:00
* Download a Release version of Firefox
2018-02-15 13:54:32 +03:00
2018-02-15 14:39:58 +03:00
### Install the add-on and enroll in the study
2018-02-15 13:54:32 +03:00
2018-02-15 14:39:58 +03:00
* (Create profile: < https: // developer . mozilla . org / Firefox / Multiple_profiles > , or via some other method)
2018-02-15 20:34:12 +03:00
* Navigate to _about:config_ and set the following preferences. (If a preference does not exist, create it be right-clicking in the white area and selecting New -> String or Integer depending on the type of preference)
2018-02-15 14:39:58 +03:00
* Set `extensions.legacy.enabled` to `true` . This permits the loading of the embedded Web Extension since new versions of Firefox are becoming restricted to pure Web Extensions only.
2018-02-28 11:03:28 +03:00
* Set `extensions.button_icon_preference.variation` to `kitten` (or any other study variation/branch to test specifically)
* Go to [this study's tracking bug ](tbd: replace with your study's launch bug link in bugzilla ) and install the latest signed XPI
2018-02-15 13:54:32 +03:00
2018-02-15 14:39:58 +03:00
## Expected User Experience / Functionality
2018-02-15 13:54:32 +03:00
2018-02-15 14:39:58 +03:00
Users see:
2018-02-15 13:54:32 +03:00
2018-02-15 20:34:12 +03:00
* an icon in the browser address bar (webExtension BrowserAction) with one of 3 images (Cat, Dog, Lizard)
2018-02-15 13:54:32 +03:00
2018-02-15 14:39:58 +03:00
Clicking on the button:
2018-02-15 13:54:32 +03:00
2018-02-15 20:34:12 +03:00
* changes the badge
* sends telemetry
2018-02-15 13:54:32 +03:00
2018-02-15 14:39:58 +03:00
ONCE ONLY users see:
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
* a notification bar, introducing the featur
* allowing them to opt out
2017-11-01 23:20:07 +03:00
2018-02-15 14:39:58 +03:00
Icon will be the same every run.
2017-11-01 23:20:07 +03:00
2018-02-15 14:39:58 +03:00
If the user clicks on the badge more than 3 times, it ends the study.
2017-11-01 23:20:07 +03:00
2018-02-15 14:39:58 +03:00
### Do these tests
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
1. UI APPEARANCE. OBSERVE a notification bar with these traits:
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
* Icon is 'heartbeat'
* Text is one of 8 selected "questions", such as: "Do you like Firefox?". These are listed in [/addon/Config.jsm ](/addon/Config.jsm ) as the variable `weightedVariations` .
* clickable buttons with labels 'yes | not sure | no' OR 'no | not sure | yes' (50/50 chance of each)
* an `x` button at the right that closes the notice.
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
Test fails IF:
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
* there is no bar.
* elements are not correct or are not displaye
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
2. UI functionality: VOTE
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
Expect: Click on a 'vote' button (any of: `yes | not sure | no` ) has all these effects
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
* notice closes
2018-02-15 23:15:18 +03:00
* add-on uninstalls
2018-02-15 20:34:12 +03:00
* no additional tabs open
* telemetry pings are 'correct' with this SPECIFIC `study_state` as the ending
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
* ending is `voted`
* 'vote' is correct.
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
3. UI functionality: 'X' button
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
Click on the 'x' button.
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
* notice closes
2018-02-15 23:15:18 +03:00
* add-on uninstalls
2018-02-15 20:34:12 +03:00
* no additional tabs open
* telemetry pings are 'correct' with this SPECIFIC ending
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
* ending is `notification-x`
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
4. UI functionality 'close window'
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
1. Open a 2nd Firefox window.
2. Close the initial window.
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
Then observe:
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
* notice closes
2018-02-15 23:15:18 +03:00
* add-on uninstalls
2018-02-15 20:34:12 +03:00
* no additional tabs open
* telemetry pings are 'correct' with this SPECIFIC ending
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
* ending is `window-or-fx-closed`
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
5. UI functionality 'too-popular'
2017-11-01 23:20:07 +03:00
2018-02-15 20:34:12 +03:00
* Click on the web extension's icon three times
* Verify that the study ends
* Verify that sent Telemetry is correct
* Verify that the user is sent to the URL specified in `addon/Config.jsm` under `endings -> too-popular` .
2018-02-15 14:39:58 +03:00
2018-03-10 00:25:37 +03:00
### Design
Any UI in a Shield study should be consistent with standard Firefox design specifications. These standards can be found at [design.firefox.com ](https://design.firefox.com/photon/welcome.html ). Firefox logo specifications can be found [here ](https://design.firefox.com/photon/visuals/product-identity-assets.html ).
2018-02-15 14:39:58 +03:00
### Note: checking "sent Telemetry is correct"
* Open the Browser Console using Firefox's top menu at `Tools > Web Developer > Browser Console` . This will display Shield (loading/telemetry) log output from the add-on.
2017-11-01 23:20:07 +03:00
2018-02-15 14:39:58 +03:00
See [TELEMETRY.md ](./TELEMETRY.md ) for more details on what pings are sent by this add-on.
2017-11-01 23:20:07 +03:00
2018-02-15 14:39:58 +03:00
## Debug
2017-11-01 23:20:07 +03:00
2018-02-15 14:39:58 +03:00
To debug installation and loading of the add-on:
* Open the Browser Console using Firefox's top menu at `Tools > Web Developer > Browser Console` . This will display Shield (loading/telemetry) and log output from the add-on.
2018-02-15 23:15:18 +03:00
Example log output after installing the add-on:
2018-02-15 14:39:58 +03:00
```
install 5 bootstrap.js:125
startup ADDON_INSTALL bootstrap.js:33
info {"studyName":"mostImportantExperiment","addon":{"id":"template-shield-study@mozilla.com","version":"1.0.0"},"variation":{"name":"kittens"},"shieldId":"8bb19b5c-99d0-cc48-ba95-c73f662bd9b3"} bootstrap.js:67
1508111525396 shield-study-utils DEBUG log made: shield-study-utils
1508111525398 shield-study-utils DEBUG setting up!
1508111525421 shield-study-utils DEBUG firstSeen
1508111525421 shield-study-utils DEBUG telemetry in: shield-study {"study_state":"enter"}
1508111525421 shield-study-utils DEBUG getting info
1508111525423 shield-study-utils DEBUG telemetry: {"version":3,"study_name":"mostImportantExperiment","branch":"kittens","addon_version":"1.0.0","shield_version":"4.1.0","type":"shield-study","data":{"study_state":"enter"},"testing":true}
1508111525430 shield-study-utils DEBUG startup 5
1508111525431 shield-study-utils DEBUG getting info
1508111525431 shield-study-utils DEBUG marking TelemetryEnvironment: mostImportantExperiment
1508111525476 shield-study-utils DEBUG telemetry in: shield-study {"study_state":"installed"}
1508111525477 shield-study-utils DEBUG getting info
1508111525477 shield-study-utils DEBUG telemetry: {"version":3,"study_name":"mostImportantExperiment","branch":"kittens","addon_version":"1.0.0","shield_version":"4.1.0","type":"shield-study","data":{"study_state":"installed"},"testing":true}
1508111525479 shield-study-utils DEBUG getting info
1508111525686 shield-study-utils DEBUG getting info
1508111525686 shield-study-utils DEBUG respondingTo: info
init kittens background.js:29:5
```