Working with Test Scripts |
A TestManager user can define and set execution options. For example, a user can:
repeat_count
and assign it the value 3.
TSSUtility.GetScriptOption
, and branch based on the returned value of the option.
Test script options can be set at these levels of generality, where 1 is the highest:
The Test Script Execution Engine implements identically-named options hierarchically, with lower level settings overriding higher level settings. Thus, if you set the option named repeat_count
to a different value at each of the levels listed above, the lower level settings override the higher level settings:
Conversely, if you set an option only at the Test Script Type level, that setting will apply globally for this type of test script. Thus, if you set the option named repeat_count
to the value 3 and the Test Script Type level, the option will have this value in all instances.
To edit a test script option from Test Manager at the Test Script Type level:
A test script source is a location where designated test scripts are stored. To edit a test script option at the Test Script Source level:
To edit a test script option at the Test Script Asset level:
The Test Script Options dialog box opens. Set or change the desired option values as explained in Setting or Viewing Option Values.
To edit a test script option for a script instance in a suite:
To edit a test script option for a test case instance:
You edit test script options from the Test Script Options dialog box. To open this dialog box, in TestManager, click View > Test Scripts. Right-click a test script type, test script source, or test script, and then click Test Script Options.
To set a new option value, type its name in the Option Name column and its value in the corresponding Option Value column, and click OK. To change an existing option setting, click the Option Value column of the appropriate row, type its value, and click OK.
When you record a test script with Robot, the compiled .dll file includes the name of the computer from which the script was recorded. At playback, TestManager checks the name of the computer where playback is to occur against the name of the computer embedded in the .dll name. If the names do not match, TestManager does not compile and play back the .dll file.
TestManager undertakes this name-checking for the following reasons:
If you want to run a test script on a different computer than the one where it was recorded, do the following:
For information about watch (.wch) files and generating scripts from .wch files, see the Rational Robot online Help.
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 |