Automation API Changes with QMetry v8.13.0
With the new and upcoming releases of QMetry, we continue to add exciting and useful new features that improve usability. The new features and improvements being added to QMetry also necessitate changes in the APIs. This page enlists changes in the Automation API and an important new API that will be updated from v8.13.0 scheduled to be released on 12 July 2023 for all the server customers. The purpose of this document is to help integration teams keep their code updated and current with the API changes/updates to the existing APIs. In case you do not use the Automation API to import results, these changes can be safely ignored.
IMPORTANT: To take advantage for the following changes and updates, a separate installation for QMetry Automation API is required. Please refer https://qmetrysupport.atlassian.net/wiki/spaces/QTMSv813/pages/3332836571 to install and enable advanced Automation API features available with QMetry v8.13.0 and above.
Automation API Features and Changes
Introduced a new parameter
is_matching_required
in Automation API request that allows updating execution status on a linked test case version or latest version by matching test case keys in the result file instead of creating a new version even if the test summary and steps do not match.New test suites can be created in a specified folder while importing automated test results using the
tsFolderPath
parameter in the Automation API request.The parameters
id
,buildID
,platformID
,testsuiteId
, andentityURL
will no longer be available directly in the automation API response. The automation API response will now provide arequestId
parameter that will be used by a new follow up API to return.A follow-up API to get automation progress status using the
requestId
parameter will return the test suite key and import status.The automation result import process now reuses the existing test case version for which the summary and steps match exactly when the test case has multiple versions.
The job status and the test suite details of the automation test result imports are now visible in the scheduled tasks section.
The Description value in the result file for the Cucumber framework will be imported as a Test Case Description when a new version of a test case gets created.
Added support for importing test case step attachments for the QAF framework.
Reusing existing test cases is supported using the entity key for the Junit framework.
For the QAF framework, attachments associated with sub-checkpoints are uploaded to their respective test case steps when uploading automation results.
For QMetry projects using the internal issue module, the "Error message" and "Trace" for the automated test executions get added as a text attachment to the bug for developer reference.
Skip status in the automation result file is applied as "Not Applicable" instead of "Not Run" for automation test executions upload.
Achieve traceability by auto-linking internal requirements with Junit test cases uploaded through automation import using the keyword
requirementEntityKey
to specify the entity key in the result file.Achieve traceability by auto-linking requirements synced from external trackers (e.g. Jira, Azure, Rally) with Junit test cases uploaded through automation import using the keyword
requirementExternalKey
to specify the external issue/work item key in the result file.Allow specifying of multiple values to
requirementExternalKey
,requirementEntityKey
, andTestcasekeys
attribute in the Junit result file to link/map multiple requirements to test cases.Improved performance for automation test results imports using Automation API, QMetry Test Management Plugin for Jenkins, QMetry Test Management Plugin for Maven & QMetry Bamboo Integration app.
Summarized change in the Automation API
API Name | Status | REST URL | Method | Request Change | Response Change |
---|---|---|---|---|---|
Automation API to Import Results | Updated | /rest/import/createandscheduletestresults/1 | POST | Yes | Yes |
API to get automation progress status | New | /rest/admin/status/automation/{ | GET | - | - |
Automation API
API | /rest/import/createandscheduletestresults/1 |
---|---|
Method | POST |
Impact of change | High |
Backward Compatibility | No |
Reason for change | Performance improvements, new feature requiring |
Changes |
|
Version 8.12.0 | Version 8.13.0 |
---|---|
Request Body  | Request Body  |
Response Body {
"success": true,
"code": "CO.IMPORT_SCHEDULED",
"message": "Import has begun. Go to Scheduled Task to view progress.",
"data": [
{
"id": 106412,
"buildID": 18411,
"platformID": 16641,
"testsuiteId": "MAC-TS-349",
"entityURL": "https://testmanagement.qmetry.com/#/test-suite/275435",
"skipReplication": true
}
]
} | Response Body {
"requestId": 106412,
"success": true,
"code": "CO.IMPORT_SCHEDULED",
"message": "Import has begun. Go to Scheduled Task to view progress."
} |
API to check Automation Progress
This API uses the requestId
from the above Automation API, to return the automation progress details in response like Automation Framework, Request Time (epoch), status, test suite details, and error log download location.
API | /rest/admin/status/automation/{requestId} |
---|---|
Method | GET |
Request | Content-Type:Â application/json |
Parameters
Name | Located in | Required | Description |
---|---|---|---|
project | header | yes | project key OR project name OR project id OR default |
apikey | header | yes | Automation API key from Integrations > Automatin API section. |
Version 8.13.0 |
---|
Response Body - Request in Progress {
"requestId": "9688",
"automationFramework": "JUnit",
"requestTime": 1646861538944,
"requestByUser": "jatin",
"status": "In Queue"
} Response Body - Request Completed. Response Body - Failed with error. |
 Scheduled Task UI changes
The job status and the test suite details of the automation test result imports like Request ID, Status, Test Suite ID, Test Suite Summary, Automation File details or error logs will also be visible now in the scheduled tasks section in QMetry.
Â