Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Dec 03, 2019 15:28

This section walks you through integrating your Perfecto project with Azure Pipelines. It assumes 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 Pipelines.

On this page:

Demo video

The following video illustrates the integration process.

Step-by-step instructions

  1. Go to Azure Pipelines and select New Pipeline.
  2. Specify where your code is. In this example, we point to 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 the following page (https://github.com/settings/installations), configure Azure Pipelines in GitHub as per:

    Scroll down to find this:



  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.

    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 these lines:

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


    You will see the test running like this:


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