When a changeset adds a new test, or modifies an existing test, the per-test coverage (TC) test suite uses other test harnesses to run the test in isolation to collect coverage information at the test level. For instance, when a mochitest is modified, TC runs the mochitest harness on the modified mochitest. If any test run fails then the failure is reported normally, testing ends, and the test suite reports the failure.
Initially, there are some limitations:
- TC only applies to mochitests (all flavors and subsuites), reftests (including crashtests and js-reftests) and xpcshell tests; a separate job, TCw, handles web-platform tests.
Per-Test Coverage on try
To use per-test coverage on try, use something like:
mach try -b do -p linux64 -u test-coverage-e10s --artifact
Tests modified in the push will be run.
For TCw, use something like:
mach try -b do -p linux64 -u test-coverage-wpt-e10s --artifact
Web-platform tests modified in the push will be run.
Per-test coverage is maintained by :marco, :gbrown and :jmaher. Bugs should be filed in Testing :: Code Coverage.