Squish Coco is a complete code coverage tool chain for Tcl, C# and C/C++ programs that runs on Apple® Mac OS X, Linux™ and Microsoft® Windows. It analyzes the performance of an application being exercised (e.g. by a test suite), to reveal important information that can improve the testing of Tcl, C# and C/C++ applications.
In particular, Squish Coco helps to
Squish Coco can identify which portions of the source code are covered by a test. It can detect whether a new test covers lines in the source code that the existing tests do not cover.
This is particularly useful for manual testing.
This makes it possible to see which tests are affected by source code modifications and also to get some measure of the test coverage of a patch or hot fix.
Squish Coco can be used at every stage of testing and for all testing methodologies (unit tests, automatic tests, manual white box tests, black box tests, etc.). A test suite can be divided into independent parts: Squish Coco makes it possible to merge multiple execution reports into a single unified report.
The main components of the Squish Coco package are two separate tools and an add-in:
There are also several helper programs for report generation, coverage data manipulation and license management.
CoverageScanner instruments the source code that is seen by the compiler, without touching the original code. It generates an instrumented executable, shared library or plugin. The instrumentation keeps track of the code that is executed when the executable is run or when the library or plugin is used (e.g. how many times each line is executed, or whether a line was executed at all). When the instrumented program terminates, it produces an execution report.
In order to get the best quality of code coverage metrics, CoverageScanner not only instruments at the function and statement level, but also records statement coverage and decision coverage information. Optionally, it is also possible to insert the test name and its execution status (“passed” or “failed”) into the report. This can be done by a batch script or directly in the application. That makes it possible to integrate CoverageScanner into a test framework (like CppUnit or CxxTest), where it generates separate coverage information for each test.
CoverageScanner is a command line tool which replaces the compiler that is normally used to build the executable, library, or plugin. Its main functionality is to insert instrumentation instructions into the preprocessed source code and then to compile this modified code instead of the original code, using the normal compiler. CoverageScanner works with almost any standard compiler, including GNU gcc, GNU g++, Microsoft® Visual Studio® 6.0, .NET, Express, and Embedded C++, Intel® C++, etc. A database (the .csmes file) is generated at the same time for later analysis. It contains the list of instrumentations and a copy of the instrumented source code. CoverageScanner can work with most compilers because it can be easily configured for them.
After compilation, the instrumented executable can be run as usual (and an instrumented library or plugin can be used via the program that accesses them), but now, when the program terminates, an execution report is produced (the .csexe file).
The execution report in the .csexe file can be analyzed and managed with the CoverageBrowser tool. This program has a GUI (graphical user interface) by which the user can browse and manage their execution reports. This makes it straightforward to locate untested or unreachable code and inefficient tests.
A summary of CoverageBrowser’s abilities: