Linux
- CovTool – Free test coverage analyzer for C++
- ggcov – GTK+ GUI for exploring test coverage data produced by C and C++ programs compiled with gcc –coverage.
- lcov – graphical front-end for GCC’s coverage testing tool gcov. Creates HTML pages containing the source code annotated with coverage information.
- Trucov – open source program that works with the GCC compiler to display the control flow of a program and its test coverage information
STEPS:
1) add CXX, CFD + LINKER FLAGS
2) remove OBJS output dir and generate .o .gcov,… to root project directory
3)remove MOC directory output for Qt app
3)run gcov xx.cpp
— generate html
sudo apt-get install lcov (http://ltp.sourceforge.net/coverage/lcov.php)
lcov --capture --directory ~/dev/Applications/AtomixApp/AtomixApp --output-file coverage.info
How to use articles
- http://rachelbythebay.com/w/2011/06/01/coverage/
- http://meekrosoft.wordpress.com/2010/06/02/continuous-code-coverage-with-gcc-googletest-and-hudson/
- http://www.semipol.de/archives/320
- http://www.qtcentre.org/threads/20736-Gcov-with-Qt
How to integrate with jenkins
- http://www.semipol.de/archives/320
- http://meekrosoft.wordpress.com/2010/06/02/continuous-code-coverage-with-gcc-googletest-and-hudson/
- http://rachelbythebay.com/w/2011/06/01/coverage/
- http://stackoverflow.com/questions/13585721/how-to-display-gcov-html-result-in-jenkins
- https://wiki.jenkins-ci.org/pages/viewpage.action?pageId=45482230
- http://meekrosoft.wordpress.com/2010/06/02/continuous-code-coverage-with-gcc-googletest-and-hudson/
Leave a Reply