QA/Desktop Firefox/Telemetry Experiments
Short Summary
This wiki page will guide users on how to install a local telemetry experiment staging server which will install experiments that are saved as addons. When installed correctly, launching Firefox will contact the staging sever, install the experiment and create a "Experiments" category under about:addons. The experiments will also be listed under about:support.
Quick Notes:
- This guide assumes that you're using either OSX or Linux. I don't recommend trying this on Windows as you'll likely run into a few issues and spend more time debugging than installing a new distribution on a VM
- Telemetry Experiments is still being developed so some things might have changed. Please let me know if that's the case or you can edit the wiki yourself!
Setup & Installation
- The first step is to run the OSX m-c bootstrap, the command can be found in the link below: (right below One-Line Setup (Try This First!))
- Clone the telemetry experiment server using the following command:
- Once cloned, a directory named telemetry-experiment-server should have been created
- Switch into the telemetry-experiment-server directory
- Checkout the latest branch using the following command:
- hg checkout <checkout branch #>, Example: hg checkout 42b785b60c60
- Once you've checked out the latest branch, will need to install genshi as it's a prerequisite for building our local server
- To install genshi simply type pip install Genshi in the terminal and follow the onscreen directions
Once you've gone through all of the above steps, the next step is to create our local server using build.py
- Open build.py with your favorite text editor, vim was used in this guide (vim build.py)
- Change: 'xpiURL': to 'http://localhost:8080/experiment.xpi'
- Change: 'channel': to the channel that you're currently testing in (nightly, aurora, beta, release)
- Once you've made the appropriate changes, save the file and run the following command:
- python build.py <your directory name> <"base URL"> Example: python build.py exp1 "http://localhost:8080 (should create a directory named exp1)
- Switch into the directory that we've just created, in the above example we used exp1 and run the following command:
- python -m SimpleHTTPServer 8080 (you should now be able visit: http://localhost:8080
Preferences
The following browser preferences need to be created/modified to get telemetry experiments working:
- In the Firefox URI field, type in about:config and click on I'll be careful, I promise!
- Change: "experiments.enabled" = true
- Change: "experiments.logging.level" = 0
- Change: "experiments.manifest.cert.checkAttributes" = false
- Change: "experiments.manifest.uri" = http://localhost:8080/firefox-manifest.json (this might differ depending on what you set your sever to earlier)
- Chnage: "experiments.force-sample-value" = 0.25 (this value needs to match the sample: value found in firefox-manifest.json
Logging
You'll need to enable the following logging feature under Developer Tools:
- Toggle the Developer Tools
- Australis: Click the Open Menu and than click on Developer then Toggle Tools
- Once you have the Developer Tools opened, select Settings (gear icon)
- Under Advanced Settings, you'll need to enable the following option:
- Select: Enable chrome and addon debugging
Note: Depending on the channel you're currently on, it may appear as Enable chrome debugging
Once you have enabled chrome and addon debugging you should start seeing log entries appearing under the Browser Console. A quick way to ensure that logging is working correctly:
- Go into about:config
- Enable/Disable the experiments.enabled preference (You'll get similar entries as shown in the image below)
1397078500406 Browser.Experiments.Experiments TRACE Experiments #0::_toggleExperimentsEnabled(false)
1397078500406 Browser.Experiments.Experiments TRACE Experiments #0::disableExperiment()
1397078500406 Browser.Experiments.Experiments TRACE Experiments #0::_run
1397078500407 Browser.Experiments.Experiments TRACE Experiments #0::_main iteration
1397078500407 Browser.Experiments.Experiments TRACE Experiments #0::_evaluateExperiments
1397078500411 Browser.Experiments.Experiments TRACE Experiments #0::_main finished, scheduling next run
1397078501152 Browser.Experiments.Experiments TRACE Experiments #0::_toggleExperimentsEnabled(true)
1397078501152 Browser.Experiments.Experiments TRACE Experiments #0::updateManifest()
1397078501152 Browser.Experiments.Experiments TRACE Experiments #0::_run
Troubleshooting
The following are some steps that you can try if you're having issues installing/launching the experiments using the staging server.
Deleting experiments.json
Note: The profile directory on your computer will differ but it should still be in the same path
- Windows: C:\Users\<current user>\AppData\Roaming\Mozilla\Firefox\Profiles\nae12udp.default
- OSX: /Users/<current user>/Library/Application Support/Firefox/Profiles/y35f3ueg.default
- Ubuntu: /home/<current user>/.mozilla/firefox/ezbdnu88.default/
Once you've deleted the current experiments.json file, re-run the browser and see if the experiment has been installed.
Testing
The following section will outline all the area's that should be tested and checked during telemetry experiments testing.
Checklist
- Ensure that the current installed experiment is not being loaded inside the extensions.bootstrappedAddons preference in about:config. The extensions.bootstrappedAddons preference is the quick access cache that's used on startup to see what bootstrap extensions to load when Firefox launches.

