-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support File Output of Coverage Results #14
Comments
I've got something rudimentary working that outputs one file per-module. For instance if you had the modules "user" and "product", you would get The output looks like this: {
"moduleName": "uifw",
"msg": "PASS [ 59% = 59% ] : uifw (648 \/ 1083)",
"threshold": 59,
"numCovered": 648,
"numTotal": 1083,
"operator": "=",
"result": "PASS",
"percentCovered": 59,
"pass": true,
"ok": true,
"total": 117,
"passes": 117,
"failures": 0,
"pending": 0,
"duration": "1.64"
} So if you output to a known coverage output directory, you could iterate over these files, parse them as JSON (perhaps another grunt plugin to do this) and do whatever you want with the data. Would that work? Still need to clean this up and de-spaghettify it before it's ready to push. |
Doing a bit of poking around on the net, it appears that lcov or cobertura JSCover apparently supports both: Here's an example of the cobertura XML spec: Here's some converters from lcov and jscover default output: There's also this lcov reporter for mocha which might be of interest? On Thu, Jan 30, 2014 at 1:48 PM, Dave Cadwallader
Bill Magnuson* @billmag* :: Co-Founder & CTO :: |
Awesome... thanks, @billmag. Will take a look at these. |
Yes. Would be nice to have lcov reporter to send coverage to coveralls |
I'd love to see this implemented as well. Currently, we're parsing the output text to find coverage numbers for historic data. It would be nice if there was a way to just read it from a pre-formatted file instead. |
👍 |
Your help on generating lcov is highly appreciated. |
I'm looking for volunteers to help with this feature. It's unlikely that I'll have time to work on it anytime soon. |
👍 |
As a next step to incorporating grunt-blanket-mocha into my build, I'd like to be able to easily output the coverage results into a file in a format that's somehow digestible by Jenkins. There are a number of options out there and I'm personally not very informed on the landscape of reporting options, but this would be pretty fantastic functionality to add.
The text was updated successfully, but these errors were encountered: