I set myself the task of automating the run of tests at a commit (for implementing this functionality, I use Jenkins). It seems to be all right, the tests are run and you can see OK / KO. However, this is not enough for me to determine the structural coverage of a code. Searching for methods of obtaining coverage, I stopped at LCOV + henhtml. In principle, a convenient, frishny tool. However, for the time being I don’t understand how to automate the execution of the LCOV command? Actually, I have a few questions:

  1. How can I automate the execution of lcov + genhtml? After all, these commands are executed in msys, and I work in OS Windows. Perhaps I should somehow modify the MakeFile?

  2. Can I graphically display the code coverage in Jenkins? Is there any plugin for this?

  3. Perhaps there is some more convenient tool (frishny) to collect coverage?

Used software

  • NetBeans IDE 8.2

  • COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe Target: mingw32 Thread model: win32 gcc version 4.8.1 (GCC) 
  • OS Win7

  • Cppunit
  • Jenkins (Running on device under OS Win7)
  • one
    Formatted a bit of code to read better. The meaning is not broken? - Nick Volynkin
  • TeamSity in this regard, of course, taxis - Senior Pomidor
  • and you did not consider other tools for coverage, gcov, for example? It seems to integrate easily with CI. still here this yolinux.com/TUTORIALS/Jenkins-Cpp-builds.html look at the article, please. there are already several answers - Senior Pomidor
  • Senior Automator, gcov will provide me with info in text form. It is more difficult to perceive. I'm interested in Lcov, because its exhaust is more understandable (especially in my opinion). - Elies
  • Should not. Well, this is not exactly the code, but part of the gcc -v exhaust in the console. - Elies

0