Associating tests with keywords

You can automate an IBM® Engineering Test Management 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 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 TestRecord 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 TestAssociate Test.
    The Select Test dialog 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 is displayed when you associate a test with the keyword for the first time. This dialog 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 Engineering Test Management 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 Engineering Test Management, 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 Engineering Test Management

When you run a manual test that contains a keyword from Engineering Test Management, the test associated with the keyword, if any, is run on the workstation on which the Engineering Test Management 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 Engineering Test Management, create a test case.
  2. Create a test script name and associate an existing test script with the test case in Engineering Test Management.
  3. Execute the test case and view the results of the test execution after the playback. For information, refer the Engineering Test Management information center.