Skip to main content

Configure TestRail integration in Katalon Studio

The TestRail Integration plugin establishes the connection between Katalon Studio and TestRail to deliver the following advanced capabilities:

  • In TestRail, you can view test results of test suites executed in Katalon Studio.
  • In Katalon Studio, you can query test cases associated with test runs of TestRail in the dynamic test suite.

Note:
  • From version 8.5.5, your TestRail password is encrypted. If you open your project in Katalon Studio version before 8.5.5, you might need to re-enter your TestRail password.

  • The TestRail Integration plugin only supports integrating Katalon Studio with TestRail Cloud.

This tutorial shows you how to configure TestRail integration

Requirements

  • An active Katalon Studio Enterprise license.
  • The TestRail Integration plugin installed. You can find the plugin here: TestRail Integration plugin.

Enable TestRail integration in Katalon Studio

To enable the integration of Katalon Studio with TestRail, you need to configure both your TestRail site and Katalon Studio, do as follows:
  1. Enable the TestRail API. Log in to your account, go to Administration > Site Settings > API, and check the Enable API option. Then click Save Settings.
    Enable API in TestRail
  2. Enable the TestRail Integration plugin. Follow these steps:
    1. In the main menu, go to Project > Settings > Plugins > TestRail and check the Using TestRail option.
    2. Enter the credentials required for Authentication:
      • URL: your TestRail instance https://<example>.testrail.io.
      • Username: your TestRail username.
      • Password: your TestRail password.
      • Project: your TestRail project ID (an integer). To get the project ID, open your TestRail project in the browser and view the ID at the end of the URL.

        For example, we have a project URL as follows: https://company.testrail.io/index.php?/projects/overview/1. The project ID here is 1.

    3. Click Test Connection to test connection.
    4. Click Apply and Close.
      Enable TestRail integration in KS
You have successfully enabled TestRail integration in Katalon Studio.

Map test cases between Katalon Studio and TestRail

To map a test case between Katalon Studio and TestRail, you need to get the TestRail test case ID. Do as follows:
  1. To retrieve the TestRail test case ID, open your project in TestRail, then go to the Test Cases tab.
    Here you can see the list of test cases and their IDs.
    TestRail test case list
  2. Open the test case you want to map, switch to the Integration tab, and specify the respective test case ID in TestRail (only the integer part).
    Specify test case ID in Studio
  3. Save the Katalon Studio test cases.
You have successfully map test cases between Katalon Studio and TestRail.

Query test cases linked to TestRail in a dynamic test suite

When the TestRail Integration plugin is enabled, the Query Provider in the dynamic test suite is updated with the TestRail query syntax standard. This allows you to query test cases associated with the TestRail test runs in the dynamic test suite.

To learn more about query syntax in the dynamic test suite, you can refer to this guide: Dynamic Test Suite.

Follow these steps:

  1. Open a dynamic test suite in Katalon Studio.
  2. In the Query text box, enter the ID of a TestRail test run, then click on the Preview button.

    We want to query the test cases associated with the test run R8, we enter the test run ID R8 in the Query text box.

    Query TestRail test run in dynamic test suite

The test cases associated with the TestRail test run are displayed. You can now execute the dynamic test suite linked to TestRail and verify the results in TestRail.
Was this page helpful?