Hi, Please read documentation at http://www.jacoco.org/jacoco/trunk/doc/ In particular there is API Usage Examples - http://www.jacoco.org/jacoco/trunk/doc/api.html Such as http://www.jacoco.org/jacoco/trunk/doc/examples/java/ReportGenerator.java that shows how to read exec file and generate report.
On Monday, August 7, 2017 at 1:36:03 PM UTC+2, juliangam...@gmail.com wrote: > > Hi Everyone, > > I'm looking for (for want of a better word) JaCoCo internals recipes. > > I can do the following in Cobertura. > > 1. Read .ser file > > http://alvinalexander.com/java/jwarehouse/cobertura-1.9/src/net/sourceforge/cobertura/coveragedata/CoverageDataFileHandler.java.shtml > (Where the equivalent in Jacoco is the exec file) > > Store in CoverageData > > https://github.com/cobertura/cobertura/blob/master/cobertura/src/main/java/net/sourceforge/cobertura/coveragedata/ProjectData.java > (I don't know what the overall project level data is called in Jacoco). > > Pull out classData > > https://github.com/cobertura/cobertura/blob/master/cobertura/src/main/java/net/sourceforge/cobertura/coveragedata/ClassData.java > (I don't know how to retrieve coverage data at a class level from the exec > file in Cobertura) > > Pull out LineData > > https://github.com/cobertura/cobertura/blob/master/cobertura/src/main/java/net/sourceforge/cobertura/coveragedata/LineData.java > (I don't know how to pull code the data at a line-level of > covered/uncovered code in Cobertura). > > Can someone point me do how to do the same in JaCoco? > 1. Read the exec file > 2. Pull out the data at a project level > 3. Pull out data at a class level > 4. Pull out data at a line-level. > > Cheers > Julian > > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/a5ccc146-79fa-43d3-b6dd-7cbb38395db1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.