Forums

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

how to get test cases linked to user story in JIRA

shrish
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!
January 11, 2019

i have 300 odd stories that have lot of linked issues (various issue types)

I just want the test cases from the linked issues corresponding to the story

 

eg: 

Story S1 has Linked issues L1,L2,L3,L4  and only L1, L2 are test and L3,L4 are some bug or task

 

I want in my result only

S1 -> L1,L2

5 answers

1 accepted

2 votes
Answer accepted
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 11, 2019

Hello Shrish,

Welcome to Atlassian community!

You are trying to return the test cases related to a specific story using JQL, is that correct?

To return the issues you are looking for, you would navigate to search > View all issues and write the following JQL query in the advanced search:

issue in linkedIssues("S1") and issuetype = "test case"

Please, let me know if it works for you.

shrish
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!
January 16, 2019

thanks Pete :)

Like rajneesh.mathur likes this
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 16, 2019

You are welcome, Shrish!

Have a nice day.

divya.smitha March 17, 2019

Can we link the testcase to story while creating the testcase

Like # people like this
barry alkis January 31, 2020

This was great but is there a way to find all user stories for a specific release and list all tests linked to those stories?  This would be great for creating an RTM and finding any stories that were missing test cases

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2020

Hello @barry alkis

Unfortunately, Jira does not have the functionality to return the test cases linked to stories returned by a specific query, where you would specify the release.

However, this kind of "Sub-filter" functionality can be achieved by some third-party apps. Here are some options:

JQL Search Extensions for Jira & reports 

JQL Tricks Plugin 

ScriptRunner for Jira 

All the mentioned apps are well documented to achieve what you are looking for, however, feel free to reach out if you have any questions or take a look in Atlassian Marketplace if you would like to search for other apps. 

Richard Lopes
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 29, 2020

@Petter Gonçalves , How can I get similar results with the query you provided to shrish for all the Bugs or Stories? e.g instead of specifying one user story, Is there an option to pull Test Cases for all Stories or bugs? 

Nikita Talele September 4, 2020
issue in linkedIssues("S1") and issuetype = "test case"

This gives only TEstcases which are linked with S1 user story. 

Could someone plz help me to find all User Stories which are linked with Xray Test?

Like # people like this
Guru Prasad
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!
June 1, 2021

Is there a way to fetch all the test cases linked to multiple user stories (e.g. Story S1, S2) together instead of doing it one by one per user story?

Like # people like this
Cesar G_ Araujo
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 24, 2023

I had the same question, thanks  for the answers!!! 

Thammana, Sriraj July 2, 2024

Hi, was there any answer to fetch all the test cases linked to multiple user stories ? 

Aldridge_ Liza
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!
September 12, 2024

Adding my comment here as this is something I'm also looking for. 

I have 32 stories in a sprint. 

Testcases are linked within each story. 

I'd like to be able to list out all the stories, and the testcases within them.

St1 has TC1, TC2, TC3

St2 has TC4, TC5

I'd like to see

St1

TC1

TC2

TC3

St2

TC4

TC5

I don't know if it's worth noting that the initial query mentioned above doesn't work for me 

issue in linkedIssues("St1") and issuetype = "test case"

- returns 0 testcases, even though they are definitely linked to the story. 

The only thing that the linkedIssues function returns is the linked TestSet, and the linked Execution. It's as though it is not seeing the tests as linked issues at all. 

Any ideas gratefully accepted!

0 votes
Heenaben Sardarbhai Chaudhary September 9, 2024

Hi @shrish   ,

If you need a solution to automate test case creation for your Jira stories, the Test Case Assistant for Jira is a great option. This plugin streamlines the process by automatically generating and linking test cases to your user stories based on your specified templates.

With just a click on "Test Case Assistant" within your Jira story, you can effortlessly create and link test cases. The app also allows customization of test case formats using various prompts and leverages advanced OpenAI models to ensure the generated test cases are relevant and high-quality. For extended functionality and higher usage limits, you can easily integrate your own OpenAI API token within the app settings.

You can explore more about the app here.


Regards,
Heena Chaudhary.

0 votes
Armitha Reddy Toorpu Ceema
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.
August 27, 2024

Hi Shrish,

 

Good day!

 

If you're looking for a plugin to streamline test case management, check out our Test Case Assistant for Jira. Our app simplifies the process by automatically generating and linking test cases to user stories. 

The Test Case Assistant for Jira app simplifies test case management by automatically generating and linking test cases to user stories using your templates. After opening a user story, just click "Test Case Assistant" to create and link test cases effortlessly. Customize the format with various prompts and easily manage the generated test cases. The app uses advanced OpenAI models to ensure quality and relevance. For continued access and higher limits, configure your own OpenAI API token within the app settings.

 

Please find the App link below:-

https://marketplace.atlassian.com/apps/1235007/test-case-assistant-for-jira?hosting=cloud&tab=overview

 

Thanks & Regards,

Armitha Reddy Toorpu Ceema,

Atlassian Engineer.

0 votes
david blenkinsop
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 8, 2022

hi @Petter Gonçalves - the JQL construct:

issue in linkedIssues("S1") and issuetype = "test case"

doesnt work for me - Im assuming this is for Jira with Zephyr, as "test case" is a Zephyr object, no?

Im new to this but we are using Jira with Zephyr - any ideas re configuration requirements?

0 votes
Jon ODowd July 17, 2019

How would I get the test cases linked to ALL the stories at once instead of just 1?

Joel A_ August 21, 2019

You can only - 

Under  Test Cycles-Test Cases(You can add Test Cases) and

Under  Test Cycles -Traceability (You can add Issues).

Like Tanja Bobinsky likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events