Ensemble is the platform that powers the Firefox Public Data Report, a weekly public report on the activity, behavior, and hardware configuration of Firefox Desktop users.
Ensemble fetches data from ensemble-transposer, a JSON server that adds metadata to the raw data hosted by Mozilla data engineers.
Ensemble is written in React with the help of the wonderful create-react-app tool from Facebook. See the create-react-app documentation for more information. Some highlights and some additional information are provided here.
Run npm start
Any of the environment variables in .env can be overridden. For example:
REACT_APP_SITE_TITLE='Firefox Public Lore Report' npm start
See the create-react-app documentation on deployment.
Any of the environment variables in .env can be overridden.
To run Jest, Nightwatch, and ESLint tests locally, run npm test
.
Nightwatch tests can optionally be run against the staging and production sites.
Run npm run test:nightwatch:stage
or npm run test:nightwatch:prod
respectively.
Follow these steps to run Nightwatch tests against even more browsers and operating systems using BrowserStack.
- Sign up for a BrowserStack account which supports automated testing (for example, an Automate Pro account). Note that automated testing is not available with free accounts.
- Follow the instructions in the Live (using other browsers); Automate; App
Automate section of this page
to download, install, and run the BrowserStackLocal executable.
- BrowserStack tells users to use the command-line executable for automated testing, but you may actually have better luck using the GUI app, which is linked from the Live section.
- Start Ensemble
- Run
BSUSER=username BSKEY=key npm run test:nightwatch:browserstack:local
Alternatively, the tests can be run against staging or production. Just change local to stage or prod in the command above.
This command will print a ton of output. If any tests fail, the errors will be printed and subsequent browsers will be skipped. If the command finishes printing output and the last thing that was printed was not an error, you can rest assured that all tests passed in all configured browsers. We'd like to find a better way of presenting this information in the future.
If you get an error about local testing through BrowserStack not being connected, wait about 30 seconds and try again. If it keeps happening, try stopping and re-starting the BrowserStackLocal process.
To analyze the size of the JavaScript bundle that will be served, run npm run size
.
We maintain a version number for this project. We try to update it when we deploy new code. The version number is specified in package.json.
The number looks like a semantic version number, but semver isn't suitable for applications. We instead follow this basic guideline: the first number is incremented for major changes, the second number is incremented for medium changes, and the third number is incremented for small changes.