I am working with Jacoco for last 16 months with success and I am loving it BUT now I jave a special requirement and I am not getting the desired results because I could t find parameters or API support
I need:
Generate a report containing package, class, line #, covered (true|false).
Ok .. we have samples in Jacoco project to how generate it in API, but my problem is if I analyze classes it will not cover code tested with PowerMock. Ok! I can get jacoco.exec file from maven build job and analyze it ... I got a good number but based on probes ... but I am still needing line covered true or false.
Any one can help me?
--
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/i9kHsljdFOo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/570B1ED5.4040802%40mountainminds.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/570BF2E1.9010600%40mountainminds.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 jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/CAPKzoZ%2BhXhRUxEkqEsxSMWguGPF%2Bgzt7mmDQNDy3LzjLOg_SQg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
-- Marc Hoffmann hoff...@mountainminds.com _______________________________________________ Mountainminds GmbH & Co. KG Nussbaumstr. 4 * 80336 Muenchen * Germany Phone/Fax +49-700-68664637 * 0700-MTNMINDS Registergericht Muenchen * HRA 80201 Mountainminds Verwaltungs GmbH Registergericht Muenchen * HRB 143183 Geschaeftsfuehrer Marc Hoffmann
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/570BFC91.7020901%40mountainminds.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/CAPKzoZKJDvxRLvOozajOdL3R_L32F_N5jodvrrS9TWOpkE%2B-GQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/570C0ED6.7060706%40mountainminds.com.
public void create() throws IOException {
execFileLoader = new ExecFileLoader();
execFileLoader.load(executionDataFile);
CoverageBuilder coverageBuilder = new CoverageBuilder();
Analyzer analyzer = new Analyzer(execFileLoader.getExecutionDataStore(), coverageBuilder);
analyzer.analyzeAll(new File(project.getClassesFolder()));
for (IClassCoverage cc : coverageBuilder.getClasses()) {
Map<String, Boolean> lines = coverageMap.get(cc.getName());
if (lines == null) {
lines = new TreeMap<String, Boolean>();
}
for (int i = cc.getFirstLine(); i <= cc.getLastLine(); i++) {
lines.put(Integer.toString(i), isCovered(cc.getLine(i).getStatus()));
}
ICounter lineCounter = cc.getLineCounter();
for (int i = 1; i <= lineCounter.getTotalCount(); i++) {
Boolean line = lines.get(Integer.toString(i));
if (line == null) {
lines.put(Integer.toString(i), true);
}
}
coverageMap.put(cc.getName(), lines);
}
createReport();
}