Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Linking Test Cases to Jira Issues (Stories)


I know I can create a test case from within a Jira issue, but is there a way that I can link an existing test case to the Jira issue? I.e. I have an existing Jira issue (issuetype=Story) and an existing corresponding Test Case. Rather than ‘Add’ a new test case I want to ‘attach’ an existing test case. Possible?


If JIRA has been configured for references integration in Administration -> Integration -> References you can put the JIRA issue ID in the references field of your test case. Then the test case will show up in the TestRail: Cases panel of the defect view in JIRA.


Hello Michael,

Thanks for your posting! You can simply link issues to existing test cases by opening the case in TestRail and then adding the issue to the References field. You will automatically see linked test cases in JIRA once you’ve added the issue to the References field.

I hope this helps!



@donalaya The reference integration appears to be defined, however the only option I get when in the References field, is to ‘Add’ a new issue, i.e. Create an issue. In my case, the issue already exists and I just want to reference it.
@tgurock As indicated above, I don’t want to Add a new issue, simply reference an existing issue, e.g. a Story.
There must be a way, so I am either not setup correctly, or I am missing something obvious in what you guys are telling me. I have an existing Jira Issue and an existing TestRail Test Case, I want to link the two together.


Does your instance not have the text box for the References field (see screenshot)? If so you can just put the JIRA ID(s) in that box, separated by commas. (In my example, I have a project in JIRA called TESTRAIL, and I have user stories with IDs of TESTRAIL-3 and TESTRAIL-4.)

If you don’t have the text box then that would be a question for the Gurocks. :slightly_smiling:


@donalaya I do have the text box and entering the Jira issue in there gives me the links I needed. THANK YOU. I knew it had to be something simple, I just wasn’t thinking ‘simple’ enough!
I can now link my Test Case to my Jira Story to my Confluence documentation.


Hello Michael,

Glad to hear that :slight_smile: Yes, that’s I also meant, sorry for the confusion. You can simply link existing test cases to JIRA issues by adding the issue IDs to the References field in TestRail.



I sent an email to support about this but think it would be useful to document it publicly.

We would like to do the same thing but instead of referencing a specific test case to a story, (which is a pain because you have to go and find the case then edit it individually) can we have the functionality, or does it exist, to have a test RUN associated with a user story? Then we simply add the run to a story and all the tests appear in the story?



Hi Will,

Thanks for your posting! You can also link multiple test cases to a reference/issue in a single step via TestRail’s bulk-edit for test cases. Just select the cases on Test Cases tab, then click the Edit > Edit Selected in the toolbar and set the issue ID via the References field. This way you don’t need to do this for each and every test case.




I’m using JIRA integration for TestRail and it works very well, but I have a question:

Is it possible to access the data in the “TestRail: Cases” panel in a JIRA query?
I would like to display lists of stories in JIRA and see in one glance which ones are referenced in test cases and which ones are not.