Closed
Bug 1220811
Opened 9 years ago
Closed 9 years ago
Basic code coverage tests for WebExtensions
Categories
(WebExtensions :: Untriaged, defect)
WebExtensions
Untriaged
Tracking
(Not tracked)
RESOLVED
FIXED
Iteration:
45.1 - Nov 16
People
(Reporter: kmag, Assigned: kmag)
References
Details
Attachments
(1 file)
13.07 KB,
patch
|
Details | Diff | Splinter Review |
It would be nice to have some basic code coverage tests for WebExtensions. There's been some work to add broad JS code coverage tests to mozilla-central, but it looks like that's still a long way off.
I've looked at a few tools, and it looks like, of the widely-used options, this will probably be the easiest one to adapt to our test environment:
https://github.com/gotwarlost/istanbul
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
So far, the coverage is much better than I expected:
https://people.mozilla.org/~kmaglione/webextension-text-coverage/
The attached patch is a bit of a hack, so I'm not going to try to land id. I may try to land a cleaner version later on. To make this work, I manually instrumented the web extension scripts in my objdir, and then generated a report from the output files after running the webextension tests.
Assignee | ||
Comment 3•9 years ago
|
||
Looks like bug 1191289 and bug 1204554 may give us a better option for a longer term solution.
Assignee | ||
Comment 4•9 years ago
|
||
This is now broken down into three test sets, for all code, parent process code, and content process code:
https://people.mozilla.org/~kmaglione/webextension-test-coverage/
https://people.mozilla.org/~kmaglione/webextension-test-coverage/default/
https://people.mozilla.org/~kmaglione/webextension-test-coverage/content/
Generated by this patch: https://people.mozilla.org/~kmaglione/webext-coverage.patch
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•