|
Cantata++’s coverage analysis facilities can be used independently of its testing capability. Two examples are included on this demonstration disk: the graphics program Cube and Microsoft’s WordPad. The original executable files of both programs are supplied complete with executables already instrumented using Cantata++. The instrumented versions can be run and used in exactly the same way as the originals but when they are finally closed, a coverage report file is generated. To start the original versions simply run cube.exe or wordpad.exe. The instrumented versions are named cube_ins.exe and wordpad_ins.exe and will run with no noticeable loss in performance. Cantata++ Static Information files (.csi) are generated by Cantata++ when the source files are instrumented and it is these files which contain the information about the original source code. The coverage analysis statistics are logged to cube.ctr and wordpad.ctr respectively, as clear and meaningful reports. These files may take a few moments to write when the application is closed. Full statement, entry point and decision coverage is reported for all of the C++ code used in these two examples. Try re-running the programs and using different features of the software to see how the coverage changes. In this demonstration, no test regarding the level of this coverage is made. Using the Cantata++ directives it would be straightforward to set various pass/fail or warning criteria based on the average, maximum or minimum levels of coverage obtained. Note: The Cube demo relies on two library files which may not be present on earlier Windows 95 & NT installations. These are opengl32.dll and glu32.dll. You can check whether your system has these files by looking in either the \Windows\System folder on a Windows 95 machine, or \Windows\System32 on an NT machine. |