code coverage using GCOV in QtTest
-
I need to have GCov code coverage in my qt testing and I made .pri file for testing project which contains the path of the test.cpp file and I have written the following in test.pro file:
QMAKE_CXXFLAGS += --coverage
QMAKE_LFLAGS += --coverage
LIBS += -lgcov
include(C:\Users\shraks\Documents\caltest\caltest.pri)Everything works fine but the gcov file is not created.Am I missing something or need to make some changes please suggest me.
-
See https://medium.com/@kelvin_sp/generating-code-coverage-with-qt-5-and-gcov-on-mac-os-4999857f4676
I disagree with their implementation of the test's
main
but it's not the point here -
I am using windows OS and i have just added the above code in qt i dont know how to create .GCNO files and get the coverage report.can you please share me the procedure to properly generate the code coverage report or file