|
|
(35 intermediate revisions by one other user not shown) |
Line 1: |
Line 1: |
| == General ==
| | {{warning|The original Mozilla Labs Test Pilot project has been retired. Click the 'View History' link on this page to read the old content.}} |
|
| |
|
| Test Pilot experiments and surveys are implemented as Javascript Securable Modules. They will be loaded using Cuddlefish. They are expected to export objects with certain specific names. | | As of January 2016 a similar initiative, formerly named Idea Town, has been [http://micropipes.com/blog/2016/01/27/meet-the-new-test-pilot/ named Test Pilot]. |
|
| |
|
| Test pilot experiments and surveys are hosted on https://testpilot.mozillalabs.com. This URL is hard-coded into the Test Pilot extension. Note that the experiments and surveys are served exclusively over SSL to reduce the possibility that a man-in-the-middle could substitute malicious code.
| | '''[[Test_Pilot|Learn more about the new Test Pilot!]]''' |
| | |
| == Surveys ==
| |
| | |
| Surveys are very simple to write, because we currently use SurveyMonkey to host the actual questions, meaning that the JS module on testpilot.mozillalabs.com only has to provide metadata. The survey js file simply has to export an object named surveyInfo which has the following properties:
| |
| | |
| * surveyInfo.surveyId: a unique string that identifies this survey. Can be anything but must be distinct from the ids of any other surveys. Will be used as part of a Mozilla preference so it must not contain spaces.
| |
| * surveyInfo.surveyName: a string containing the human-readable name of the survey, which will be displayed in the extension's menus, etc.
| |
| * surveyInfo.surveyUrl: the URL where the survey is hosted - users who choose to take the survey will be sent here.
| |
| * surveyInfo.resultsUrl: the URL where the survey results are hosted - users who choose to see survey results will be sent here. If there are no survey results yet (e.g. if it's a new survey), then resultsUrl should be undefined (i.e. don't specify it at all).
| |
| | |
| The presence or absence of the surveyInfo object is used by the extension to determine whether a JS module is a survey or an experiment. Any JS module that exports an object named surveyInfo will be treated as a survey. If you are writing an experiment, make sure not to export an object named surveyInfo!
| |
| | |
| === Example ===
| |
| | |
| new_pilot_survey.js, the file providing the metadata for "Survey for New Test Pilots", is reproduced here in its entirety:
| |
| | |
| exports.surveyInfo = {
| |
| surveyId: "survey_for_new_pilots",
| |
| surveyName: "Survey For New Test Pilots",
| |
| surveyUrl: "http://www.surveymonkey.com/s.aspx?sm=bxR0HNhByEBfugh8GPASvQ_3d_3d",
| |
| resultsUrl: "http://www.surveymonkey.com/sr.aspx?sm=oZPWdDCVgnJqkmPERROH6AWWPcmTImSDiMyFunw16b8_3d"
| |
| };
| |
| | |
| == Experiments ==
| |
| | |
| Experiments are much more involved than surveys, and must export four objects, named as follows:
| |
| | |
| # experimentInfo
| |
| # dataStoreInfo
| |
| # webContent
| |
| # Observer
| |
| | |
| These are explained one by one in the following sections.
| |
| | |
| === experimentInfo ===
| |
| | |
| This object contains metadata about the experiment: its name and id, its version number, when it is to be run and for how long, whether it recurs, whether it requires an additional layer of opt-in, and the URLs for further information about it.
| |
| | |
| | |
| ==== Example ====
| |
| | |
| The experimentInfo object for the Tab open/close study is as follows:
| |
| | |
| exports.experimentInfo = {
| |
| startDate: null,
| |
| duration: 7,
| |
| testName: "Tab Open/Close Study",
| |
| testId: 1,
| |
| testInfoUrl: "https://testpilot.mozillalabs.com/testcases/tab-open-close.html",
| |
| testResultsUrl: "https://testpilot.mozillalabs.com/testcases/tab-open-close/results.html",
| |
| optInRequired: false,
| |
| recursAutomatically: false,
| |
| recurrenceInterval: 0,
| |
| versionNumber: 2
| |
| };
| |
| | |
| === dataStoreInfo ===
| |
| | |
| === webContent ===
| |
| | |
| === Observer ===
| |