Skip to content
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

Added clover reporter #187

Merged
merged 3 commits into from Sep 9, 2014

Conversation

@mrlannigan
Copy link
Contributor

mrlannigan commented Sep 8, 2014

We use Atlassian's OnDemand Bamboo CI server, which uses the clover xml format to record simple statistics about code coverage.  We are already using the JUnit reporter, which works well with Bamboo out of the box.

mrlannigan added 2 commits Sep 7, 2014
   also, updated README
@geek geek added the feature label Sep 8, 2014
@geek

This comment has been minimized.

Copy link
Member

geek commented Sep 8, 2014

Reviewing now... but glad to see that this doesn't introduce any additional dependencies!

README.md Outdated
@@ -36,6 +36,7 @@ global manipulation. Our goal with **lab** is to keep the execution engine as si
- `junit` - output results in JUnit XML format.
- `tap` - TAP protocol report.
- `lcov` - output to [lcov](http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php) format.
- `clover` - output results in Clover XML format.

This comment has been minimized.

Copy link
@geek

geek Sep 8, 2014

Member

Please add a link to clover: [Clover XML](https://confluence.atlassian.com/display/CLOVER)


if (this.settings.coveragePath) {
this.settings.packageRoot = Path.basename(this.settings.coveragePath);
} else {

This comment has been minimized.

Copy link
@geek

geek Sep 8, 2014

Member

Please add else on its own line

}
else {
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="{{now}}" clover="3.2.0">

This comment has been minimized.

Copy link
@geek

geek Sep 8, 2014

Member

Is there an issue with clover 4.0.0 or will this work with that version as well?

This comment has been minimized.

Copy link
@mrlannigan

mrlannigan Sep 9, 2014

Author Contributor

I used istanbul's reporter output as a basis for this reporter. But further research into the xml format suggests that it doesn't matter what is in this field. For instance, the PHPUnit reporter for clover doesn't appear to even attach the clover attribute to the coverage tag. Also, the bamboo-gcov-plugin, which is a python utility for converting gcov coverage results to clover xml, at line 90 they are inserting the name of the file gcov_to_clover.py.

I will run an actual build with this value removed and report back.

@geek geek added this to the 4.4.0 milestone Sep 8, 2014
@geek geek self-assigned this Sep 8, 2014
… tag in clover reporter
geek added a commit that referenced this pull request Sep 9, 2014
Added clover reporter
@geek geek merged commit 21990d4 into hapijs:master Sep 9, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.