TestRail can be easily integrated with vREST using vREST hooks functionality. Please follow the steps below to update the test case status in TestRail based upon the status of vREST test case in a Test Run.
The below steps are written if you have selected the option "Use a single repository for all cases" in TestRail while creating the project as shown in below snapshot:
And if you have selected any other option then please contact us at firstname.lastname@example.org for further instructions.
- Map vREST Test Cases with TestRail Test Cases
First you will need to map the vREST test cases with TestRail test cases. Mapping can be done by setting the External Id field in vREST test cases.
- Configure hooks to update status of test cases in TestRail
Now you will need to configure the hooks in vREST which will do the following tasks:
- Create a Run in Test Rail
- Update test cases status in Test Rail against the above run
- Close the run in Test Rail
For configuring the hooks, we have created a sample template, which you will need to import in vREST Hooks tab.
Download TestRail Hooks Template
Once you import this template, three hooks will be automatically created for you to perform the above mentioned tasks as shown below:
Note: You may customise these hooks as per your need. We have provided the Test Rail API documentation link in the description field of these hooks.
- Configure Global Variables
The above hooks also require some variables to be set. The following variables will be automatically created once you import the TestRail template. You just need to set the values of those variables. The following variables need to be set:
Provide the base URL of your TestRail instance without slash at the end.
Provide the project id of your TestRail instance in which you want to update the status of test cases.
- Configure TestRail Authorization in vREST
You will also need to set the TestRail authorization information to integrate TestRail with vREST. The authorization record "TestRail Auth" will be automatically created, but you will need to set the details according to your environment:
- That's it.