Correct, exec files alone do not contain enough information to generate a coverage report. You also need the control flow and optionally line number information. That‘s why JaCoCo uses the original class files for report generation. Source files are only used to highlight the code in HTML reports.
See the second link I sent you how this process works. > On 22. Aug 2020, at 13:53, winter <[email protected]> wrote: > > Thank u!, ExecutionDataWriter.java it helps me a lot! > > I noticed the exec file record the probes array, such as [true,true,false], > but How jacoco knows the probes position? jacoco report required exec files, > class files and source, It can show which line is covered, but exec file > didn't have information about probe position. >> On Saturday, August 22, 2020 at 3:05:56 PM UTC+8 Marc R. Hoffmann wrote: >> Hi, >> >> it is a internal binary format that basically contains a boolean array for >> every class with the executed probes. We do not have a formal specification >> but from the code you can get an idea: >> >> >> https://github.com/jacoco/jacoco/blob/master/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataWriter.java >> >> To interpret the probes you need to understand the control flow analysis >> which is is implemented in JaCoCo, see our documentation: >> >> https://www.jacoco.org/jacoco/trunk/doc/flow.html >> >> In any case we do not consider the exec file format as an API and it might >> change at any point in time (and already did in the past). We recommend >> using the public Java API or the XML reports. >> >> Cheers, >> -marc >> >> >>>> On 22. Aug 2020, at 05:32, winter <[email protected]> wrote: >>>> >>> What's in the dump file .exec, is there some document I can study, thank u >>> >> >>> -- >>> 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/b228c2ce-c3e3-4390-900f-6bcebb891038n%40googlegroups.com. >> > > -- > 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/37ff6d1e-67d5-4c81-b889-65ca377f5585n%40googlegroups.com. -- 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/CD0C11A6-9A63-46D7-A348-7CD2B1124831%40mountainminds.com.
