Requirement traceability to Rational Quality Manager test script steps

Overview

One new feature of Rational Quality Manger (RQM) 4.0 is the ability to associate requirements with test script steps. This feature provides better traceability and impact analysis. Prior to RQM 4.0, the lowest level of traceability was to the test case. Using this feature, you can now manage the requirement traceability at the test script step level. After adding traceability with the test script step, testers can validate the associated requirements during test execution. If defects are created, RQM automatically creates the traceability between the defects and requirements, so various stakeholders can obtain the traceability information that matters to them.

Prerequisites

RQM 4.0 and the Requirements Management application comply with the Open Services for Lifecycle Collaboration Requirements Management (OSLC-RM) Version 2.0 specification. For example, Rational Requirements Composer (RRC) 4.0 is an OSLC-RM Version 2.0 provider, and this product is used as the example in this article. RQM also provides support for this feature, together with Rational DOORS Version 9.4 or later. Currently, RQM does not support this feature for integration with Rational RequisitePro.

Configuration

To use the test script step traceability feature, you must first configure the integration.

  1. Associate one RRC project area to the RQM project area as one Requirement artifact container, as shown in Figure 1.

    Set up the Requirement artifact container

    Figure 1. Set up the Requirement artifact container

  2. Allow linking between requirements and test script steps on the Manage Project Properties page. As shown in Figure 2, select the option in the Manage Project Properties, Properties, Test Script Preferences page.

    Allow linking between requirements and test script steps

    Figure 2. Allow linking between requirements and test script steps

    Allow linking between requirements and test script steps: Enabled by default. Clear this check box to prevent requirements that are associated with a test case or project from being linked to test script steps.

    Copy Requirement links into Test Cases when adding new child Test Scripts: Select this check box so that when you add existing test scripts to a test case, requirement links associated with the test scripts are automatically copied to the parent test case.

Using the feature to improve requirements traceability

In this section, you can review the capabilities of the test script step traceability feature and find out how you can benefit from its use.

Test script traceability feature at a glance

Test Script editor enabled with requirement traceability

Figure 3. Test Script editor enabled with requirement traceability

In Figure 3, notice that there is one column, Validates, in the test script editor. This column shows the requirements that are validated by this test script. Requirements listed in this column means that the test step validates these requirements. At the right part of the editor is a table, Requirement View, which lists all the requirements associated with the parent test cases of the test script, rather than any other sets of requirements. The Associate requirements with test script steps section shows you how to create requirement traceability with a test script step.

Note: You can only see the Validates column after setting up the test script step traceability feature by following the steps in the Configuration section. The Requirement View table is only displayed when the test script step traceability feature is set up and this test script has parent test cases.

Associate requirements with test script steps

In the test script editor, you can:

  • Associate the requirements in the Requirement View with specific test script steps
  • Remove the associations from the test script step if the traceability changes
  • Associate other requirements that are not in the Requirement View

In this example, consider a situation where the Requirement View table is empty. That is because the parent test cases of this test script have no associated requirements. Now, add some requirements to those test cases. After refreshing the test script editor, some requirements appear in the Requirement View table. This table has two columns: Requirement and Test Cases. It shows all the requirements associated with the parent test cases of the test scripts. Each line shows one requirement and its associated test cases. If several test cases all have the same requirement, this requirement line shows all the test cases with numbering. You can hover over the requirement link or the test case link to view the detailed information for them.

Requirement View in test script editor

Figure 4. Requirement View in test script editor

To add the requirement to one specific test script step, you can use either of the following two methods.

  • Select requirements to add from the Requirement View table.
    1. Click a test step. The background color of the test script step changes to indicate that the step is selected.

      Select one test script step

      Figure 5. Select one test script step

    2. Click a requirement in the Requirement View table. The background color of the row also changes. You can select multiple requirements by pressing the Ctrl button when selecting requirements. Figure 6 shows that two requirements are selected.

      Select the Requirements in the Requirement View

      Figure 6. Select the Requirements in the Requirement View

    3. Right-click the selected requirements; then click Add Requirement.

      Right click and then click Add Requirement

      Figure 7. Right click and then click Add Requirement

  • Drag and drop requirements to a test script step.
    1. Click the requirement in the Requirement View table. The background color of the row changes to show that it is selected. You can also press the Ctrl button when selecting multiple requirements.

      Drag and drop to add requirements to a test script step

      Figure 8. Drag and drop to add requirements to a test script step

    2. Drag the selected requirements to the step where you want to add traceability.

The associated requirements are shown in the Validates column. After saving the test script, traceability between the test script step and the requirement is established.

Requirements added to one test script step

Figure 9. Requirements added to one test script step

Track the traceability of test scripts and requirements

After adding the test script step to requirements traceability, you might want to see an overview of the traceability status of all the test scripts. RQM 4.0 provides this capability in a new feature called Traceability View.

Test script traceability view

Figure 10. Test script traceability view

As shown in the previous figure, each line of the table shows a test script and its associated requirements. Hovering over the requirement opens one preview tooltip to show the detail information of the requirement. In this table, the traceability is not detailed to the step level. If you want to see the detailed traceability to test script steps, you can open the test script to view them in the test script editor.

Validate the requirements during test execution

The association of requirements to a test artifact helps with requirements validation during testing.

Generally, to validate the requirement, during the test execution a tester needs to check if the requirements are fulfilled in the to-be-tested system. If any requirement is missing, a tester can create a defect to report the issue, and link the requirement to the defect to indicate that the requirement is not met. For proper logging, the test case execution result needs to record which requirements are already validated and met, and which are not.

In RQM, the validation happens when testers are executing the test case execution record and the validation results are reflected in the test case execution result. The necessary traceability is created automatically.

Figure 11 shows the UI when a test case execution record is executed. As in the test script editor, you can see an additional column, Validates. This column lists the requirements for validation. When testing according to the step, a tester can hover over the requirement link to view the requirement to validate that it is satisfied. If it is not met, or if for some other reasons the tester creates a defect, links are automatically attached to the defects to show the validation failure, as in Figure 12. All roles in the team could obtain the necessary information for this failure through the linking. For example, developers could trace requirements and check with their implementation to see the difference.

Validate the requirements during running test execution

Figure 11. Validate the requirements during running test execution

The defect is created and the Affects Requirement is created automatically

Figure 12. The defect is created and the Affects Requirement is created automatically

Review the validations of the test script in the test case execution result

After executing the test case execution record, a test case execution result is created. In the result details, the Validates column lists validated requirements by the test script. It can be used to either check traceability or to trace to the validated requirements.

Validate the requirements in the test execution result

Figure 13. Validate the requirements in the test execution result

For more information


About the author

Bing Dong Ma is a developer of Rational Quality Manager in the China Software Development Lab. He can be contacted at mabingd@cn.ibm.com.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Feedback
Was this information helpful? Yes No 3 people rated this as helpful.