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

Test Case integration with Git SHA



I was curious if anyone is doing something similar with TestRail, or if this seems like a good idea anywhere outside of my brain :wink:

I would like to be able to create a Test Case in TestRail and from TestRail’s …/cases/view/ UI view be able to see the commit history for that particular test case. I could link to these manually on every commit from within TestRail, but having it just be auto detected with a git plugin web hook from the comments or something would be sweet:

// In git commit comment
// Initial implementation of TC
Implementation for testcase#id to test foo equals bar

// Update of TC
Changing testcase#id to test baz equals bar instead

// For example, we have something similar for our bug database
Fix for bug#12345 status#ToTest reason#Fixed   // Auto updates bug notes from commit

Ideally, the tab or view from within TestRail would allow me to click through each commit and see the code change right there in TestRail (via the github /compare API or similar).

Boom, feature request :wink:



Thanks for your posting and my apology for the delayed response. I think that sounds like a good idea and you should be able to implement this via a simple custom field in TestRail. Whenever a commit is pushed to git/GitHub, you could use TestRail’s API to add the new commit to the custom field (via get_case/update_case). You can then see the commits directly on the view test case page. Directly embedding the commits and code changes would be difficult to implement but using the custom field approach and then linking to the commits would definitely be doable.