Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Integration with Azure DevOps CI/CD Pipelines

QMetry enables users to publish the automation execution results achieved through Azure DevOps CI/CD pipelines to QMetry via script.

Table of Contents

Prerequisites

  • The Azure DevOps repository should have been integrated with QMetry to push/pull feature files.

  • The source code should have been hosted on the Azure DevOps repository.

  • The azure-pipelines.yml file should have been created in Repository > Files in Azure DevOps.

Set up the Azure DevOps Pipeline

Steps to set up the Azure DevOps pipeline that executes an automated tests project and sends the results to QMetry.

...

Panel
bgColor#EAE6FF

Download the sample file:

View file
nameAzure-pipelines_YML.zip

Define Parameters

The parameters used for QMetry Automation API can be defined in the azure-pipelines.yml file.

...

(B) The variables can be added at run time while running the Pipeline and can be used dynamically.

...

Azure Pipeline YAML Configuration

→ Using Body Parameters in azure-pipelines.yml

...

  • Use CmdLine@2 Azure Task to write the migration script.

  • Finally, the cURL request migrates the test result file to the QMetry Platform.

  • Here, We have used dynamic Parameters which are defined in the Parameters section.

...

How To Migrate Test Results?

There are two ways to migrate test result files from Azure DevOps to QMetry.

...

(B) Using the Test Result Files

(A) Migrate Test Results through Source Code

Step 1. First, Build the Project, which produces the Test Result Files.

...

Step 4. Then uncomment the Migration Script which was commented on in Step 1 above. Then run the pipeline again.  

...

(B) Migrate Test Results using the Test Result Files

Step 1. Upload the test result file in the Azure repository along with the azure-pipelines.yml file.

...

Step 2. Then run the pipeline with the variables and CmdLine@2 Task as shown below.

...

Run Pipeline

You can go ahead and initiate the pipeline once all the required parameters are defined and the configuration is done.

...

The job is completed successfully.

...

Verify the Progress in QMetry

In QMetry, you can view the progress of the automation result upload to QMetry.

...