Using gcovr to show zero coverage - code-coverage

we try to use gcovr to generate coverage report for our c++ project in Jenkins.
I was able to get it worked, but I'm stuck with one problem. gcovr doesn't show any statistics for files with zero coverage - they have only .gcno files, no .gcda files are produced and gcovr don't show it in results.
So I have 80% coverage for the whole project, but only 2 tests were written and it's actually 80% coverage only for source files involved in tests.
For large project it makes of course no sense to use such statistic.
I have found https://software.sandia.gov/trac/fast/changeset/2766 this changeset as solution for this ticket https://software.sandia.gov/trac/fast/ticket/3887, but it seems not to be working.
Did I miss something?
p.s. I use gcovr 3.1-prerelease

Related

Is it possible to show trends from an lcov report in jenkins?

I have an lcov report which produces a pretty html report and an lcov.info file. I want to see on jenkins whether our code coverage is improving or degrading. Is it possible to do this with an lcov report? I can do it using cobertura, but for various reasons we need to stick with lcov. We also need to see statements, branches, functions and lines.
The coverage report is being produced by istanbul/nyc.

Can nose test's coverage report only show files that don't have 100% coverage?

Nose has a very thorough report for the coverage in the files that you run it for. Here's an example report.
This report is usually extremely long since I have lots of files that I need to run coverage for.
How can I generate a report for only the files that have less than 100% coverage?
Thank you!
The report you see is produced by coverage.py, the software nose uses for coverage measurement. Coverage.py doesn't yet have a feature to omit 100% files. So there isn't a way to generate a report like you want.

Aggregate jmockit-coverage output with emma coverage output

Is there a way to aggregate code coverage data from jmockit-coverage and emma coverage? I can run the two different coverage steps in two separate junit ant tasks and generate the coverage data in two directories. Just not sure if the coverage outputs from these two are compatible and can be merged to display together.
No, they can't be aggregated into a single HTML report, since these are two different code coverage tools, which know nothing about each other. Of course, someone could create yet another tool which would do that; personally, I don't see much value in it, though.

JaCoCo in Sonar does not include all source files

I use JaCoCo for IT coverage in Sonar in Java language. Some IT code coverage is reported, and the reported results appear to be sound. However, I noticed that not all source code was included in the IT coverage analysis. Looking at the "Components" view, many Java packages show rules %, cobertura unit test coverage %, but nothing for IT coverage. I have not included or excluded any files, I would therefore expect IT coverage to show 0% if no code from this package was covered? I know there should be some % on a set of files, but Sonar does not display anything for it (again, rules % and cobertura % are shows).
I will try to explicitly include some class files, but I am still puzzled regarding why all sources are not included for JaCoCo analysis. The files are imported to Sonar because rules violations work fine on them.
I guess that if you do not see any results on some specific files/packages, this probably means that no IT covers those parts of your source code.

NCover branch Coverage

I am using the Ncover 2.1.2.3625. I want branch coverage and sequence coverage. How to get this?
The .xml generated is given to the NCoverExplorer to generate the full coverage report.
But the full coverage report is not generated. What is the reason for this?
Branch coverage should be displayed for any successful coverage run, but to get symbol/sequence coverage, the PDB files for the source code must be placed in the directory with the tested assemblies.
A valid coverage file should produce a full coverage report (unless the coverage file is empty). If you can post any error messages, that would help track down the problem.

Resources