Which can be sued to generate the code coverage report for Qt test cases,lcov or gcovr

60 views Asked by At

Some references states that Qt is not covred using lcov.

So need to confirm wheater lcov or gcovr be used for Qt.

1

There are 1 answers

0
amon On

Both gcovr and lcov can be used to generate coverage reports for any program that is compiled with the GCC compiler, and to some degree also when the Clang compiler is used.

In either case, it is important to adjust the compiler and linker flags so that --coverage is enabled, and to do a full recompile of your program.

I am not sure what references you have found that there would be problems when using lcov for Qt-based applications. Possibly, this alludes to the fact that the Qt source code itself would typically be excluded from the coverage reports (focusing the report on your own files).