This article explains how Ranorex Studio exchanges test management data with TestRail:
- Import suites and cases from TestRail into Ranorex Studio
- Export suites and cases from Ranorex Studio to TestRail
- Synchronize supported changes after the initial import/export
- Understand how objects map between the two systems
Mapping between Ranorex Studio and TestRail
The following table summarizes how items map between Ranorex Studio and TestRail during import/export:
| Ranorex Studio | Direction | TestRail |
| Solution | ↔ | Project |
| Solution | ↔ | Project |
| Project with test suite | ↔ | Test suite |
| Test case | ↔ | Case |
| Smart folder outside a test case | ↔ | Section |
| Smart folder inside a test case | ↔ | Step |
| Module | ↔ | Step |
Importing (TestRail → Ranorex Studio)
Importing allows you to import test suites and test cases from a TestRail project into a Ranorex solution.
- Open Tools > TestRail integration > Start TestRail wizard.
- Select Import into Ranorex Studio and click Continue.
Import one or more test suites (and their cases)
- Select the TestRail project to import from.
- Choose:
- Import all test suites (imports everything from the selected project), or
- Import selected test suites (lets you pick specific suites/cases from the tree).
- Select the programming language for the Ranorex project, and click Import.
- If you chose Import selected test suites, use the tree on the right to select what you need:
- Select/deselect test suites and test cases using the checkboxes.
- Use Select all or Invert selection to quickly adjust your selection.
- After the import finishes, the wizard shows a summary of what was created or updated in Ranorex Studio.
- The list shows the items created during the import (for example, test cases created).
- Scroll to review all created items.
- Select Enable automatic synchronization to automatically synchronize test results with TestRail after test execution.
This option is also available under Tools>TestRail integration>Enable automatic synchronization.
Importing from TestRail brings in an automation backlog in a suite/case structure and mapping. You still need to create recordings/code modules manually to automate the imported test cases.
Exporting (Ranorex Studio → TestRail)
Exporting allows you to export test suites and test cases from a Ranorex solution to a TestRail project.
- Open the TestRail wizard.
- Select Export to TestRail and click Continue.
Export to a new or existing TestRail project
- Select the TestRail project:
- Existing project, or
- New project (Ranorex creates a project using the solution name)
- Choose:
- Export all test suites, or
- Export selected test suites/test cases
- Click Export.
- Click Finish once the Export completes.
-
This process takes your existing automated tests and uses them to generate concise, easy-to-read test case documentation within TestRail.
Export may fail if the TestRail project requires custom fields without defaults. See Required custom fields in TestRail integration.
After importing/exporting
Once you have imported from or exported to a TestRail project, the Ranorex solution is connected to it. This has the following effects:
- Connected elements (test suite, test cases/smart folders in test suites) in the solution display a TestRail icon. Test cases and smart folders will also have a link icon in their description. Double-click it to go to the corresponding case in TestRail.
- The TestRail sync file is now present in Ranorex solution.
- The TestRail .yaml is also present in Ranorex solution.
- Synchronizing is now possible.
- Imports from/exports to any other TestRail projects are not possible. To import from/export to a different TestRail project, create a new Ranorex solution or remove your current solution’s connection to TestRail.
The TestRail sync file – TestRail.trsd
The TestRail sync file contains all the information required for the connection between the Ranorex solution and the TestRail project. It’s created after importing/exporting and stored as TestRail.trsd in the Solution Items folder of your solution. You can access it from the project view.
Synchronizing
Manual synchronization
Use Synchronize to update connected items based on supported changes.
Automatic synchronization
When enabled, Ranorex automatically exports results after test execution.
You can enable automatic synchronization:
- Tools > TestRail integration > Enable automatic synchronization.
- TestRail wizard (Import or Export complete screen)
What is synchronized
Supported
- Adding new items
- Creating new linked cases (where applicable)
Not synchronized
- Deleting items
- Moving items
- Renaming items
When should I use importing/exporting, when synchronizing?
Use importing/exporting when you want to
- Transfer data for the first time.
- Add additional test suites from the same TestRail project/Ranorex solution.
Use synchronization when you
- Update already-imported/exported suites/cases with supported changes
Removing the connection to TestRail
You can remove the connection by:
- Tools > TestRail integration > Remove connection to TestRail
- Deleting TestRail.trsd from Solution Items
- Deleting TestRail.trsd from the solution folder
If you encounter TestRail communication error, please refer to our Ranorex Solutions and Best Practices section for possible solutions to this problem.