PDA

View Full Version : QtCreator and Google Test -> Code coverage



gawron103
28th August 2017, 15:25
Hi all!

First of all I would like to say hello to everyone! It's my first post here so I thought that it would be nice to greet earlier :D
I got a problem with code coverage. So first things first. I got my program and I got my test program with all cases etc. As i read earlier I should install gcov and lcov, add 3 lines of code to my test .pro file and at the end give couple arguments. Done! But ... something's wrong. As I can see file main.gcda was processed. After that file .info was created. Good. Next step was reading tracefile in file coverage.info and after that I got "Extracted 0 files" message. Next step should be writing data to coverage-stripped.info but my summary coverage rate is "no data found". Definitely somethings wrong but... what ? I tried to do everything from here -> http://www.robertwloch.net/2013/06/generating-lcov-coverage-with-qtcreator/ Would love to get some help, doesn't matter if here on in priv.

wysota
29th August 2017, 06:41
Hello and welcome.

Since you are using some custom tutorial the problem you are facing is not related to Qt in any way but rather to that tutorial. Please show us what exactly you typed in where and what was the output you got.