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/QTMSv816/pages/3541044327 to install and enable advanced Automation API features available with QMetry v8.13.0 and above.

Automation API Features and Changes

  1. 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.

  2. New test suites can be created in a specified folder while importing automated test results using the tsFolderPath parameter in the Automation API request.

  3. The parameters id, buildID, platformID, testsuiteId, and entityURL will no longer be available directly in the automation API response. The automation API response will now provide a requestId parameter that will be used by a new follow up API to return.

  4. A follow-up API to get automation progress status using the requestId parameter will return the test suite key and import status.

  5. 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.

  6. The job status and the test suite details of the automation test result imports are now visible in the scheduled tasks section.

  7. 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.

  8. Added support for importing test case step attachments for the QAF framework.

  9. Reusing existing test cases is supported using the entity key for the Junit framework.

  10. For the QAF framework, attachments associated with sub-checkpoints are uploaded to their respective test case steps when uploading automation results.

  11. 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.

  12. Skip status in the automation result file is applied as "Not Applicable" instead of "Not Run" for automation test executions upload.

  13. 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.

  14. 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.

  15. Allow specifying of multiple values to requirementExternalKey, requirementEntityKey, and Testcasekeys attribute in the Junit result file to link/map multiple requirements to test cases.

  16. 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

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/{requestId}

GET

-

-

Automation API

API

/rest/import/createandscheduletestresults/1

API

/rest/import/createandscheduletestresults/1

Method

POST

Impact of change

High

Backward Compatibility

No

Reason for change

Performance improvements, new feature requiring is_matching_required parameter, added ability to specify test suite folder for import with new parameter tsFolderPath

Changes

  • Request: Support for parameters is_matching_required and tsFolderPath

  • Response: id, buildID, platformID, testsuiteId, and entityURL are removed. New parameter introduced - requestId

Version 8.12.0

Version 8.13.0

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}

API

/rest/admin/status/automation/{requestId}

Method

GET

Request

Content-Type: application/json

Parameters

Name

Located in

Required

Description

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

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.