Microsoft Azure DevOps pipeline

You can integrate your Perfecto project with Azure DevOps Pipeline. This task requires that you have an Azure DevOps Account and that you have created a project there. If you need help with setting up an account and creating a project, see the following links:

This example will use a test project based on Quantum, Perfecto's recommended Java framework, although many types of frameworks are supported by Azure DevOps pipeline.

Important: This document includes references to a third-party product, Microsoft Azure Pipelines. The user interface and usage of third-party products are subject to change without notice. For the latest published information about Microsoft Azure Pipelines, see https://learn.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops.

Step-by-step instructions

  1. Go to Azure Pipelines and select New Pipeline.

  2. Specify where your code is, for example in a GitHub project.

  3. Click Authorize and enter credentials if prompted.

  4. Select the relevant repository. You may be prompted for your password again.

  5. When redirected to https://github.com/settings/installations, configure Azure Pipelines in GitHub.

  6. When you have selected the desired repositories, click Approve and Install.
  7. Select the Pipeline you would like to set up.

  8. Click Show more and select Maven.

    The YAML file is prepared for you. 

    The default file looks like the following. You can edit it as needed.

    Copy

    azure-pipelines.yml

        # Maven
        # Build your Java project and run tests with Apache Maven.
        # Add steps that analyze code, save build artifacts, deploy, and more:
        # https://docs.microsoft.com/azure/devops/pipelines/languages/java

        trigger:
        - master
        
        pool:
            vmImage: 'ubuntu-latest'
        
        steps:
        - task: Maven@3
            inputs:
                mavenPomFile: 'pom.xml'
                mavenOptions: '-Xmx3072m'
                javaHomeOption: 'JDKVersion'
                jdkVersionOption: '1.8'
                jdkArchitectureOption: 'x64'
                publishJUnitResults: false
                testResultsFiles: '**/surefire-reports/TEST-*.xml'
            goals: 'package'

    If you want to integrate the result with the CI Dashboard in Perfecto, delete the line goals: 'package' and import the following lines instead:

    Copy
    goals: 'clean install'
    options: '-Dreportium-job-name=$(Build.DefinitionName) -Dreportium-job-number=$(Build.BuildId) -Dreportium-job-branch=$(Build.SourceBranch)'
  9. At the top right, click Save and Run.

  10. Wait for Azure to finish.

  11. In the Perfecto Report Library, check the reports to verify that your tests are running.