Automated Testing of B2G OS

 

Given that B2G OS is still under development, and support for new hardware is going to be forthcoming for the foreseeable future, it's important to know how to test it. This page offers articles that provide information about various aspects of testing B2G OS, including running different tests, automation, and result reporting and tracking.

Getting started

Running tests on B2G OS: A guide for developers
A quick, developer-focused guide to getting started with running the tests. This is where you should start if you are not experienced in running Mozilla's tests and automation systems. If you are, then you will probably have an idea of what tests you want to run and how, and you can skip on to the more specific detailed guides below.
The Mozilla integrated tools package
The Mozilla integrated tools package (MozITP) is a one-stop shop for setting up B2G OS-related tools, which can handle automatic Testing on Mulet or a real device, flashing TaskCluster images, flashing with the B2G installer add-on, and running the TV and phone versions of Mulet.

Gaia tests

These articles cover the primary test suites designed to put Gaia through its paces.

Gaia UI tests
Python tests for Gaia UI interactions and features.
Gaia integration tests
JavaScript integration tests for Gaia, based on Marionette.
Gaia unit tests
Gaia unit tests with no UI interaction; written in JavaScript, not Marionette-based.
Raptor: Performance Tools for Gaia
Raptor is a tool for measuring performance specifically on B2G OS, which aims to improve upon the existing performance testing tools.
Eideticker
Provides performance measurements for B2G OS based on video captures.
MTBF test
Mean Time Between Failure. This is a test suite that runs on device for long duration, attempting to find problems with Gaia uptime and stability. (Currently, it is owned by Taiwan QA team and still a developing test framework)

B2G tests

The guides below cover a number of different test harnesses that test various aspects of B2G functionality.

Mochitests
Gecko functional and API tests; HTML & JS based.  No Gaia interaction.
Reftests
Gecko rendering correctness tests.
WebAPI tests
Gecko JS-based WebAPI tests; most of these require an emulator.
xpcshell tests
Headless tests of Gecko XPCOM APIs.
cppunit tests
Headless C++ unit tests.

Supporting documentation

This section provides links to some of the supporting technologies that underpin Mozilla's tests, which you may want to find more information about.

Marionette
A remote test driver based on Selenium WebDriver.
Marionette JavaScript tools
A node.js-based runner for Marionette.
Marionette Python client
A Python runner for Marionette.
Try server
Mozilla's standard server for testing patches before checking them into the core repository. See also the TryChooser Syntax Builder.

Note: If you want to run Marionette against a production build (to run gaia integration tests, gaia-ui-tests, etc.), you can install Marionette as an extension (this currently only works for 1.3 builds, but more support will be added soon.)

Continuous integration and result reporting

The following articles cover the continuous integration and result reporting mechanisms Mozilla uses to store and intepret test data.

Treeherder
Understand the tests and builds that run on Treeherder.
Raptor
Visualization of performance tests run against the Raptor tool.
Test execution chart
A chart showing which tests are being run — on what devices and where — and which platforms are supported for each test.

Document Tags and Contributors

 Last updated by: golfkorn,