How to get per-test coverage for a given project?

59 views
Skip to first unread message

Echo

unread,
May 10, 2019, 10:10:31 AM5/10/19
to JaCoCo and EclEmma Users

Hello, all
I want to get per-test coverage for a project. For example, given a project with 100 junit test cases form GitHub, i need the coverage information for each test case, which is important in the field of Regression Test Case Prioritization. Does Jacoco have such feature? Or what i should do to to implement it? 
Thank you!

Marc Hoffmann

unread,
May 10, 2019, 10:25:24 AM5/10/19
to jac...@googlegroups.com

Hi,

per test coverage is not supported by JaCoCo. With a good understanding how JaCoCo works you might be able to build something for your scenario. Search this mailing list for previous discussions on this topic.

Regards,
-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/35759713-84bb-4535-a0ab-bb493c3a8019%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Paul Hammant

unread,
May 10, 2019, 10:32:43 AM5/10/19
to jac...@googlegroups.com
If it is a maven project just do -Dtest=Classname#methodname for each and post process the results

--

Evgeny Mandrikov

unread,
May 10, 2019, 10:54:32 AM5/10/19
to JaCoCo and EclEmma Users

Echo

unread,
May 14, 2019, 3:31:18 AM5/14/19
to JaCoCo and EclEmma Users
HI, 
Thank you for your reply. I'm new at this. Please don't mind.
I have gotten  per test coverage with SonarQube following https://deors.wordpress.com/2014/07/04/individual-test-coverage-sonarqube-jacoco/
The jacoco.exec file when using sonar-jacoco-listeners stores the coverage information for Individual Tests, doesn't it?

在 2019年5月10日星期五 UTC+8下午10:54:32,Evgeny Mandrikov写道:
Reply all
Reply to author
Forward
Message has been deleted
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages