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

Get link to the Test Run in Jenkins

Hi.

We have integration between TestRail and Jenkins. So that when the test suite is being run by Jenkins, it creates a new Test Run and submits all test results there. I’m looking for a way on how to get the link to the test run that is being created to be visible by Jenkins.

My goal is to create an automatic message that will be sent out as a notification by Jenkins to our internal corporate messenger after the job with tests is run.

TestRail’s get_run API call includes the run’s URL in the response.

Also, if your TestRail server isn’t going to change hostnames any time soon the URL for viewing a test run is <url for index.php of your testrail instance>?/runs/view/<run id>, i.e. https://testrail-hostname/index.php?/runs/view/1

I can’t send the get_run request with run ID because I don’t know the run ID. I found the way on how can I get it - it is available in response after test run is created. Now my next step is to pass the value with run URL from Java to the Jenkins.