How To Clone Test Cases In Jira Xray

If you are using the Jira Xray extension, there may come a point where you need to duplicate a test case. For example, you may have a test case that you wish to serve as a blueprint for other related cases, or you may need to replicate a case for regression testing. This article will guide you through the process of cloning a test case in Jira Xray.

Steps to Clone a Test Case in Jira Xray

Cloning a test case is quite straightforward, here are the steps:

  1. First, open the test case you want to clone.
  2. Next, find the “More” drop-down menu. This is usually found towards the top-right of the screen.
  3. From the “More” menu, select “Clone” option.
  4. A pop-up window will appear, in this window you can make any necessary changes to the clone.
  5. When you’re done making changes, click “Create” to finalize the clone.

It’s important to note that the cloned test case will carry over all the properties of the original test case, including the status, priority, and assignee. You can modify these properties as needed after the clone is created.

Cloning a Test Case via API

You can also clone a test case using the Xray API. Here is an example of how you might do this. The following POST request would clone a test case with the ID “TEST-123”:

    curl --request POST \
      --url 'https://xray.cloud.xpand-it.com/api/v1/issue/TEST-123/clone' \
      --header 'Content-Type: application/json' \
      --data '{
        "project": "TEST",
        "summary": "Cloned test case",
        "description": "This is a description of the cloned test case"
      }'
    

This request will create a new test case in the project “TEST”, with the summary “Cloned test case” and the description “This is a description of the cloned test case”.

Conclusion

Cloning test cases in Jira Xray is a useful feature that can save you a lot of time when you need to create similar test cases or repeat a test case for regression testing. We hope that this guide has been helpful in explaining how to clone test cases both manually and via the Xray API.