Associating functional test scripts with the keywords

You can automate an IBM® Rational® Quality Manager keyword by associating it with an IBM® Rational® Functional Tester script. You can either associate an existing functional test script with a given keyword, or record a new script against the keyword and then associate the script. You can see the steps of a keyword when you associate an automated script. After a keyword is automated, you can open and execute the automated script.

Before you begin

The Keyword View must be displayed in the Functional Test perspective to associate functional test scripts with keywords. To display the Keyword View, click Window > Show View. Select Keyword View from the list, and click OK.

Recording a new functional test script for a keyword

Procedure

  1. Click the keyword from the keyword view list to record a script and associate it with a functional test script.
  2. Right-click the keyword, and click Record Keyword View: Record.
  3. Type a name for the functional test to be recorded in Script name.
    By default, the keyword name is used as the functional test script name.
  4. Click Finish.
    The Recording monitor opens and the recording starts. The keyword description is displayed in the recording monitor. For information on recording, see the related topic on Recording a script.

Associating an existing functional test script with a keyword

Procedure

  1. Click the keyword from the keyword view list to associate it with a functional test script.
  2. Right-click the keyword, and click Associate with FT script Keyword View: Associate with FT script.
    The Select Script dialog box lists the existing functional test scripts for the functional test projects.
  3. Select the functional test script that you want to associate from the list and click OK.
    The Configure shared location wizard is displayed when you associate a functional test script with the keyword for the first time.
    Note: Only Java test scripts are listed. Simplified scripts in the project, if any, are represented by their equivalent Java test script.
  4. The Configure shared location wizard specifies the shared location of the functional test project. Type the path to the parent directory of the functional test project in the Shared location field. You can also select the shared location from the Shared Locations already configured in RQM list box.
  5. Click Finish.
    If you click Cancel, the project is not configured to use the shared location. In this case Rational® Quality Manager uses the absolute path of the current project to execute the test script.
  6. Copy the project that contains the keyword-associated script to the specified shared location manually. For Rational® Quality Manager to run the script, the project with the script must be present in the shared location.
    When you associate a functional test script with a keyword, the script becomes the default script for the keyword. Only a single functional test script can be associated with a keyword. When you run the keyword from Rational® Quality Manager, the test script associated with the keyword is executed.

Running functional test scripts from Rational Quality Manager

You can either reference external resources by accessing a shared location or a local test machine. During execution of the test scripts, the test resources are copied to the test machine if it is a shared location. However, when you access resources in a local test machine, you are accessing resources on the path that you use.

Procedure

  1. In Rational® Quality Manager, create a test case.
  2. Create a test script name and associate an existing test script with the test case in Rational® Quality Manager.
  3. Execute the test case and view the results of the test execution after the playback. For information, refer the Rational® Quality Manager information center.