Associating tests with keywords

You can automate an IBM® Rational® Quality Manager keyword by associating it with a Web UI test. You can either associate an existing test with a given keyword, or record a new test against the keyword and then associate the test.

Before you begin

The Keyword View must be displayed in the Web UI Test perspective to associate tests with keywords. To display the Keyword View, click Window > Show View. Select Keyword View under the Test category, and click OK.

Recording a test for a keyword

Procedure

  1. Click the keyword from the keyword view list to record a script and associate it with a Web UI test.
  2. Right-click the keyword, and click Record Test Record Test.
  3. Type a name for the test to be recorded in Test name. By default, the keyword name is used as the test script name.
  4. Click Finish. The Recording monitor opens and the recording starts.

Associating an existing test with a keyword

About this task

You can only associate Web UI tests with a keyword. External tests like Selenium tests cannot be associated with a keyword. However, you can associate a compound test that contains a Selenium test with a keyword.

Procedure

  1. Click the keyword from the keyword view list to associate it with a Web UI test.
  2. Right-click the keyword, and click Associate Test Associate Test. The Select Test dialog box lists the existing tests for the test projects.
  3. Select the test that you want to associate from the list and click OK. The Select Test Location and Channel dialog box is displayed when you associate a test with the keyword for the first time. This dialog box specifies the location of the test project.
  4. Do one of the following:
    • To indicate that the associated test must be run locally, select Test will be run locally.
    • To indicate that the test must be run from a shared location, select Test will be run from the shared location.
  5. If you selected Test will be run from the shared location, type the path to the parent directory of the test project in the Select the shared location field, and ensure that you copy the project that contains the keyword-associated test to the specified shared location manually. For Rational Quality Manager to run the test, the project with the test must be present in the shared location.
  6. To select the channel of execution for the keyword-associated test, select the Select Channel check box and select the required channel from the list. If no channels have been defined in Rational Quality Manager, the Select Channel check box and list are not available.
  7. Click Finish. To view the tests associated with a keyword, right-click the keyword in the Keyword view and click Show Associated Tests.

Running manual tests that contain keywords from Rational Quality Manager

When you run a manual test that contains a keyword from Rational Quality Manager, the test associated with the keyword, if any, is run on the workstation on which the Rational Quality Manager adapter is running.

About this task

You can either reference external resources by accessing a shared location or a local test machine. During execution of the tests, 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.
Feedback