GithubHelp home page GithubHelp logo

Add a coverage check mojo about jacoco HOT 12 CLOSED

jacoco avatar jacoco commented on May 18, 2024
Add a coverage check mojo

from jacoco.

Comments (12)

vmassol avatar vmassol commented on May 18, 2024

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.

from jacoco.

wakaleo avatar wakaleo commented on May 18, 2024

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.

from jacoco.

marchof avatar marchof commented on May 18, 2024

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,
-marc

from jacoco.

wakaleo avatar wakaleo commented on May 18, 2024

Ideally, you would want to be able to set minimum values of percentage
instruction and branch coverage overall, per package and per class, as you
can have different constraints at different levels.

Here is how the Maven Cobertura Plugin does things:
http://mojo.codehaus.org/cobertura-maven-plugin/usage.html#Check

Cheers

  • John.

On 28 September 2012 00:52, Marc R. Hoffmann [email protected]:

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,
-marc


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-8938644.


John Smart | Wakaleo Consulting | +61 407 247 642
Optimizing your software development process
http://www.wakaleo.com | [email protected]

from jacoco.

klieber avatar klieber commented on May 18, 2024

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:
https://github.com/klieber/jacoco/blob/master/jacoco-maven-plugin.test/it/it-check-passes/pom.xml

In this example the check requires 100% coverage of everything.

from jacoco.

wakaleo avatar wakaleo commented on May 18, 2024

That would do fine (the regex is more advanced, so could wait til later
on). Is there an ETO for the next release?

On 29 September 2012 08:04, Kyle Lieber [email protected] wrote:

The 'check' goal I've added with Pull Request #26https://github.com/jacoco/jacoco/issues/26gives 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:

https://github.com/klieber/jacoco/blob/master/jacoco-maven-plugin.test/it/it-check-passes/pom.xml

In this example the check requires that 100% coverage of everything.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-8996729.


John Smart | Wakaleo Consulting | +61 407 247 642
Optimizing your software development process
http://www.wakaleo.com | [email protected]

from jacoco.

djgraff209 avatar djgraff209 commented on May 18, 2024

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?

from jacoco.

klieber avatar klieber commented on May 18, 2024

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.

from jacoco.

djgraff209 avatar djgraff209 commented on May 18, 2024

Thanks for the response

from jacoco.

Godin avatar Godin commented on May 18, 2024

For sure we plan to provide such functionality. Just be patient ;)

from jacoco.

djgraff209 avatar djgraff209 commented on May 18, 2024

@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.

from jacoco.

semmons-okta avatar semmons-okta commented on May 18, 2024

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!

from jacoco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.