[pull request] Coverage reporting at a commit level

32 views
Skip to first unread message

Julian Gamble

unread,
Aug 23, 2017, 7:13:20 AM8/23/17
to JaCoCo and EclEmma Users
Hi Everyone, 

First I wanted to say thank  you for jacoco - I can see it getting used daily around me, and it makes my life better. 

Second, I wanted to say thanks to the people on this forum for answering questions (mine included) and being helpful. 

I've got a new idea for jacoco (with corresponding pull request) that I wanted to tell you about. 

Please imagine the following scenario:
[Workplace with a million line codebase and 100s of developers working on it.]

Tech Lead: "We really want to get the coverage up on this codebase - more tests will give us more feedback about the code."
Developer: "Well that's lovely, but I really need to ship my feature - I'll make sure my stuff is covered as best I can."
Tech Lead: "Ok - how much coverage are you aiming for?"
Developer: "I'll make sure the lines I touch have coverage."
Tech Lead: "Ok - how will you measure that?"
....

Now obviously (a) this codebase is a candidate for modularisation and (b) sonar does give you feedback on coverage at a commit level - but sonar doesn't give you a way to know what the commit-level coverage is prior to pushing your changes. ie - if you've missed some coverage on the lines you've changed - there isn't a way to know before pushing. 

This change is trying to solve the problem of knowing "for the lines I have touched - what coverage have I got? What lines have I missed?"

You can see an example report here:
https://github.com/juliangamble/jacoco-example-project/blob/master/README.md

My pull request is here:
https://github.com/jacoco/jacoco/pull/581

I'm open to feedback and suggestions for improvement. 

Please let me know what I need to do to get this merged onto the mainline. 

Cheers
Julian


Julian Gamble

unread,
Aug 29, 2017, 8:29:58 AM8/29/17
to JaCoCo and EclEmma Users
Thanks for your support. The best path forward was for this to go as a separate library. You can use it here:


There is an example project here:


Cheers
Julian
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages