Closed hybridcattt closed 8 years ago
I too have the same issue, but left it for later. I think, It happens if the build environment path is not reachable by Jenkins.
Open the generated cobertura XML file and check whether the filename mentioned is proper, i.e, it is not relative to your build environment and reachable by Jenkins or the shell in general.
@gbalachander I am not sure that that could be a problem, because packages, classes, files and lines are counted and have real coverage percent. Only branches and methods are missing. Would you mind to look at resulted xml (and possibly to original clove data used as an input) to get a better idea of what might be the problem?
I get this problem too, the lcov html output contains functions with the appropriate percentages etc. though. I've also noticed that the signature attribute of the method tag is empty.
I think that there are two different problems here:
lcov-to-cobertura-xml
doesn't currently emit proper method data; I found that it is crucial to have at least one <line>
element per <method>
for Jenkins to detect them. In my PR #20, I address this problem.--rc lcov_branch_coverage=1
to all invocations of lcov, which is very important to get branch coverage to work. With this option set, I do get branch coverage with the current version of lcov-to-cobertura-xml
.If this is correct, then this issue can be closed as soon as my PR is merged.
Fixed by #20
When I generate an xml and export it to Jenkins (Cobertura plugin) I always get 100% (0/0) coverage for methods and conditionals. All other stats are non-zero as expected. Produced xml contains methods data. What might be the problem?