Copying test artifacts

Test artifacts can be reused by copying existing artifacts. The copied artifacts can then be modified without affecting the original test artifact.

In general, the copy operation is referred to as duplicating test artifacts. You can initiate a duplication of a test artifact from the list view or from the artifact editor. Test artifacts can be duplicated to the same project area or to a different project area.

For example, you might duplicate test case execution records from an older test iteration to the next iteration, and then modify the duplicated execution records to test against different environments.

Duplicating artifacts to the same project area

When you duplicate a test artifact to the same project area, the test artifact is duplicated and by default the copy refers to all the associated test artifacts (except test case execution records and test suite execution records). You can choose the copy depth of the duplicated artifact by selecting or clearing options.

For example, if you clear Duplicate with references, a blank artifact is created without links to the original associated artifacts. Otherwise, if you duplicate a test plan using default options, the content of the test plan, such as the business objectives and quality objectives, are copied. However, the duplicated test artifact refers to the associated test artifacts, such as the test cases and test scripts. The duplicated test plan refers to the same test artifacts as the original test plan.

Duplicating artifacts to different project areas

When you duplicate a test artifact to a different project area, many of the fields and the associated test artifacts are also copied.

You cannot link across project areas. Therefore, changes that you make to the duplicated test artifacts in a different project area do not affect the original test artifacts. The test artifacts that are copied to a different project area include these elements:
  • Test Plans
  • Test Cases
  • Test Suites
  • Test Scripts
  • Test Data
  • Test Case Execution Records
  • Test Suite Execution Records
  • Test Environments
  • Keywords
Test execution results cannot be copied to a different project area.
Note: If you have not enabled configuration management, when you duplicate a test plan or test case artifact to another project area, if the original artifact contains a link to a requirement artifact in a Requirements Management application, then the requirement link is also created in the duplicated artifact, even if the target project does not have an association to a Requirements Management application.

Fields and artifacts that are not copied

Certain fields are not copied when duplicating test artifacts to a different project area. Fields that indicate the state of a test artifact, such as state, review, results, or work-item fields, are not copied. The fields are not copied because copied test artifacts are intended to be new, and, therefore, do not have a status. Fields that are related to lab resources, such as platform coverage or test environments, are not copied because of the uncertainty that the same resources exist in the target project area.

In addition, test artifacts that must be mapped to test artifacts of the target project area are not copied. These test artifacts include the following elements:
  • Categories for test plans, test cases, and test suites
  • Channels
  • Custom attributes
  • Quality Objectives
  • Risk Assessments
  • Risk Factors
  • Shared Resource Locations
  • Templates for test plans and test cases
  • Test case execution records
  • Test Environments
  • Test Teams
You are prompted when you encounter test artifacts that need to be mapped. You can select the existing test artifacts of the target project area before duplicating. The destination project must have an equal or greater number of category types than the source project.

Copying and replacing test artifacts that are associated to multiple parent artifacts

You can copy and replace a test case, test suite, or test script that is associated to multiple parent test artifacts. You do this by selecting the artifacts to copy in a list view, and then from the Action menu, clicking Copy and Replace <Artifacts>. Copying and replacing artifacts is useful when you want a parent artifact to have its own copy of a child artifact instead of sharing it with other parent artifacts. After copying and replacing an artifact, modifications to the duplicated artifact do not affect the other uses of the copied test artifact.

Only the test cases, test suites, and test scripts that are associated with more than one parent artifact are copied. The copied artifact is associated with the current parent artifact, and that association replaces the original artifact association. For test cases, the test scripts that are associated to the original test case are also copied and associated with the new test cases.

After test scripts are copied and replaced, the list of test scripts is refreshed and the copies are listed instead of the original items. Only the test scripts that are associated to more than one test case are copied and replaced.

Working with duplicated artifacts

After the test artifacts are copied, you can make changes to the new artifacts.
Attention: When duplicating test artifacts to the same project area, references in that copy point to the original test artifacts. For example, when copying a test plan to the same project area, the test cases in the copy refer to the original test cases.

You can view the relationships of copied artifacts within artifact table views, such as Browse Test Plans, by adding the Copy Root and Copied From columns. You can set column display settings from the Action Bars by clicking the Change Display Settings Change Display Settings icon. You can also use Copy Root to view the oldest ancestor of a copy when you have multiple versions of an artifact.

Cloning versus copying (duplicating) artifacts

If you have enabled configuration management in your project area, you can clone a QM artifact. When you clone an artifact, a new version is added to the stream that you work in, and that artifact now exists in two different configurations. To help you decide which operation to use, see the table Comparison of cloning and copying (duplicating) operations.


video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki