Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Is it possible to add xray test to be linked whenever Test execution is created

Whenever Test execution is created It should link the xray test to it. Under the Tests classification.

I tried linking it but it is creating under issue links.Any suggestions please

1 answer

Hi Rajeswari,


Linking Xray tests to a test execution automatically in Jira can streamline your testing process significantly. As of my last update, Jira and Xray provide several ways to manage test associations, but automatic linking might require a bit of setup or scripting, depending on your exact requirements.


Here are a few approaches you could consider:


1. Using Jira Automation

Jira’s built-in automation rules can be quite powerful. You might be able to set up a rule that, upon the creation of a Test Execution issue, automatically links relevant Xray Tests. The rule would look something like this:


  • Trigger: Issue created (with issue type = Test Execution).
  • Action: Find the tests you want to link (based on your criteria) and link them to the newly created Test Execution issue.


However, the complexity of this rule depends on how you determine which tests to link to which executions. If it’s straightforward (like linking all tests from a specific Test Plan), it’s easier. If it’s more complex, you might need a more advanced setup.


2. Scripting with ScriptRunner

If you have ScriptRunner for Jira, it provides even more flexibility. You can write a Groovy script that runs on issue creation. This script can search for the relevant Xray Tests and link them to the Test Execution issue. ScriptRunner allows for more complex logic than Jira’s native automation.


3. Xray Test Plans

Using Xray Test Plans can simplify this process. When you create a Test Execution from a Test Plan, Xray can automatically include all the tests from that Test Plan. This way, you have a predefined set of tests that should be executed together, and creating an execution from the plan links them by default.


4. Xray API

Xray provides APIs that can be used to create test executions and link tests to them. You can write a script that listens for Test Execution creation (perhaps via a webhook) and then uses the Xray API to add tests to the execution. This approach requires more development effort but offers maximum flexibility.


5. Manual Linking as a Fallback

If automation isn’t feasible, ensure that the team is trained on how to link tests manually in a consistent manner. This could involve standard operating procedures for creating and managing Test Executions and linked tests.


6. Checking with Xray/Jira Community or Support

Since Xray and Jira are frequently updated, it’s a good idea to check the latest documentation or community forums. Sometimes, new features or plugins might offer new solutions to these kinds of problems.


Remember, the key to a successful implementation is understanding your testing workflow and requirements clearly. This will guide you in choosing the right approach to link Xray tests to your test executions automatically. Good luck, and feel free to reach out if you need more help! 🚀💻🔗

Suggest an answer

Log in or Sign up to answer