-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add a coverage check mojo #6
Comments
I'd really love this too. We currently use Clover for this but would like to change to Jacoco and this is holding us. Thanks for a great tool. |
added a coverage check mojo which attaches to the verify phase by default, closes issue jacoco#6
This feature would make JaCoCo a compelling solution for Continuous Delivery, as it would allow 1) the build pipeline to break if there isn't enough coverage, and 2) since the on-the-fly coverage is fast and doesn't affect the generated JAR files, code coverage can be integrated into the normal test phases, which means you don't need to rerun the tests for code coverage. In sum, a killer feature for Continuous Delivery. |
Wakaleo, do you have an idea how to specify "enough coverage"? Percentage of what metric? Is the limit for the overall project, per package or per class? Thx, |
Ideally, you would want to be able to set minimum values of percentage Here is how the Maven Cobertura Plugin does things: Cheers
On 28 September 2012 00:52, Marc R. Hoffmann notifications@github.comwrote:
John Smart | Wakaleo Consulting | +61 407 247 642 |
The 'check' goal I've added with Pull Request #26 gives you a configuration similar to the cobertura plugin except it doesn't have the regex functionality. I'm sure that could be added later on. You can see an example configuration here: In this example the check requires 100% coverage of everything. |
That would do fine (the regex is more advanced, so could wait til later On 29 September 2012 08:04, Kyle Lieber notifications@github.com wrote:
John Smart | Wakaleo Consulting | +61 407 247 642 |
We just got sandbagged by Java 7 and cobertura - hate to be a pest but is there a release pending or alternatively is there a repo containing 0.6.1-SNAPSHOT including this? |
I haven't heard anything on whether or not the JaCoCo developers plan to merge it in or not. Based on this discussion from their mailing list, it looks like they haven't decided if they like the implementation or not. |
Thanks for the response |
For sure we plan to provide such functionality. Just be patient ;) |
@Godin - Of course :-) I know this is all volunteer and I appreciate greatly all the hard work that is being put towards this. To date it looks like there is a release ~ every 30 days. That works out fine and I can wait. I just have to get my people to be proactive with their coverage reports. |
Another vote for this. I'm in the process of converting our coverage over from cobertura and this is one remaining thing - as our ci process uses code coverage as one of it's gating factors for a "successful" build. Thanks! |
timothyastle@SF
It would be nice if the JaCoCo Maven Plugin supported a mojo that would check the coverage and fail the build if the coverage was not met.
This was a nice feature in the Maven Cobetura plugin (http://mojo.codehaus.org/cobertura-maven-plugin/usage.html) and it helped developers know if their commit would drop the code coverage before actually committing.
Currently developers have to lean on sonar (external system) to see if their commit will break the build if build breaks are enabled.
The text was updated successfully, but these errors were encountered: