Trucov is an
open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
code coverage
In software engineering, code coverage, also called test coverage, is a percentage measure of the degree to which the source code of a program is executed when a particular test suite is run. A program with high code coverage has more of its ...
analysis tool for
GCC versions 4.0 and later that aims to be a
gcov
Gcov is a Code coverage, source code coverage analysis and statement-by-statement Profiling (computer programming), profiling tool. Gcov generates exact counts of the number of times each statement in a program is executed and annotates source cod ...
replacement. Trucov improves upon
gcov
Gcov is a Code coverage, source code coverage analysis and statement-by-statement Profiling (computer programming), profiling tool. Gcov generates exact counts of the number of times each statement in a program is executed and annotates source cod ...
by providing more granular and machine readable output, such as
DOT Files representing
control-flow graph
In computer science, a control-flow graph (CFG) is a representation, using graph notation, of all paths that might be traversed through a program during its execution. The control-flow graph was conceived by Frances E. Allen, who noted that ...
of the program. The use of
DOT Files allows for other common tools like
GraphViz
Graphviz (short for ''Graph Visualization Software'') is a package of open-source software, open-source tools initiated by AT&T Labs, AT&T Labs Research for Graph drawing, drawing graph (discrete mathematics), graphs (as in Vertex (graph theory ...
to be used to produce coverage graphs. Trucov was developed as a senior design project
[{{Cite web, url=http://eecscapstone2009.blogspot.com/2009/09/cpts-team-trucov.html, title=WSU EECS Senior Design Projects: Fall 2009: CPTS Team Trucov: Progress report poster 10-5-09, date=18 September 2009] at
Washington State University
Washington State University (WSU, or colloquially Wazzu) is a Public university, public Land-grant university, land-grant research university in Pullman, Washington, United States. Founded in 1890, WSU is also one of the oldest Land-grant uni ...
.
Features
* Produces coverage analysis on a per source, per function, and per branch level
* Provides both textual and graphical coverage reports that are easier to use and understand
* Automatically finds all the source files inside of a project
* Detects how many times a particular block or branch of code has been executed
* Generates the
control-flow graph
In computer science, a control-flow graph (CFG) is a representation, using graph notation, of all paths that might be traversed through a program during its execution. The control-flow graph was conceived by Frances E. Allen, who noted that ...
of each function per source file
* Optionally hides coverage information of external libraries to better focus on the product under test
* Allows user to narrow the scope of coverage information by specifying specific functions or files
References
External links
Trucov homepage
Free software testing tools