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

Copying test steps when creating a Bug


#1

Is there functionality in Test Rail or JIRA that when creating a bug from Test Rail, the test steps of the test you were just running are automatically copied in to the bug? Or can this be done using scripting?

Thanks in advance.


#2

Hi swurster10,

This is already built into the behavior of using Test Steps in TestRail then pushing the results over to JIRA. With the TestRail for JIRA addon, you will see linked tests in the “TestRail: Results” section. Each line item has a small arrow on the right side which can be used to expand for more details.

It’s important to note that test steps are only recorded in test results when using a test case template that explicitly has steps. The default template that does this is “Test Case (steps)”.

I hope this helps and please let me know in case you have any further questions!


#3

vtran,

Thanks for the response. I see where the steps show up in the TestRail Results section of the bug in JIRA. Is there functionality, either with the addon or with scripting, where these steps could also be populated in the description or comments section in the bug on creation?


#4

Hey there,

You can create a push template to set the default fields that are added to the description when you’re using the push function to create a new issue in Jira. To set that up, go to the page at Administration > Integration, and below the main text field for the defect plugin, you’ll see a link that says “Enter a template for the description field of the defect dialog” which will add another text field when clicked. Please note, if you’ve already set up a push template, you will not see the link, just the text field.

Under the new field there will be an option for “Add field” that will pop up a new menu where you can select all the fields in your test cases/results to be included in the description of the pushed defect. You may see multiple options for “Steps” in the dropdown, add them until you see one with the variable %cases:custom_steps_separated% to see the individual steps and expected results, and you should also have an option for %tests:custom_step_results%to see the status and actual results for each step.