Hi Abhijith,
your observation is correct. Due to the limited capabilities of the CSV
file format it only contains coverage data on class level.
If you need coverage information on method level (or even line level) I
recommend working with the XML report. You can use e.g. XSLT to extract
CSV files with the information you need.
Best regards,
-marc
On 20.03.14 21:59, [email protected] wrote:
Hi,
I couldn't find any relevant information in this group and in the web about
getting the method coverage in the csv report which is available in both xml
and html report.
For example:
This is how my HTML looks for log4j coverage and I can click on each of the
classes to see the method coverage.
org.apache.log4j.spi
Element Missed Instructions Cov. Missed Branches Cov. Missed Cxty
Missed Lines Missed Methods Missed Classes
Total 1,054 of 1,205 13% 101 of 114 11% 167 180 333
376 115 123 9 11
LoggingEvent 40381 17% 479 16% 47 56 118 142
22 28 0 1
LocationInfo 345 0% 46 0% 31 31 91 91
8 8 1 1
VectorWriter 106 0% 2 0% 13 13 28 28
12 12 1 1
NOPLogger 64 0% n/a 38 38 42 42
38 38 1 1
NOPLoggerRepository 42 0% n/a 16 16 16
16 16 16 1 1
RootCategory 26 0% 2 0% 5 5 10 10
4 4 1 1
RootLogger 22 0% 2 0% 4 4 8 8
3 3 1 1
ThrowableInformation 2070 78% 24 67% 3 7 7
26 2 4 0 1
Filter 11 0% n/a 4 4 5 5 4
4 1 1
DefaultRepositorySelector 9 0% n/a 2 2
4 4 2 2 1 1
NullWriter 6 0% n/a 4 4 4 4
4 4 1 1
If I click on ThrowableInformation class, I see method level details as below:
ThrowableInformation
Element Missed Instructions Cov. Missed Branches Cov. Missed Cxty
Missed Lines Missed Methods
Total 20 of 90 78% 2 of 6 67% 3 7 7 26
2 4
ThrowableInformation(String[]) 11 0% 2 0% 2 2
4 4 1 1
getThrowableStrRep() 664 91% 4 100% 0 3 2
18 0 1
getThrowable() 3 0% n/a 1 1 1 1
1 1
ThrowableInformation(Throwable) 6 100% n/a 0 1
0 3 0 1
Where-as my csv report only has entry at the class level and not at method
level.
test-jacoco org.apache.log4j.spi ThrowableInformation 20 70
2 4 7 19 3 4 2 2
Method level information is available in xml also. My question is how can I get
method level information in csv report?
I'm using maven report generation to generate the jacoco report.
Thanks and appreciate your help. Jacoco is really awesome.
Thanks,
Abhijith
--
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].
For more options, visit https://groups.google.com/d/optout.