Is there a way in to automatically link new test cases and test executions to an Xray test plan?

Rachel Barna October 3, 2019

We are using Jira Cloud plus Xray Cloud. We use a test plan for each sprint so currently we need to:

Create a test plan for a sprint
Create new tests from a Jira story/bug (test is linked to the Jira ticket)
Go back to the test plan and manually link the tests
Create a test execution for the test
Manually link the test execution to the test plan (unless we create the test execution from the test plan directly)

Ideally if it's possible to reduce the amount of manual linking that would be great!

Create a test plan for a sprint
Any new tests and test executions created for the items on that sprint are linked to the test plan as they get created

1 answer

0 votes
José Domingues [Xray]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 25, 2019

Hi Rachel, 

The Test cases in a dynamic Test Plan will be provided by a saved filter of:

  • Test issues
  • Covered issues

In the case of covered issues, Xray will automatically add all Test cases associated with the covered issues.

Dynamic Test Plans will be updated automatically by the tool. Xray will process dynamic test plans in a specified interval. Project admins are able to configure in which workflow statuses a Test Plan must be automatically updated. For example, if a Test Plan is closed, it might not be necessary to refresh the tests in the test plan.

Best Regards, 

Team Xray 

Ron Feldman October 15, 2021

I'm trying to do the same thing that's being asked about here. Specifically, I want to automatically create a Test Case when a Story or Defect is moved to particular state, and add then add the Test Case to the Test Plan associated with the Epic.

This answer says that Dynamic Test Plans will accomplish this, but I see that Dynamic Test Plans is a feature that's still in development.

Is there a way, with Jira or Xray automation, to add a Test to a Test Plan?

Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2021

Hi @Ron Feldman 

Since Jira Automation can execute Web Requests, please try the idea of using Xray GraphQL to add a Test to a Test Plan.

Here are the documentation links:

And the GraphQL mutation to add Tests to Test Plans:

Thank you.

Kind regards,
Rogério Paiva [Xray Support Team]

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events