TestRail Integration with Testsigma
You can integrate Testsigma with TestRail to streamline test management and track progress. TestRail enhances visibility into test coverage, requirements, and release readiness, helping teams stay aligned and deliver high-quality products. With this integration, you can execute tests efficiently, generate detailed reports, and manage bugs discovered during testing, ensuring a seamless testing process. This article discusses integrating Testrail with Testsigma.
Contact Testsigma support to enable Post Plan Hook for your account.
Prerequisites
Before you begin, ensure that:
- You have a valid Host URL, Username, and Password from TestRail.
- You have referred to the documentation on creating test cases.
- You have referred to the documentation on creating test plans.
Steps to Integrate Testsigma with Testrail
- From the left navigation bar, go to Settings > Integrations.

- Enable toggle on Testrail widget.

- On the Testrail Details dialog, enter Host URL, Username, and Password.

- Click Save & Enable.

Steps to Link Testrail ID with Testsigma Test Case
- Open the test case in TestRail and copy its ID.

Before mapping TestRail test cases in Testsigma, ensure you have a project, test runs, and test cases set up in TestRail.
- Navigate to the test case you want to link in Testsigma and select Manage Test Case from the Utility Panel.

-
Enter the TestRail ID in the input box and click the link icon.

Follow steps 1-3 for each TestRail test case you want to map in Testsigma.
Here's a structured hierarchy flow of test case linkage between Testsigma and TestRail, including Test Case IDs.

- Enter only the numeric portion of the TestRail ID, ignoring any preceding letters.
- Ensure that the test case names in Testsigma and TestRail match for better clarity.
Steps to Execute Test Plan
- After linking the test cases in Testsigma, create a test suite with the linked test cases and add it to a test plan.
- In the Test Plan Settings, select Standard TestRail Addon from the Post Plan Hook dropdown menu.

- Enter the project name in the PROJECT_NAME text box.

If you're selecting TestRail Custom with Case Match Addon, you need to enter the project name in the PROJECT_NAME text box, API key in the API_KEY text box, and the template URL in the TEMPLATE_URL text box.

- Ensure that the project name entered in the Test Plan Settings matches exactly with the name in TestRail.
- Obtain valid Testsigma API Key from Settings > API Keys.
Steps to Create a Template URL for TestRail Custom with Case Match Add-on
-
Download the JUnit Template XML File
- Go to the Download JUnit Template XML.
- Download the XML file to your local system.
.
-
Copy the Downloaded File’s URL
- Open your browser’s Download History page.
- Locate the downloaded JUnit XML file.
-
Right-click the file and select Copy link address or click the Copy download link icon.

Note: The URL is valid for a limited time. Copy and use it immediately in the next step.
-
Create/Update the Test Plan with the Template URL
- Navigate to the Test Plan Settings in the TestRail integration screen.
- Paste the copied URL in the TEMPLATE_URL field.
- Click Create or Update.

- Go to Test Plans and click Run Now to execute the test plan. This will create a duplicate of the test run and display the result once the execution is complete.

You may notice that test cases have been executed, and post-plan execution is in progress. Wait a few seconds and refresh the page to view the results.
- Click on the TestRail Result Link in the top right corner to navigate to the run result. The result will be displayed along with the Run ID created in Testsigma.

The rerun will update the results in the same link. However, if you execute the test plan instead of rerunning, it will create a new link for the run results.
Trigger TestRail Test Runs Using APIs
You can also trigger TestRail test runs using APIs. Click here to download the Postman collection.
a. Authorization: Bearer Token (copied from Settings > API Keys in Testsigma).
b. Provide the following details in Request Body
- TestRail Run ID: The unique identifier for the test run in TestRail.
-
Hook Data: Includes the following parameters:
- Testsigma API Key: Copied from Settings > API Keys in Testsigma.
- Project Name: The name of the project associated with the test execution.
- Template URL: The URL of the template JUnit file used to configure result data.
- Title: Provide a title.
- Execution Lab: Specifies the execution environment or lab used for running the test cases.
