how jacoco get the coverage of increment source code ?

67 views
Skip to first unread message

diaoj...@gmail.com

unread,
Dec 23, 2018, 7:51:36 AM12/23/18
to JaCoCo and EclEmma Users

Is it possible to specify the path of the sourceDirectories of the change file when parsing the final result file, but at this time my question is that only the change file can be placed here, but the specific function method level in the change file cannot be specified.

As our team use the git manage source code, so my question is how to get the increment code coverage by jacoco and git diff ?

Evgeny Mandrikov

unread,
Dec 24, 2018, 6:45:00 PM12/24/18
to JaCoCo and EclEmma Users


On Sunday, December 23, 2018 at 1:51:36 PM UTC+1, diaoj...@gmail.com wrote:

Is it possible to specify the path of the sourceDirectories of the change file when parsing the final result file, but at this time my question is that only the change file can be placed here, but the specific function method level in the change file cannot be specified.



About which tool you are talking here?

 
As our team use the git manage source code, so my question is how to get the increment code coverage by jacoco and git diff ?

There is documentation for all tools developed by JaCoCo team ( Maven plugin, Ant Tasks, Command Line Interface ) - https://www.jacoco.org/jacoco/trunk/doc/
This documentation is exhaustive, because it describes everything what is available out-of-the-box, no more, no less.
Please read it before asking questions about what is available.

Moreover it contains plenty of links on third-party integrations - https://www.jacoco.org/jacoco/trunk/doc/integrations.html
Closest for your needs are SonarQube (shows coverage on new and modified code), Codecov and Coveralls (show coverage of pull-request).

diaoj...@gmail.com

unread,
Dec 26, 2018, 6:12:54 AM12/26/18
to JaCoCo and EclEmma Users

Sorry, as I described may not be accurate, mainly because I want to get incremental code coverage, so I would like to ask if there is any way to achieve it myself, not through third-party integration tools.
As I have got the full coverage report through gradle jacocoTestReport, just want to know if there is any way to achieve the increment.

在 2018年12月25日星期二 UTC+8上午7:45:00,Evgeny Mandrikov写道:

Marc Hoffmann

unread,
Dec 27, 2018, 2:14:08 AM12/27/18
to jac...@googlegroups.com
Hi,

if you don’t want to use a existing tool, you can of course implement your own tool. You can use the JaCoCo XML reports or its Java APIs as an input for code coverage and somehow combine this with change sets. Note that JaCoCo has no support for working with change sets, this is what you would need to write yourself.

Cheers,
-marc

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/1af35fa9-f727-4374-b6c3-835562f46acf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Henrik Horneber

unread,
Dec 27, 2018, 4:12:01 AM12/27/18
to jac...@googlegroups.com
It sounds like you want to use sonar to track changes in coverage. 

Am Do., 27. Dez. 2018, 08:14 hat Marc Hoffmann <hoff...@mountainminds.com> geschrieben:
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages