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

Show Test Case ID in Test Run view (and other places)


#1

As a user, I want to see Test Case ID wherever a test case is displayed, including in the Test Run view, so that I can quickly make reference to test cases without having to open the test case in Test Suites to figure out if I am looking at the same test case or not.
CloudApp
CloudApp


#2

What you see in the Test Run section is the same test case in the Test Suites and Cases tab. What in in the Test Run is an exact copy of the original Test Case.

Looking at the middle pane of the 3 pane view (seen in the first screen shot) is the original test case. If you click the edit button for the test case in the Test Run tab- it takes you to the original Test Case (CXXXX) and any edits will show in the associated case in the test run (TXXXX) when it is saved.

This allows the Case in the Suite to be the master with no run history. When a run is created and the cases added to it - TR copies the original and assigns it the TXXXX Id so history can be attached to it.

I don’t know what added information you get when the original Case ID is displayed when the original case id is not the one that will have history attached to it.


#3

Your first screenshot is already possible - just click the “Configure columns” button and add “Case ID”.

The second one can be achieved via a UI script, assuming you have the right access to add one:

name: Show case id on test view
description: Shows the test case id on the test view page
author: gmcdonald
version: 1.0
includes: ^tests/view
excludes: 

js:
$(document).ready(
    function() {
            $("div.content-header-inner div.content-header-id").after("<div class=\"content-header-id\">C" + uiscripts.context.case.id + "</div>");
    });

#4

On a semi-related topic - is there any way to add test cases to a Test Plan by Test Case ID?

I know exactly what test case I want to add, and rather than searching through all the folders for it again, it would be nice to just grab that by the ID.


#5

Hi Marci,

Thank you for the post. You can in fact do what you are wanting to do using the update_plan_entry method. This requires the entryID of the test run you are wanting to add the test case to as well. I would recommend taking a look at our API documentation. Each test run has an entryID that is assigned to it.

http://docs.gurock.com/testrail-api2/reference-plans

Let me know if this helps.