background image
<< Populating the Lookup Tables | Using COM Scenario Tests >>
<< Populating the Lookup Tables | Using COM Scenario Tests >>

Recompiling with the Stub

108
Chapter 4 - Testing COM Components
3
In the Datapool Properties dialog box, click Edit Datapool Data and populate the
lookup table with several rows of data, for example:
4
Click
Save
and then
Close
when you are finished.
5
Click
OK
to close the Datapool Properties dialog box.
6
If necessary, click
Close
to close the Manage Datapools dialog box.
Recompiling with the Stub
After populating the lookup tables:
1
Make a copy of the
Account
class.
2
Replace the real
Account
class in the RQACOMSample application with the
stubbed version.
3
Add a reference to "Rational QualityArchitect Playback Type Library" in the
RQACOMSample project in Visual Basic.
4
Comment out any lines in the code for complex objects.
5
Recompile RQACOMSample.
Note:
Stubs must be deployed on the same computer as the test script.
For a high-level overview of stubs, see Stubs on page 18.
Executing Test Scripts
To execute your text script in Visual Basic:
1
Open the Visual Basic project file.
2
Edit the test script (the .cls file) as needed.
3
Click
Run > Start with Full Compile
.
You can also execute test scripts from TestManager. Before doing so, be sure that
Visual Basic 6.x is included on your system path.
lAccountNo
lAmount
expectedReturn
expected Error
Generated ID 1
amount of Post
incorrect AccountNo
1003