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

Can I link test cases to tickets in JIRA?


#1

At my workplace we create “New Feature” tickets in JIRA. Each one gets a new test plan made for it. Currently we manually make the test plan in JIRA (in plane text), then create it in Excel, then manually put it in another test software. This is a lot of manual data entry.

I want to know if TestRail will let me make a test plan for a New Feature ticket, and link the two somehow. Or alternatively, to automatically take tickets of a certain type (say “New Feature Test Plan”) and create test plans in TestRail for them. Or any similar convenience.

Note this isn’t for test results, but the plans themselves.

Thanks.


How do I link a Test Run Result to an issue in Jira (from Jira)
#2

Hello Noah,

Thanks for your posting. Yes, this is fully supported and you can link test cases to JIRA issues with the test case References field. You can learn more about references here:

http://docs.gurock.com/testrail-integration/references-introduction
http://docs.gurock.com/testrail-integration/tools-jira#reference_urls

We also have a training video which explains the JIRA integration in detail:

http://www.gurock.com/testrail/videos/issue-defect-integration/

The video starts with explaining the Push and Lookup feature (to add new bug reports to JIRA from TestRail’s user interface). The reference related part starts at about 3:20.

I hope this helps!

Regards,
Tobias


#3

Hi Tobias,

Is there also a possibility to link TestRuns and TestPlans to a JIRA ticket? That would be really cool if it would be possible and we get the status of a Test Run or Test Plan directly in the JIRA ticket after linking it.

Please let me know.

Thanks.

Best,
Sanat.


#4

Hello Sanat,

Thanks for your reply! JIRA tickets are currently linked either via the References field (test case level) or Defects (for results). The new JIRA add-ons introduced with TestRail 5.0 would automatically show those cases or results directly in JIRA:

https://blog.gurock.com/testrail-5-0-jira-test-management/

Have you already had the chance to try the new integration?

Cheers,
Tobias


#5

Hi, what Noah asks is a key feature for us too.

Linking a test case to a JIRA ticket with “reference” field is not enough!

Imagine we create a new JIRA for a new feature involving for instance a change in the login logic.
We want to be able to link a group of testcases of the “login” group to this JIRA, the perfect thing would be like that:

1- In a specific project, a ticket is created in JIRA (generated by a found bug, or a Business Requirement) and assigned to a developer
2- the dev solves the problem and mark the JIRA ticket as “Ok for Testing” --> is automatically assigned to the QA manager
3- The Qa manager selects the testcases to be passed, plus eventually one or more new one(s) to be created, and assigns this run to a tester
4- The tester runs the tests, and if passed, the Qa manager or lead validate the Ticket Closure.

My problem is on step 3, how can I link a run, or a subset of existing test-cases to a specific JIRA issue?
I don’t want to edit each testcase, and add the Ticket in “reference” field and then remove this reference when test is passed…
The ideal would be adding the “reference” field and mechanics to the “Test Run” view.


#6

Hi Fred!

Thanks for your feedback. Just a few questions if that’s okay:

  1. How would you determine the case selection in your example?
  2. Would you include all cases in the new test run, or just a subset of cases?
  3. Would you expect TestRail to configure the case selection automatically or would this require a manual case section?

Cheers,
Tobias


#7

