The first step to using the VERA qTest Migration Helper utility is to edit the included config.json file. Follow the steps below to update the file:
Example config.json file
Code Block | ||||
---|---|---|---|---|
| ||||
{ "api_key": "########-####-####-####-############", "server_url": "https://tx3.qtestnet.com" , "project_ids": ["116893", "117063"]], "page_size": "999", "log_level": "Info", "fields_to_match": [ { "name": "VERA Approval Status", "values": [ "Closed", "Approved" ] "Draft" ], "constraint": "Field Is Equal" }, { "name": "Version", "values": [ "0.3" ], "constraint": "Version Field Contains" }, { "name": "Last Modified User", "values": [ "t.yapaolo@tricentis.com" ], "constraint": "User Is" }, { "name": "Assigned To", "values": [ "t.yapaolo@tricentis.com" ], "constraint": "User Is" }, { "name": "PriorityLast Modified Date", "values": ["Medium"] }, "03/04/2023 01:00:00 PM" ], "constraint": "Date Field Is Greater Than Or Equal" } ], "fields_to_update": [ { "name": "Migration Notes", "value": "Migration Notes - qTest Helper Tool", "overwrite": false }, { "name": "Comments", "value": "qTest Helper Tool", "overwrite": false }, { "name": "Priority", "value": "High", "overwrite": true }, { "name": "Assigned To", "value": "j.koelle@tricentis.com", "field_type": "User", "overwrite": true }, { "name": "Date Modified", "value": "03/04/2025 01:00:00 PM", "field_type": "Date", "overwrite": true }, { "name": "Type", "value": "Automation", "overwrite": true }, { "name": "Status", "value": "In Progress", "overwrite": true } ], "run_fields_to_match": [ { "name": "Assigned To", "values": [ "t.yapaolo@tricentis.com" ], "constraint": "User Is" }, { "name": "VERA Approval Status", "values": [ "Draft" ], "constraint": "Field Is Equal" } ], "run_fields_to_update": [ { "name": "Comments", "value": "qTest Helper Tool", "overwrite": false }, { "name": "Priority", "value": "High", "overwrite": true }, { "name": "Execution Type", "value": "Regression", "overwrite": true }, { "name": "Assigned To", "value": "j.koelle@tricentis.com", "field_type": "User", "overwrite": true }, { "name": "StatusPlanned Start Date", "value": "03/04/2025 01:00:00 "ImportedPM", "field_type": "Date", "overwrite": true }, { "name": "DescriptionPlanned End Date", "value": "Approved in previous system03/04/2025 01:00:00 PM", "field_type": "Date", "overwrite": falsetrue } ], } |
Provide an API Key (optional):
This is the API key available from qTest for the account that will be updating records:
To access your api key, click on the Resources button
...
Then expand the API & SDK section
...
Finally, copy the token after bearer:
...
Note title Required Permissions The account used for the migration utility must have access to edit all tests and fields in the projects being updated.
This can also be left blank and the utility will ask for the API Key each time it is run.
Provide the Server URL:
This is the URL for the qTest server and is required,
Provide Project IDs:
Enter a list of Project IDs for the projects that you want the utility to scan.
Project IDs can be obtained from either the URL for a project or the list of Projects in the Administration area:
URL:
...
Project Administration:
As a site admin, access the Administration Area > Projects:
...
The table displays all projects and their ids:
...
This is required and the utility will fail if it is not provided.
The utility provides a log level setting “log_level” which defaults to “Info” but can be set to “Debug” to provide detailed log messages for each constraint evaluation.
Provide a list of criteria to match when selecting
...
Test Cases and/or Test Runs:
Criteria are
...
presented as JSON objects with
...
three properties: Name, Values and
...
Constraint
Name is the qTest Label of the field. This must match exactly with what is in qTest.
Values is a list of string values to match. The utility will match any of the values in the list. This will only work for single select field and text fields. The field must match the text of the value exactly
...
but is case insensitive. The default constraint for text field comparisons is “Field Contains”. Additional supported field constraints are “Field Is Equal”, “Field Is Less Than”, “Field Is Less Than Or Equal”, “Field Is Greater Than” and “Field Is Greater Than Or Equal”.
Date fields can be specified for test case or test run selection. For date field comparisons, a single date value is specified in the “Values” property in the format “M/d/yyyy h:mm:ss tt" where the month and day are specified in one or two digits, year as four digits and the hour, minutes and seconds as two digits with the AM or PM designation. Multiple date values cannot be specified. The supported Date field constraints are “Date Field Is Equal”, “Date Field Is Less Than”, “Date Field Is Less Than Or Equal”, “Date Field Is Greater Than” and “Date Field Is Greater Than Or Equal”.
User list fields can be specified for test case or test run selection. The constraint “User Is” can be used to specify the user name defined for the user in the user account profile in the form username@url.com.
The Version information is saved in the test case properties. Selection of the test based on the Version property can be specified with the “Version Field Contains” constraint.
At least one criteria must be present
...
.
Provide a list of field updates: for Test Cases and/or Test Runs:
Field updates are presented as a list of JSON objects with
...
four properties: Name, Value, Field Type and Overwrite
Name is the qTest Label of the field. This must match exactly with what is in qTest.
Value is the value to set the field to or append to the existing value
Overwrite is a boolean indicating if the existing field value should be overwritten or appended to. True or omitting the property will overwrite the contents of the field and false will append to the existing value.
Appending only works for text fields and will be ignored for single select fields, user and date fields.
If the field to be updated is a User or Date type field, specify “field_type” as “User” or “Date”. Otherwise, the “field_type” is not specified and defaults as a text field.
This is not required for the utility to process.
User list fields can be specified for test case update as the user name defined for the user in the user account profile in the form username@url.com. Test run user fields are specified as a single user account profile name.