Hi Marc,

thanks for the quick reply!

I am aware of the process (class files + source files + exec = line-level
coverage report). My attempt was to tweak the html report generator to give
me the data I need, but was unable to understand how to connect the dots..
Do you have any pointers for me, where to find the specific code which does
the correlation between inserted probes and the source code? (as this needs
to happen somehow, in order to generate the report...)


Best regards,
Nikola




On Fri, Aug 14, 2020 at 11:43 AM Marc Hoffmann <[email protected]>
wrote:

> Hi Nikola,
>
> there is no simple relationship between probes and line numbers. Probes
> are inserted based on the control flow in methods. Line numbers depend on
> your source code formatting and the compiler.
>
> That’s why JaCoCo needs the original class files to reconstruct coverage
> data from probes. The algorithm is documented here:
> https://www.jacoco.org/jacoco/trunk/doc/flow.html
>
> So my recommendation is to use JaCoCo based tools or the JaCoCo Java API
> to create line coverage. Here are some code examples:
> https://www.jacoco.org/jacoco/trunk/doc/api.html
>
> Regards,
> -marc
>
>
>
> On 14. Aug 2020, at 10:01, Nikola Veber <[email protected]> wrote:
>
> Hi,
>
> I have tried to figure this out by debugging during report generation, but
> without much luck.
>
> Can you suggest a way to get a correlation between source line numbers and
> probe "ids"?
>
> I would like to have something like
> line x -> depends on probes [0, 2, 7]
> (or the other way around)
>
>
> Cheers,
> Nikola
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/0e5fc174-1e86-4f1b-a70e-2670506baa9bn%40googlegroups.com
> <https://groups.google.com/d/msgid/jacoco/0e5fc174-1e86-4f1b-a70e-2670506baa9bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jacoco/Gf8B6MwehNo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/5FF45787-D124-4D49-AF30-A25A8F58AEE1%40mountainminds.com
> <https://groups.google.com/d/msgid/jacoco/5FF45787-D124-4D49-AF30-A25A8F58AEE1%40mountainminds.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/CA%2BrO3sXU6o9a_hfFWdLSw-2YUWGQsGe4%3D%3D-ttD1ZonCroSDRuA%40mail.gmail.com.

Reply via email to