Working with Test Scripts

prevnext

Compiling Test Scripts


When running a test script, TestManager checks the time stamp of the .dll against the .cls, .vbp, and .res files. If the .dll is out of date, TestManager compiles the script before running it.

To compile a script, TestManager locates the Visual Basic compiler on your computer's system path. If TestManager can't find a compiler, it generates an error.

For information about running scripts with TestManager, see the Rational TestManager User's Guide.

Compiled test scripts are stored as follows:

Long test scripts may cause memory errors (because of a Visual Basic limitation). If you encounter memory errors during compilation, generate (or write) smaller test scripts.


Name of the Compiled File

When you compile a QualityArchitect test script in Visual Basic, standard Visual Basic naming conventions apply to the resulting .exe file.

When your test script is compiled through TestManager, the .dll file is assigned a name according to the following format:

mmm_sss

In this format, mmm is the name of the computer where the script was recorded and generated, and sss is the user-assigned script name. For example, if you record a script on a computer named echo and you name the script Test1, the full name of the .dll file is as follows:

echo_Test1.dll


Name-Checking at Playback

Before TestManager plays back a compiled script with a name in the mmm_sss format, it checks that the name of the computer where the compiled script runs matches the computer name embedded in the .dll file name. If the names don\xd5 t match, TestManager does not execute the script.

TestManager undertakes this name-checking to ensure that a script is executed in the same COM environment in which it was recorded. For more information, see Moving a Test Script to a Different Computer for Playback.

prevnext


Rational Test Script Services for Visual Basic Rational Software Corporation
Copyright (c) 2003, Rational Software Corporation http://www.rational.com
support@rational.com
info@rational.com