Testwell CTC++ / Integration to Visual StudioFor installation please have a look to installation pageHere our context is Windows
platform. On it, when the application code is built in command line
mode (or from makefiles), and let the compiler be VC++ 5.0, VC++6.0,
VC++ 7.1 or VC++ 8.0, CTC++ is readily usable. See
the basic CTC++ description for more.
The help of
these IDE integration packages are not needed in such usage. When the application code is built via the
Visual Studio IDE the following is also supported: These facilitate intuitive and seamless use
of CTC++ via the coresponding IDE. These integration add-on
packages are different from their technical implementation, and
slightly also how they are used. However, the general look-and-feel is
the same in all of them. Below these integrations are described in
more detail. Testwell CTC++ Integration to Visual Studio 7.0 / 7.1 / 8.0 / 9.0 (.NET / 2003 / 2005 / 2008) IDE
(Please call for Visual Studio 10.0 (2010) integration)
The CTC++ integrations to these IDEs
are similar. Actually they are implemented by the same dialog
programs, which are also used in some other IDE integrations, notably
with CodeWarrior, Eclipse and Carbide.c++.
devenv mysolution.sln /rebuild debugThese kind of builds can be made "ctc-builds" using ctcwrap command, as follows: ctcwrap -i m -v devenv mysolution.sln /rebuild debugNext we talk of CTC++ usage in the GUI of these Visual Studio IDEs. At installation phase two CTC++ specific commands have been inserted to the Visual Studio Tools menu, as follows: ![]() Selecting CTC++ Set/Clean... brings you to the following dialog program where you set CTC++ Mode ON and select the instrumentation options that you wish to use during the coming build. ![]()
As a result the project target (all project
targets of the solution) get born as instrumented according to the
Visual Studio build rules. Next the instrumented code (.EXE, .DLL,
.LIB) is executed. It may run in the Visual Studio context or
elsewhere, in the same way as the original code. Finally the coverage reports can be
obtained using the ctcpost/ctchtml
programs either from the command line or integrated to Visual Studio
IDE. In the latter case you start the CTC++
Report... dialog program from the Tools menu. It looks as
follows:
Various types CTC++ reports can be
selected. The possible forms
of reporting are:
Cleaning the project from CTC++ The CTC++ Visual Studio .NET / 2003 / 2005 / 2008 IDE integration behaves so that the instrumented project targets (object fies, executables) overwrite the original ones. Thus, for getting back to a non-instrumented level, you just rebuild your project without CTC++. Further, in the CTC++ Build/Clean... dialog there is a subdialog Clean..., which you can use for polishing the project directory from the CTC++ generated reports and other CTC++ auxiliary files. Testwell CTC++ Integration to Visual Studio 5.0/6.0 IDEHere we show a use scenario on how CTC++
is used in this environment.
Selecting the project The first thing to do is to select the
project and its configuration, which will be tested with CTC++. This is
done by some of the normal Visual Studio 5/6 means by setting the
selected projects active. In this example the project is 'Cube'. The
active project might contain subprojects, too. CTC++ additions in the Visual Studio 5/6 Tools menu Three commands are added to the Tools menu:
Tool command CTC++ Build/Clean... gives this dialog. Here a number of selections can be made regarding what will be instrumented and what instrumentation options will be used. If there had been subprojects, each of them can be instrumented independently, or leaving the main project (main target) or some of the subprojects (subtargets) as non-instrumented. By simply clicking Build the
project's C/C++ source files are instrumented by CTC++ Preprocessor
and the needed compilations and linking are invoked for getting
the instrumented target. Normal makefile optimizations take place for
saving processing time. For example, if you have changed only a couple
of the participating source files, only they are re-instrumented and
compiled for the new instrumented target. Running the instrumented executable
This is how it looks when our sample
instrumented executable runs. You may do multiple test runs and each of
them cumulates the execution history file. Getting various CTC++ reports Tool command CTC++ Report... gives this dialog. Various types CTC++ reports can be selected. The possible forms of reporting are:
These same reports you can also generate in command line mode of CTC++ (utilities ctcpost, ctc2html, etc.). The "Untested report to Dev.Studio" report is primarily meant for developers who quickly wish to have a look what code portions have not got a hit in the tests so far. Clicking on a line in the Visual Studio
output window gives you a view to corresponding source file in the
upper right window with the pertinent line marked.
Cleaning the instrumented files and targets Once you are satisfied with the structural test coverage measured by CTC++, in functional sense you have exercised the program thoroughly and you no more have found new errors, it is time to stop the testing. The thing to do is to select Clean... in the CTC++ Build/Clean... dialog and the disk is polished from all the auxiliary files and directories CTC++ has created. Note that in the normal cource of work
CTC++ keeps your original source files and targets intact. In some
situations, say when instrumenting a DLL, you may explicitly request
CTC++ to write the instrumented target over the original one for
conveniently getting the instrumented target into execution. At
any time you can also (without doing Clean... in the CTC++
Build/Clean... dialog) build the non-instrumented project by normal
Visual Studio 5/6 means. List of Verifysoft Websites concerning CTC++
last updated: 02.10.2009 © 2007-2009 Testwell Oy / Verifysoft Technology GmbH
|



