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

How can you associate a Test Run with a Jira Story or Issue?


#1

Hi,

We see that you can add a Jira issue to a Test Case in Testrails and it is associated to the Issue in Jira. We wanted to know when we add 5 test cases into the Test Run how can you associate a Test Run with a particular Jira Issue?

Lets say I want to create a Sprint test. I want to test against 5 Testrails test cases and tie this to a testing Issue in Jira. I created these test cases so they can be reused and not tied to any particular Jira Issue. How can I actually see the test results for that Test Run in my Jira Issue for the testing to be done.

Example: Add User has 5 test cases. I want to test it under JIRA-111 Issue which is “Test Add User for sprint X”. How do I link the Test Run to this issue? I can only see how to link the test case which means the test cases are not reusable when I go to test “Add User” in the next sprint under a different issue.

How can I use Testrails and Jira to achieve this?


#2

Hi Aaron,

Thanks for your posting. You can add multiple issues to test cases (separated by comma), so the link between cases and issues wouldn’t necessarily be static and can be changed anytime. So, when you add a new test run, you could add the issue IDs to the case references and the cases & results would appear on the JIRA issue page. Would this work for you?

Cheers,
Tobias


#3

Hi Tobias,

Yes it would but is there a easier way to do it instead of manually adding each?

It would be nice if you could add/edit the test case when viewing the Test Run so you do not need to add additional page clicks to edit from the Test Run page. Do you have a feature input area for your product that we can enter a Feature Request?

Also are you ever planning on being able to add test cases from Jira so you could associate Test Cases to a Jira Issue from Jira or is everything predominantly run through Test Rails and just linked back to Jira.

Aaron


#4

Hi Aaron,

Thanks for your reply. You can add a test result to all cases/tests in one step via a single add_results / add_results_for_cases call. It’s just that you would need to include all case/test IDs in the API call and this looks as follows:

http://docs.gurock.com/testrail-api2/reference-results#add_results

(see “Request example”)

Regarding your other points:

  • Editing cases: yes, this is already on our feature request list and planned to look into for a future version.

  • JIRA issues: have you already enabled the TestRail for JIRA add-on?

https://blog.gurock.com/?p=3365

You can use the Add Test Case button on the JIRA issue page to add new test cases and link the cases to JIRA issues. This would still open TestRail (in a separate browser tab) but would link it directly to the JIRA issue and this makes it very convenient to add cases for an issue.

Cheers,
Tobias