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:
- https://azure.microsoft.com/en-in/products/devops/
- https://docs.microsoft.com/en-us/azure/devops/organizations/projects/create-project?view=azure-devops
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.
Step-by-step instructions
-
Go to Azure Pipelines and select New Pipeline.
-
Specify where your code is, for example in a GitHub project.
-
Click Authorize and enter credentials if prompted.
-
Select the relevant repository. You may be prompted for your password again.
-
When redirected to https://github.com/settings/installations, configure Azure Pipelines in GitHub.
- When you have selected the desired repositories, click Approve and Install.
-
Select the Pipeline you would like to set up.
-
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.
Copyazure-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:Copygoals: 'clean install'
options: '-Dreportium-job-name=$(Build.DefinitionName) -Dreportium-job-number=$(Build.BuildId) -Dreportium-job-branch=$(Build.SourceBranch)' -
At the top right, click Save and Run.
-
Wait for Azure to finish.
-
In the Perfecto Report Library, check the reports to verify that your tests are running.