Importing, exporting, synchronizing
This subchapter explains the importing, exporting and synchronizing processes and related topics.
Before you get started, take a look at the following table to get an overview of how elements in the two programs are mapped to each other in the importing and exporting processes.
Structure of this chapter
Importing allows you to import test suites from a TestRail project into a solution in Ranorex Studio.
Select Import into Ranorex Studio in the TestRail wizard and click Continue. The Import screen will appear.
To import one or more test suites:
Select the TestRail project you want to import from. Select whether you want to import all test suites in the project or only the selected ones. If the latter, select your test suites. Select the programming language you want your project to use in Ranorex Studio. Click Import.
Please note the following when importing:
You can import from all types of TestRail projects with no limitations.
- Ranorex Studio will only import TestRail cases that have the field Automation Type set to Ranorex. All other cases will be ignored.
- Ranorex Studio will recreate the structure of the TestRail project and test suite(s) for the first import only. After that, only certain changes will be synchronized.
- Steps will not be imported.
Exporting allows you to export test suites from a Ranorex Solution to a TestRail project.
Select Export to TestRail in the TestRail wizard and click Continue. The Export screen will appear.
To export one or more test suites:
Select the TestRail project you want to export to. It can be a new or existing project. If the former, Ranorex Studio will automatically create a new project on TestRail with the name of the Ranorex solution. Select whether you want to export all test suites in the solution or only the selected ones. If the latter, select your test suites. Click Export.
Please note the following when exporting:
- It’s not possible to export multiple Ranorex test suites to single test suite projects in TestRail (baseline included). You will need to switch the TestRail project to multiple test suites or create a new Ranorex solution with only one test suite.
- Your Ranorex solution will be created as a multiple test suite project in TestRail, with each Ranorex test suite project being recreated as a TestRail test suite.
- Ranorex Studio will recreate the structure of the Ranorex solution and test suite(s) for the first export only. After that, only certain changes will be synchronized.
- Modules will be exported as steps.
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 the 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 information on 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.
Required custom fields
If you have required custom fields in TestRail, Ranorex Studio will recognize them and fill them with default values upon exporting or reporting results. The custom fields and their default values are stored in TestRail.tsrd in the “CaseFields” section. You can edit the default values there, but do not change anything else. Close your solution before editing, or the changes will not be applied.
Once you’ve imported or exported a test, the Synchronize button will appear in the TestRail section of the Ranorex Studio menu bar.
Click it to synchronize. Synchronizing carries out an import and an export for the currently connected test suites to update them with changes made in either program.
The following changes are synchronized
- Adding new items.
- Converting smartfoldersto test cases. A new case will be added in TestRail.
The following changes are NOT synchronized
- Deleting items. However, when you delete a test case on either side, synchronizing will remove the connection between them and the Automation Type will be set to empty in TestRail.
- Moving items.
- Renaming items.
Not synchronizing these changes makes it easier to work and collaborate between the two programs, as they serve different purposes and therefore may require different structures.
When should I use importing/exporting, when synchronizing?
Use importing/exporting when you want to
- transfer your data from one program to the other for the first time.
- add additional test suites from the same TestRail project/Ranorex solution.
Use synchronizing when you
- want already imported/exported test suites to be updated with changes made in either program.
Removing the connection to TestRail
There are several ways to remove the connection to TestRail.
- Go to Tools > TestRail integration > Remove connection to TestRail.
- Delete TestRail.trsd from the projects view.
- Delete TestRail.trsd in the solution folder in Windows Explorer.