Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

XRay - Can I link user stories with Test Cases for better traceability?

Dodo Skills
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 20, 2022

I can link Epic to test cases. I want to link user stories with Test Cases for better traceability? Is it possible?

2 answers

0 votes
Heenaben Sardarbhai Chaudhary September 1, 2024

Hi @Dodo Skills ,


I'm not completely sure if there's an existing feature for this, but you can definitely achieve it with APIs. I actually have a script that performs a similar task, so I thought I'd share it with you.

Quick Summary: This script takes an Excel file with your issue link data and interacts with the Jira API to create those links. It also adds a brief delay between requests to help prevent any issues with API rate limits, which is quite useful.

Here's How It Works:

  • Excel File: Ensure your Excel file (e.g., issues.xlsx) is set up with columns like InstanceLink, linkType, parentIssueKey, childIssueKeys, and API_TOKEN. You can use the template provided in the repository for reference.
  • Running the Script: Once your Excel file is ready, you just need to run the script using node start.js issues.xlsx. The script will then link each child issue to its respective parent issue as outlined in your file.
  • Error Management: If any issues arise, such as missing data or API errors, the script will log a warning but continue processing.

A 100ms delay is built in between API requests to avoid triggering Jira’s rate limiting, so you don’t have to worry about some links failing due to too many requests being sent too quickly.

You can find the repository here.

And while we’re on the subject of automation, if you’re looking to simplify your test case creation and linking process, I’d recommend checking out Test Case Assistant for Jira. This tool helps you automatically generate and attach test cases to user stories with a single click. It even uses AI to generate these test cases based on the specifics of your user stories, making the process both smoother and faster.

Whether you’re managing a few test cases or handling a larger workload, this tool can really streamline your workflow. If you’re interested, feel free to explore the documentation or get it from the marketplace.

0 votes
Stefan Salzl
Community Champion
April 21, 2022

Hi @Dodo Skills and welcome to the Atlassian Community,

Yes, this is possible. It needs to be configured in the xray (project) settings --> test coverage

Please find the documentation page here:
https://docs.getxray.app/display/XRAYCLOUD/Test+Coverage+Report

 

Hope this helps.

Best
Stefan

Stefan Salzl
Community Champion
April 30, 2022

Hi @Dodo Skills 

Any update to this? Could you figure out how to solve it with the suggested information?

Best
Stefan

andieri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 5, 2022

Hi Stefan!

I have the same problem in my test tracebility.
I've tried to set up the option, that you mentioned, but I have no clue where is that.

I'm an admin on the project, that I use. I can see a lot of options in the list on the left side, however there is no options for Test coverage.
Could I ask to attach a screenshot, to see the related link for the Test coverage.

Best regards
Andrea Kovacs

Stefan Salzl
Community Champion
July 5, 2022

Hi @andieri 

Unfortunately I can´t provide a screenshot of the xray-setting page right now as my xray licence is paused but I´ll show where you´ll find it:

image.pngimage.png

 

Please find the according description/settings/configuration in the following link:

https://docs.getxray.app/display/XRAYCLOUD/Project+Settings%3A+Test+Coverage

 

Hope this was helpful.

Best
Stefan

Like andieri likes this
andieri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 5, 2022

Hi Stefan!

Thank you for the quick answer. :)
I tried to find the link for Test Coverage setting, and then I realized that we have server edition of XRay, so maybe the configuration options are different.
I attach a screenshot.
XRAYOptions.PNG

Thanks again
Andrea

Stefan Salzl
Community Champion
July 6, 2022

Hi @andieri 

In this case requirements coverage can be enabled by opening the project settings (this should also be in the leeft bottom corner) and then clicking the "Actions" button in the right upper corner.

The following link describes it very well:

https://docs.getxray.app/display/XRAY/Configuring+a+Jira+project+to+be+used+as+a+Requirements+project#ConfiguringaJiraprojecttobeusedasaRequirementsproject-EnableXrayRequirementCoverageusingtheProjectAdministrationPage

Best
Stefan

Suggest an answer

Log in or Sign up to answer