node-cover
node-cover copied to clipboard
Cobertura report format
Am wondering how difficult it would be to produce a coverage reports using Cobertura's xml format?
Here is their XML report generating class:
http://www.devdaily.com/java/jwarehouse/cobertura-1.9/src/net/sourceforge/cobertura/reporting/xml/XMLReport.java.shtml
@davidmoshal do you have a sample output file or files you could put online? Ideally it would be an entire directory, so I can take a look at what the full format looks like.
It is possible we don't have all the info that they do (like methods/branches), but we can see what we have.
I do, for java, groovy and flex. However, the documentation contains literally every line of my companies code!
Dave
On Fri, Mar 30, 2012 at 5:42 PM, Itay Neeman [email protected] wrote:
@davidmoshal do you have a sample output file or files you could put online? Ideally it would be an entire directory, so I can take a look at what the full format looks like.
It is possible we don't have all the info that they do (like methods/branches), but we can see what we have.
Reply to this email directly or view it on GitHub: https://github.com/itay/node-cover/issues/14#issuecomment-4853501
@davidmoshal sorry for the delayed reply!
Can you come up with an example with some test code so I can see what the output looks like?
I am glad i've found this discussion. @itay here is DTD for the cobertural xml. It'd be great feature to include in cover, since xml reports can be inserted in such tools as Jenkins for example.
http://cobertura.sourceforge.net/xml/coverage-04.dtd
here is an example of actual xml report:
https://raw.github.com/jenkinsci/cobertura-plugin/master/src/test/resources/hudson/plugins/cobertura/coverage-with-data.xml
@rpetrenko thanks for the link, that is useful. I've recently finished some other commitments, so I hope I'll have a few more cycles to spend on Cover in the near future!
Also, if you'd like to try your hand at this, feel free. Happy to provide guidance and accept a pull request :)
Nice! Being able to view node coverage in java coverage reporting tools will be awesome.
Hi itay ,
Do we have anything that has come up on this ?
@preethinagashri I took a look at Cobertura. There are two issues:
- I can't seem to find any documentation of their format.
- From trying to reverse engineer it, it seems they collect a lot of data at the byte code level for Java that we simply don't have available for JavaScript.
I'd rather spend time trying to make the Cover HTML reporter better, so let me know if there are features we should add.
This would be a great addition! Cobertura reports can be uploaded to codecov.io very easily too.
@itay is there a json export example you can show me? Thank!
I don't have an example handy - I haven't run this in a while, unfortunately. It should be pretty easy to get one if you install the project though.