
C++ unit testing with Qt Test, part 2: advanced testing - vivaladav
http://blog.davidecoppola.com/2017/11/cpp-unit-testing-with-qt-test-advanced/
======
malkia
Talking about unit testing, what are people using for coverage, and more
specifically on Windows + MSVC (Professional, or Community)?

What are the sane choices there? (I've installed OpenCppCoverage two days ago,
and so far so good, but wondering about other choices)

[https://opencppcoverage.codeplex.com/](https://opencppcoverage.codeplex.com/)
[https://github.com/OpenCppCoverage/OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage)
[https://github.com/OpenCppCoverage/OpenCppCoveragePlugin](https://github.com/OpenCppCoverage/OpenCppCoveragePlugin)

~~~
user5994461
The only free thing I found to sort of work is gcov. It's integrated in gcc.
Many projects compile on both gcc and msvc.

Compile the unit tests with the coverage flags. Run the exe. Collect the
coverage file.

~~~
malkia
Not possible for us yet, or maybe I haven't tried it well enough...

------
rasjani
Qt creator integration relies

~~~
rasjani
Heavily on the directory structure and how one sets up the the qmake's pro
files. This is very cumbersome for mono repos with multiple build targets.

~~~
hhmc
qtcreator works well with mono repo+multiple targets if you use cmake (which
is well supported).

~~~
rasjani
I know :( just wanted to point that out and emphasize that it's partly due to
qmake and how it's handled within qt creator.

