You can upload the QAS execution results to other products of QMetry product suite - QMetry Test Management and QMetry for Jira - Test Management.
First you need to integrate QMetry Automation Studio with QMetry Test Management / QMetry for Jira - Test Management.
There are two alternate ways to access the Integration with QMetry screen:
(A) Select QMetry > Integrations.
(B) As an alternate way, open QMetry > Test Recorder. Then click on the Configuration icon above the tree.
On Integration screen, select Cloud or Server versions that you want to integrate with QAS.
Note: The QTM4J URL should be suffixed with the following to upload results in QTM4J application -
Provide integration details and save the integration.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
Alias Name | string | Yes | QTM4J Integration Alias Name as per user preference. |
URL | string | Yes | QTM4J URL to upload execution test results. Example: http://qtm4jmssql.qmetry.com:8080/rest/qtm/latest/automation/importresults |
apiKey | string | Yes | Your API Key. API Key is unique for a specific user in a single project. The result will be imported for the project associated with the given API Key. |
Username | string | Yes | Username to authenticate the login in QTM4J application. |
Password | string | Yes | Password to to authenticate the login in QTM4J application. |
format | string | Yes | Format of result file to be imported. Supported formats: |
testAssetHierarchy | string | No | Level of Hierarchy : Test Scenario-Test Case Or Test Case-Test Step |
testCaseUpdateLevel | number | No | Test Case update level while reusing test case, starts from 0 to 2. (This is only applicable when you use TestCase-TestStep Hierarchy option) 0 Append test steps while reusing Test Case. |
testRunName | string | No | Name of the test run to be created. Default value: Test Run |
platform | string | No | Name of Platform on which test run to be executed. |
labels | string | No | Comma separated names of Labels to be added to the test run. |
versions | string | No | Comma separated names of versions to be added to the test run. |
components | string | No | Comma separated names of Components to be added to the test run. |
sprint | string | No | Name of Sprint to be added to the test run. |
comment | string | No | Comment to be added to the test run. |
Story Key | string | No | The Story Key to which you want to link the test cases executed for particular integration. |
isZip | boolean | No | Pass true for ZIP upload or pass false for single file upload. Default value: false Single test run will be created for multiple files within a zip. |
testRunKey | string | No | Provide Test Run key to append new results to existing Test Run. |
attachFile | boolean | No | Pass true for attachments upload in execution. Default value: false. |
JIRAFields | JSON | No | Check specific Automation custom fields possible value and format here. |
Refer to /wiki/spaces/QTMFJC/pages/22478922 for more details on configuration parameters/wiki/spaces/QTMFJC/pages/22478922
Once you save the integration, it appears on the Integration List.
To edit the integration details, click on the Edit icon.
Modify the details and click Update to save the details.
Else, click on the Save & Upload button to save the integration and upload the execution results into QTM4J.
To upload the execution results into QTM4J, you can also click on the Upload button on the Integration List.
Automation test suite/test cases will be created in QTM4J.
Option 1. Click on the Upload option and select QTM4J.
If the integration already exists, then the integration name will appear on the list. Select the one. In the absence of saved integration, click Other and follow Option 2.
To upload automated test cases with their execution results to QTM4J 4x, click Upload.
Select QTM4J 4x on the list.
Option 2. In the absence of saved integration, click on the Upload option and select Other.
The Integration screen opens. You can add a new Integration and Save it.
You can also upload the execution directly while saving the Integration by clicking on the Save & Upload button.
The saved Integrations are displayed on the Integration list.
Click on the Upload icon for the integration to which you want to upload the test results.
The Upload Results pop-up opens.
Select either of the following options:
Confirm the upload.
The success message appears with a link to the test run which is updated with test results.
The test run is updated with test case and test execution in QTM4J as shown below.
The Test Run screen displays test case and test steps with updated execution results.
When you execute a single test case from the tree and then upload its test results to QTM4J.
Once the execution is completed, click on the Upload button.
It opens the Integration screen. Click on the Upload button for the integration.
The Upload Results pop-up opens. Select either of -
When you are executing a single test suite and then upload the test results to QTM4J.
Once the execution is completed, click on the Upload button.
It opens the Integration screen. Click on the Upload button for the integration.
The Upload Results pop-up opens. Select either of -
When you execute all test suites at once and then upload the test results to QTM4J
Once the execution is completed, click on the Upload button.
It opens the Integration screen. Click on the Upload button for the integration.
The Upload Results pop-up opens.
You can easily upload test results into QMetry Test Management for Jira and set the configuration as default. Whenever you run the automation code via CI, Command Line, test results will be pushed to system, so that you can track the details.
Either QTM Configuration or QTM4J Configuration can be set as default to upload test results at a time.
Note: If the QTM4J Configuration is set as default, then the results will be uploaded to QTM4J as and when a build is triggered through CI/CD tools. |
If the QTM4J configuration is set as default, then the qmetry.properties file, under the resources directory (resources/qmetry.properties), will auto populate the configuration details.
The following is the code snippet of qmetry.properties file.
#This properties file contains qtm/1tm4j server/cloud related information #as per requirement modified it.automation.qmetry.enabled=true automation.qmetry.type=QTM4J automation.qmetry.onpremise=false automation.qmetry.url=https://importresults.qmetry.com/prod/importresults-qtm4j automation.qmetry.apikey=1113a6996548e2f94a71f4535015edcd2d467df648f5e8c0a78 automation.qmetry.platform= automation.qmetry.testassethierarchy= automation.qmetry.testcaseupdatelevel= automation.qmetry.testrunname= automation.qmetry.labels= automation.qmetry.version= automation.qmetry.components= automation.qmetry.sprint= automation.qmetry.comment= automation.qmetry.testrunkey= automation.qmetry.attachfile= automation.qmetry.jirafields= automation.qmetry.debug=false |
Steps to Upload Test Results to default QTM4J
1. Record test case and export.
2. qmetry.properties file:Set configuration details.
If the QTM4J configuration is set as default, then the qmetry.properties file, under the resources directory (resources/qmetry.properties), will auto populate the configuration details.
3. Open the application.properties file and set webdriver path.
4. Open terminal and run command: mvn clean test
It will run the exported test case in the browser whose driver path is set in the application.properties file as per Step 3.
5. Success message is displayed once the results are uploaded to QTM4J.
Click on the testRunUrl to open the QTM4J test run in the browser.
You can see the test execution results on the execution screen.