Working with Test Scripts

prevnext

Using Test Script Options


A TestManager user can define and set execution options. For example, a user can:

Test script options can be set at these levels of generality, where 1 is the highest:

  1. Test Script Type

  2. Test Script Source

  3. Test Script

  4. Test Script in a suite

  5. Test Case implemented by a test script

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.


Editing Test Script Options for a Test Script Type

To edit a test script option from Test Manager at the Test Script Type level:

  1. From TestManager, click Tools > Manage > Test Script Type. The Manage Test Script Type dialog box opens.

  2. From the list of existing test script types, click the type whose options you want to edit.

  3. Click Edit. The Test Script Properties dialog box opens.

  4. Click the Execution Adapter Type tab.

  5. Click Test Script Options ... . The Test Script Options dialog box opens. Set or change the desired option values as explained in Setting or Viewing Option Values.


Editing Test Script Options for a Test Script Source

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:

  1. Perform steps 1-3 as described above in "Editing Test Script Options for a Test Script Type".

  2. From the Test Script Properties dialog, click the Sources tab.

  3. From the list of sources, click the appropriate source location.

  4. Click View.

  5. Click the Configuration tab.

  6. Click Test Script Options ... . The Test Script Options dialog box opens. Set or change the desired option values as explained in Setting or Viewing Option Values.


Editing Test Script Options for a Test Script

To edit a test script option at the Test Script Asset level:

  1. From TestManager, click View > Test Scripts. The Test Scripts dialog box opens.

  2. Do one of the following:

    1. Right-click a test script type folder and then click Test Script Options ....

    2. Open a test script type folder, browse to a test script, right-click and then click Test Script Options ....

      The Test Script Options dialog box opens. Set or change the desired option values as explained in Setting or Viewing Option Values.


Editing Test Script Options for an Instance in a Suite

To edit a test script option for a script instance in a suite:

  1. In TestManager, click File > Open Suite .... The Open Suite dialog box opens.

  2. From the list of existing suites, click the suite to open.

  3. Click OK. The Suite dialog box opens.

  4. Open the appropriate user group and browse to a test script.

  5. Right-click the test script and then click Run Properties. The Run Properties of Test Script dialog box opens.

  6. Click Test Script Options ... . The Test Script Options dialog box opens. Set or change the desired option values as explained in Setting or Viewing Option Values.


Editing Test Script Options for a Test Case Instance

To edit a test script option for a test case instance:

  1. In TestManager, in the Planning view, expand the Test Plans folder.

  2. Right-click the test plan containing the test case and then click Open. The Test Plan dialog box opens.

  3. Expand the test cases folder containing the test case you want to edit.

  4. Right-click the test case and then click Properties .... The Test Case Properties dialog box opens.

  5. Click the Implementation tab.

  6. Click Test Script Options ... . The Test Script Options dialog box opens. Set or change the desired option values as explained in Setting or Viewing Option Values.


Setting or Viewing Option Values

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.


Moving a Test Script to a Different Computer for Playback

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:

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