Automation API Changes with QMetry v8.10.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.10.0 scheduled to be released on 12th March 2022 for all the cloud 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.

Updates

  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.

Summarized change in the Automation API

API Name

Status

REST URL

Method

Backward compatibility with 8.9

Request Change

Response Change

API Name

Status

REST URL

Method

Backward compatibility with 8.9

Request Change

Response Change

Automation API to Import Results

Updated

/rest/import/createandscheduletestresults/1

POST

No

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

Version 8.10

Version 8.9

Version 8.10

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

Version 8.10

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.