1,007
edits
| Line 1: | Line 1: | ||
= General = | = General = | ||
Test Pilot experiments | Test Pilot experiments are javascript modules which are hosted like web content on https://testpilot.mozillalabs.com. They are downloaded by the Test Pilot extension and are run with full chrome privileges. They have access to XPCOM and can do everything that extensions do. With great power comes great responsibility! | ||
Test Pilot experiments run with | A Test Pilot experiment has a data store (held locally on the user's machine in SQLite), it has some observers which watch for events and write them into the data store, and it has a little bit of HTML web content which is displayed to the user in order to explain what the experiment is doing. | ||
The extension runs your experiment for a certain period of time that you specify. When that period is over, the user will be asked to click a "submit" button to upload their data. According to our privacy policy, no data is uploaded except when the user explicitly gives this permission. | |||
The Test Pilot extension manages the lifecycle of each experiment, as well as providing all the user interface and handling the data uploads. You don't have to worry about any of that stuff in writing an extension. You just need to specify the observers that you want to install, the schema of the data store, the web content, and a little bit of metadata. | |||
Aside from experiments, you can also run surveys with Test Pilot. The API for defining a survey is much simpler than that for an experiment; it is mainly just a JSON object with some text for each question and for each answer in the case of multiple-choice questions. A survey can be attatched to a study or it can be standalone. | |||
Test Pilot experiments and surveys are implemented as Javascript Securable Modules. They will be loaded using Cuddlefish. They must implement the required API by exporting objects with certain specific names that the Test Pilot extension expects to see. The main function of this page is to document that API, what each object must be named and what it can do. | |||
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 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. | ||
edits