what if I want the coverage of the different code between my branch and master

26 views
Skip to first unread message

wumangx...@gmail.com

unread,
Aug 23, 2018, 12:35:07 AM8/23/18
to JaCoCo and EclEmma Users
Hi,

I have a requirement.

In enterprise ,we release new version nearly every week,I only need to test the new function,i.e.,i only need test the code that added or modified for the new fuction.So ,I want the coverage rate of this part of the code instead of the full code.

Does Jacoco supports my request?
Best regards

Mirko Friedenhagen

unread,
Aug 23, 2018, 1:39:31 AM8/23/18
to jac...@googlegroups.com
Hello,

I do not think Jacoco offers this out of the box. What you would need is historisation of data.

I would recommend to setup sonarqube for this which will not only historise coverage but additionally will do a lot of other useful analysises of your code which will help you to find and fix errors in your code.

Regards
Mirko 

--
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/038b17ee-8c47-4ae6-b2f9-f9232113c703%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

wumangx...@gmail.com

unread,
Aug 23, 2018, 8:28:13 PM8/23/18
to JaCoCo and EclEmma Users
Hi

Thanks for your answer.
I have googled the sonarqube and find it is a code analysis tool.It also can do code coverage anlysis.Do you know the principle ? I mean does sonarqube use jacoco to get the full code coverage and do some analysis to get the code coverage on new line? Or it does this all by itself?
Besides , I want get integration test report,not the unit test (which the test code and the tested code are in the same project) report, I have created a integration test project which is separated from the tested project. Does sonarqube support this scenario?

Best regards


Mirko Friedenhagen

unread,
Aug 24, 2018, 3:17:40 AM8/24/18
to jac...@googlegroups.com
Hello,

a bit off-topic, please hop to the sonarqube forum for further details.

Basically you have to create the coverage beforehand by running e.g. “mvn Test” after configuring the jacoco-maven-plugin in your project.

mvn sonar:sonar will then pick up the coverage data and show you detailed reports. How to create separate reports for integration tests is better asked in the sonarqube forum.

Regards
Mirko 

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

For more options, visit https://groups.google.com/d/optout.

wumangx...@gmail.com

unread,
Aug 24, 2018, 11:00:43 AM8/24/18
to JaCoCo and EclEmma Users
Hi

Thanks for your help,I will go to sonarqube forum for help.


Best regards

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