Wilgnner / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Different report formats for CodeCoverage #133

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I would like to see the CodeCoverage plugin supporting different formats for 
the code coverage report. Something XML based (Cobertura, EMMA?) would help the 
integration with other CI systems (for example Bamboo).

Original issue reported on code.google.com by mikko.ti...@gmail.com on 31 Aug 2010 at 9:33

GoogleCodeExporter commented 8 years ago
I am attaching a patch with a CoberturaWriter which outputs a coverage.xml in 
Cobertura format in the testOutput directory. I'm new to Guice, and struggled a 
bit to figure out how all the pieces integrate, so I went with the simplest and 
least intrusive integration possible: just add useCoberturaFormat in the args: 
parameter of the coverage plugin configuration, at least until a better way to 
configure plugins is devised. I'll also attach my test Maven project, which 
when loaded up in Hudson, publishes a working Cobertura report.
I'm not sure I did everything the right way, but at least it should make a good 
starting place.

Original comment by RedB...@gmail.com on 29 Nov 2010 at 2:13

Attachments:

GoogleCodeExporter commented 8 years ago
RedBugz - nice patch!

I'm trying to calculate CRAP metrics for my JS code; and to do so I need 
coverage information at the method/function level.

Do you think it will be possible to extract that from the JSTestDriver coverage 
data? (Like you have calculated package & class coverage)

Thanks!

Original comment by mrdavidlaing on 8 Dec 2010 at 11:34

GoogleCodeExporter commented 8 years ago
I've applied to RedBugz patch to the latest JsTestDriver source - 
https://github.com/cityindex/JsTestDriver

To use, add the following to your JsTestDriver.conf

plugin:
 - name: "coverage"
   jar: "../tools/jsTestDriver/plugins/coverage.jar"
   module: "com.google.jstestdriver.coverage.CoverageModule"
   args: useCoberturaFormat

which will create a coverage.xml similar to the attached:

Original comment by mrdavidlaing on 2 Mar 2011 at 1:29

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Can any one please publish latest JsTestDriver.jar with RedBugz patch above to 
get the coverage in xml out put? 

Thanks a lot in advance!

Original comment by pandeyko...@gmail.com on 3 Oct 2011 at 10:48

GoogleCodeExporter commented 8 years ago
Yes please include this patch on the next release. I need this for Jenkins 
coverage report.

Thanks much.

Original comment by lemuellu...@gmail.com on 26 Oct 2011 at 11:40

GoogleCodeExporter commented 8 years ago
Agree, this certainly will help the adoption of JsTestDriver.

Original comment by stanly....@gmail.com on 28 Oct 2011 at 7:39

GoogleCodeExporter commented 8 years ago
I would also like to see coverage reports as Cobertura XML files. They can be 
used with Hudson/Jenkins or Sonar. With GCOV file format you can't do much...

Original comment by winiarsk...@gmail.com on 7 Nov 2011 at 3:27

GoogleCodeExporter commented 8 years ago
Thanks for the patch. I've applied it to version 1.3.3d and it works like a 
charm. 
It would be great to have this as part of the main JSTestDriver source.

Original comment by ddrag...@gmail.com on 28 Nov 2011 at 7:43

GoogleCodeExporter commented 8 years ago
the patch works fine with 1.3.4.b. May be its time to include it with main 
code.  For people who got no other choice but to run builds in windows machine 
(client constraint in my case) , this will be of great help.

Original comment by anandhadeepak on 27 Aug 2012 at 9:52

GoogleCodeExporter commented 8 years ago
I would like to see support for EMMA as well, if anyone has quick patch that 
would be great.

Original comment by yve...@gmail.com on 12 Oct 2012 at 2:54