Hi Tobias!
Thank you for your interest and spending time for this story!

  1. The QA manager, seeing that the corrected bug, or the new feature implemented impacts the “login” functionality, goes to the test cases catalog and selects the testcases. (Ideally from JIRA interface, having access to the Testrail tests catalogue, if not possible, then from testrail selecting a subset of testcases defining a new TestRun that would be linked to the JIRA ticket.)
    Then into the JIRA ticket, would be displayed the result of the test run (just like the “Reference” field works, pushing the results of test into JIRA. This way the project manager can see in real time how is going the testing of the ticket marked as “resolved” by the developper.

  2. Only selecting the apropriates cases, like when you define a new test run, so a subset of cases. In the case of a new final build to be released, then all the cases of type “regression” should be selected.

  3. I thought about a manual selection, like when building a new Test Run in testrail.

Thanks,


#8

Hi Fred,

Thanks for the additional details! We are happy to look into this and this request has come up a few times in the last few weeks by other customers as well. We will make sure to review this again for a future version, thanks for your feedback.

Cheers,
Tobias


#9

Hi Tobias.

Reviving this question, is it yet possible to select a Test Case from a Jira issue?

It seems a critical feature which would readily enable a developer who is working on a Jira issue to follow an established set of tests before confirming a Jira defect, or story, as resolved.

Thanks
Greg


#10

Hi Greg,

You can link existing test cases to JIRA issues by adding the issue ID to the References field in TestRail. The Add Test Case button in JIRA would always add a new case but you can simply open TestRail, locate the test case you want to link and add the issue ID to the References field. You can also add multiple issues by separating them by comma.

I hope this helps!

Cheers,
Tobias


#11

As a summary the problem we have is that :

  • We can add multiple issues to a Testcase
  • But we cannot add multiple testcases to an issue

It would be fantastic if we could link a testrun to a Jira ticket.


#12

Hi Fred,

You can also link multiple test cases to an issue and you would only need to add the issue ID to multiple cases in this cases. For example, if you have test cases C1 and C2 and issues TR-1, TR-2, TR-3, the references could look as follows:

C1: TR-1, TR-2
C2: TR-1, TR-3

On TestRail’s side, this would link C1 to TR-1 and TR-2, C2 to TR-1 and TR-3. On JIRA’s side, you would see C1, C2 linked to TR-1, C1 to TR-2 and C2 to TR-3.

I hope this helps!

Cheers,
Tobias


#13

Yes, it’s a workaround, but it makes us having to go to each testcase and edit it, making maintenance of testcases more and more complex.
While creating a testrun selecting apropriate TCs is so easy and user-friendly…

As a testing manager, I’d like to assign a testrun or a testplan to my testers, through linking this testplan/run to a Jira issue that is assigned to them.

Thanks for your efforts


#14

Hi Fred,

Thanks for your feedback, that’s appreciated. Yes, this definitely makes sense. Once you added the references to the cases, you can already use the References filter on the Select Cases dialog to filter for cases (based on the references) but I agree that the usability of the references can be improved. Happy to look into this for a future version.

Cheers,
Tobias


#15

Is there any news on this feature? We really need an ability to assign a Test Run to a Jira ticket.

For one of our products, we have around 130 Test Cases that we select from to create a configuration for a software test run of around 100 Test Cases. We create a Jira ticket for this configuration and then test it. It is not feasible to go through individual test cases and add a reference to the Jira ticket, and even if it were over the course of a year the references for a particular test case would number in the hundreds if not thousands.

Thank you


#16

I am also looking into this feature. as I am planning the testruns for each sprint, UAT and Prod Release, I would like to be able to select my tests and plan my milestones. and do runs/re runs and link only that milestones result to issues in jira. I want to be able to use the same tests next sprint and its impossible to go ans edit hundreds of tests references. is ther any way to have a temp id for test cases or have the ref possible on the runs / plans rather than the tests themselves
??


#17

Hi there!

We don’t have an update on this at this point but it’s still planned to review this. We understand why this would be useful to have but this would require some deeper changes and we recommend managing the issue IDs on the case level with the References field.

Cheers,
Tobias


#18

I wanted to add my vote to have this added. It seems adding the Test Case Reference field to the the ‘Add Result’ section would allow this! We’re currently using the Defects field in this section which is inaccurate if the test has passed.

Our devs all use the same sanity test case against the JIRA user store they are currently working on and adding that Story reference to the Test Case reference field (which would be temporary) or to the Defect field is not efficient.


#19

Hi Bill,

Thank you for your post and suggestion. Normally testers use the defect field specifically for new defects that are opened in relation to the test that is being run when submitting results. That being said, we would be happy to continue looking into this. I will add your vote to this request.


#20

Yes, I know the Defect field is used for that but we also need to reference User Stories when a test passes but don’t want to add that JIRA reference to the specific test case, just the result. That’s what we are asking for here. Have been asking for 2 years! Why not add it and make your customers happy?