Is there a way to get reverse-code coverage for external tests

75 views
Skip to first unread message

gauta...@gmail.com

unread,
Sep 25, 2018, 7:35:13 AM9/25/18
to JaCoCo and EclEmma Users
Hi there,
We are using Jacoco to get code coverage for our External End to End tests, by enabling jacoco agent in our Application's launch and its happily working. Is there a way I can pass a "test name" etc from outside such that jacoco.exec which gets generated have markers on the lines getting covered by the test.
And that way when I merge all the jacoco dumps I would get "test name" tests hitting from outside to my App's code. So just like for JUnit Coverage Report, we show which test hit what line, can we get it for External Tests?
Thanks
Gautam

Marc Hoffmann

unread,
Sep 25, 2018, 2:10:56 PM9/25/18
to jac...@googlegroups.com
Hi Gautam,

JaCoCo does not support “per test” coverage reports out of the box.

Using JaCoCo’s remoting APIs (see JMX or TCP output) you can trigger separate dumps for every test case and reset coverage data afterwards. From this you could create a separate report for every test.

A combined report (“which tests hit a specific line”) is not supported by JaCoCo’s reports.

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/7e0bf564-29e5-4917-b970-bfc125354749%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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