Testing is a crucial part of the software creation process. It ensures that your code is working correctly and that all bugs are found before the software lands in the hands of consumers. But it can be difficult to explain these tests and their results to investors...
The TestRail integration allows you to connect Ranorex Studio and TestRail. You can import and export tests, synchronize between the two programs, and report results from test runs in Ranorex Studio to TestRail in real time.
Watch our on-demand webinar
Mastering TestRail Integration: Boost productivity by combining Ranorex Studio test automation with TestRail test case management.
Before we can start connecting to TestRail, we first need to make sure it’s configured correctly. Please refer to the respective sections of the TestRail User Guide for more information.
To make the following settings, you will need to have Admin privileges in TestRail.
TestRail’s API needs to be enabled so Ranorex Studio and TestRail can interact.
Go to Administration > Site Settings > API and check the Enable API option.
Depending on how you use the TestRail integration, you will need certain permissions. To set them, go to Administration > Users & Roles and create a role with the appropriate permissions or change the permissions of an existing role. Then assign that role to the respective users.
Importing into Ranorex Studio: No permissions required.
Exporting to existing projects: Add/Edit Cases & Sections, Suites.
Exporting to new projects: You need to be an admin on TestRail.
Reporting results to an existing TestRail run: Add/Edit Test Results.
Reporting results to a new TestRail run: Add/Edit Runs & Plans.
Automation Type field
TestRail 5.5 and later:
The Automation Type drop-down field is already present by default. Simply set it to Ranorex.
TestRail 5.4 and earlier:
You will need to add a custom field to the user interface for importing and exporting to work correctly.
Go to Administration > Customizations > Case Fields and add a field with the following values:
Label: Automation Type
System Name: automation_type
Click Add Projects & Options and specify Ranorex as Option 1. Click the Selected Projects tab and apply the field to your projects.
Required custom fields
If you have required custom fields in TestRail, all of them should have default values set. Otherwise, an error will occur during exporting and synchronizing because Ranorex Studio won’t know what value to populate the required custom field with.
Fixing this error is explained in ⇢ Importing, exporting, synchronizing.
Starting the TestRail wizard and signing in
In Ranorex Studio, open the solution you want to work with. Then go to Tools > TestRail integration > Start TestRail wizard. The wizard’s welcome screen will appear. Before you continue, make sure you’ve ⇢ configured TestRail correctly. Then click Continue.
The Connect to TestRail screen will appear. Enter the server address and your credentials.
The server address applies to both the TestRail on-premises and the cloud solution. You can find it in the address box of your browser.
You can save your credentials, so you won’t have to sign in again.
Click Sign in to connect to TestRail. When you start the TestRail wizard again already signed in, you can just click Continue on this screen.
The Import/Export screen will appear. Go to ⇢ Importing, exporting, synchronizing to find out how this feature works.