Appearance
TestRail XML file Migration
Preconditions
JRE/JDK version
The machine (PC, Mac, or virtual machine) where you run the migration tool must have JRE or JDK version 21 or later installed.
TestOps version
WARNING
MIGRATION AVAILABLE FOR TESTOPS VERSION > 4.26.0
Configuration file example
Create the JSON file with content like:
json
{
"type": "testrail-xml",
"debug": true,
"oneByOne": false,
"allureConfig": {
"endpoint": "https://demo.testops.cloud/",
"token": "1f4b4acd-418c-4d0b-8533-1d747abb7599",
"projectId": 173,
"issueTrackerId": 8,
"migrationTagPrefix": "testrail",
"folderCfPrefix": "Folder"
},
"filesConfig": {
"path": "/path/to/file/exampletest.xml"
},
"testrailXmlConfig": {
"useParentDescription": false,
"stepsAsPrecondition": false,
"preconditionStructure": [
{
"customFieldName":"preconds",
"displayName":""
}
],
"customFields": {
"suite": "Suite",
"priority": "Priority",
"type": "Type",
"custom_automation_type": "Automation Type"
}
}
}
Configuration parameters
Name | Mandatory | Description | Example |
---|---|---|---|
commonProperties | yes | see description here: Common properties | |
allureConfig | yes | see description here: Allure TestOps properties | |
filesConfig.path | yes | Absolute path to XML file with TestLink export | C:/Dev/Tools/TestCases.xml or /path/to/file/exampletest.xml |
testrailXmlConfig.descriptionFieldName | no | Set this property if your description system field name in TestRail is different from "description" | description |
testrailXmlConfig.expectedFieldName | no | Set this property if your expected system field name in TestRail is different from "expected" | expected |
testrailXmlConfig.preconditionStructure | no | Set this property if your description system field name in TestRail is different from "preconds" or if you want to migrate multiple fields into precondition. Define the structure like: preconditionStructure: [ { "customFieldName": "custom_field1", "displayName": "Precondition1" }, { "customFieldName": "custom_field2", "displayName": "Precondition2" } ] Where: - customFieldName is the name from TestRail- displayName is the name for section in the TestOps Precondition area in the testcase.Result example: Precondition1 Some text from custom field (custom_field1) Precondition2 Some text from custom field (custom_field2) | preconditionStructure: [ { "customFieldName": "custom_field1", "displayName": "Precondition1" }, { "customFieldName": "custom_field2", "displayName": "Precondition2" } ] |
testrailXmlConfig.stepsSeparatedFieldName | no | Set this property if your description system field name in TestRail is different from "steps_separated". Example: If the custom field name is custom_steps_separated , the system field name will be steps_separated by removing the prefix "custom_" | steps_separated |
testrailXmlConfig.stepsAsPrecondition | no | Flag to set the value from TestRail custom_steps into Allure precondition field in format: <Value from precondition> <Value from steps> | true |
testrailXmlConfig.customFields | no | A list of TestRail fields that need to be migrated to Allure as custom fields. Structure: "testrail_field_name": "Allure_custom_field_name" If the value is represented as an ID in the TestRail system, values mapping can be specified in the customFieldsMapping field. In the JSON response, all field names will have the prefix "custom_". | customFields: { "suite_id": "Suite", "priority_id": "Priority", "custom_tester": "Owner", "custom_system": "System" } |