If you have test scripts that fulfill multiple
requirements, you can link a test script step to one or more requirements.
Before you begin
- Link a Quality Management project to a Requirements Management
project.
- Add test scripts to a test case that has associated requirements.
- By default, linking between test script steps and requirements is not enabled. To display the
linked requirements in the Attachments/Links section of the manual test
script editor, see Setting test script preferences for requirements management.
Limitations: If you do not enable
configuration management, when you create a link to external artifacts in the Engineering Lifecycle Management
application, a link is automatically created back to the source artifact, which is called a back
link. However, the synchronization between bidirectional links and the traceability between source
and target artifacts might be unavailable depending on certain transactional operations in the
source or target application.
Learn more about bi-directional links:
When you can navigate from the target of a link back to the
source of the link, this is known as bidirectional linking.
If the configuration management is enabled in the Quality
Management project, the links are stored in the source artifact repository and back-links are
discovered by the target artifact server making queries on the source artifact servers or
LDX.
If configuration management is not
enabled, the source and target applications store their links in separate databases, and the source
application does not have access to the database in the target application. Certain transactional
operations, such as when artifacts are copied or deleted, can occur on the source application
server. In these cases, corresponding back links in artifacts in the target application are not
automatically added or removed. Also, instances occur where back links are intentionally removed
from the target application without removing the corresponding link from the source application. As
a result, if bidirectional links are not in a state of synchronization, traceability between the
source and target artifacts can appear different based on your starting viewpoint.
To add or remove target artifact links to or from the source artifact,
you do not need permission to save the target artifacts.
Procedure
- Open an existing test script () or create a new
test script ().
-
If the attachments and links column is not shown, click the Show/hide
Contents icon, and then select the Show Attachments/Links check
box.
- To link a single step to a requirement that is
associated with the parent test case:
- From the manual test editor toolbar, click the Show Requirement
View icon (
) to open the Requirement View.
-
In the Requirement View, select one or more requirements, and then click the Add Requirement
Link icon (
). The linked requirement is shown in the attachments and links column. Alternatively, drag
the requirement link from the panel to the attachments and links column.
- To link a step to any requirement that is associated
with the project:
-
In a step, click the Action Menu icon (
), and then click Link to any Requirement.
- In the Links window, select a requirement
from the Requirements Management project that is linked to this project.
Tip: If you want requirement links in a test script to be automatically copied to the
Requirement Links section of a parent test case when you add an existing test script to the test
case, you can enable the
Copy Requirement links into Test Cases when adding new child
Test Scripts option in Test Scripts Preferences.
When this preference is enabled, it
also applies to a requirement link added to a step by using the Open Services for Lifecycle
Collaboration (OSLC) QM API. In this scenario, a link is automatically created from the test case to
the requirement that was linked to the test script step.
- Click Save.
Results
Linked requirements are displayed in the attachments and links column of the
test script.The attachments and links column on the right of the page shows a summary of all of the
linked requirements for the test script. You can hover over the requirement link to see details of
the requirement. You can also link directly from a requirement in the Requirements Management
application to a test script step. The linked requirement in the Requirements Management application
displays a Validated By link to the test script.
What to do next
To remove all linked requirements from a test
script step, click the Action Menu and select Remove
Requirements Links from step.