TestRail Integration via hooks

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 support@vrest.io for further instructions.

 

Steps:

  1. 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.

  2. 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:
    1. Create a Run in Test Rail
    2. Update test cases status in Test Rail against the above run
    3. 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.

  3. 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:
    1. testRailBaseURL
      Provide the base URL of your TestRail instance without slash at the end.
    2. testRailProjectId
      Provide the project id of your TestRail instance in which you want to update the status of test cases.

    Here is the sample screenshot of the variables configured:



  4. 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:

  5. That's it.

Note:

If you are having difficulty in integrating TestRail with vREST, then contact us at support@vrest.io with your issue details.