Open Bug 1408098 Opened 2 years ago Updated 11 months ago

Talos could optionaly provide JS code coverage

Categories

(Testing :: Code Coverage, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

Details

Fetching code coverage for Javascript is easy now. It works on all the Firefoxes, without any special pref/build flag.

An helper module is available here:
http://searchfox.org/mozilla-central/source/testing/modules/CoverageUtils.jsm

var CoverageCollector = Cu.import("resource://testing-common/CoverageUtils.jsm", {}).CoverageCollector;
var coverageCollector = new CoverageCollector("/absolute/path/where/to/put/coverage/");

// Start recording
coverageCollector.recordTestCoverage("testName");
// the purpose of testName isn't clear, may be it is only displayed in the final record

// Stop profiling and save to file
coverageCollector.finalize();


So. May be we can bundle this module into talos addons and have JS code coverage?
We have a lot to complete in October, adding this to our list we can keep track of it and start experimenting with a solution
Whiteboard: [PI:October]
Whiteboard: [PI:October]
Switch this to the codecoverage project.  To be done only if we have faster coverage.
Component: Talos → Code Coverage
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.