background image
<< Java Applications and Applets | Setting C++ Compiler Options >>
<< Java Applications and Applets | Setting C++ Compiler Options >>

Visual Basic Applications

Instrumenting the Application-Under-Test
3-4
Visual Basic Applications
If the AUT is written in Visual Basic 4, you can only instrument its source code files.
If the AUT is written in Visual Basic 5 or 6, you can instrument either the source
code files or the executable file.
If you have access to source code files for the AUT, we recommend that you
instrument these files instead of the executable file. TestFactory instruments Visual
Basic source code at the branch level, and instruments an executable file at the
statement level. Because TestFactory takes into account the if, then, and else
conditions in instrumented source code, it displays more detailed code coverage
values for instrumented source files. You can also instrument the source files of
secondary applications that the main application calls and executes. This lets you get
coverage information for scripts that exercise the secondary applications.
Instrumenting C++, Visual Basic, and Java Object Code
If you want to instrument the object code of an AUT written in C++ or Visual Basic
5 or 6, you must first make an .exe file and a .pdb file that is located in the same
directory as the .exe file. There are no specific requirements for instrumenting the
object code of a Java application or applet.
Setting the Compiler Option for a Visual Basic 6 Application
If the AUT is written in Visual Basic 6, and you did not install Rational PureCoverage
as a Visual Basic add-in, you need to set the compiler option before you make the
.exe and .pdb files.
To set the compiler option for an AUT written in Visual Basic 6:
1. Open the .vbp file in Notepad.
2. Add the following lines at the end of the .vpb file:
[VBCompiler]
LinkSwitches=-Fixed:no
3. Save the .vbp file and quit Notepad.