I am new to Cypress automation and I am trying to create an azure devops pipeline for calling UI based tests in cypress.
The pipeline is giving success status but the report shows NAN%
along with no data.
Below is my pipeline for your reference:
trigger:
- main
pool:
name: XXXXXXXXX
steps:
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
Contents: '***'
TargetFolder: $(build.artifactstagingdirectory)
- task: Npm@1
inputs:
command: 'install'
workingDir: $(build.artifactstagingdirectory)
- task: Npm@1
inputs:
command: 'custom'
workingDir: $(build.artifactstagingdirectory)
customCommand: 'install cypress --save-dev'
- task: Npm@1
inputs:
command: 'custom'
workingDir: $(build.artifactstagingdirectory)
customCommand: 'install --save-dev allure-commandline'
- task: Npm@1
inputs:
command: 'custom'
workingDir: $(build.artifactstagingdirectory)
customCommand: 'install --save-dev allure-cypress'
- task: CmdLine@2
inputs:
script: |
echo 'landing in solution folder'
cd $(build.artifactstagingdirectory)
echo 'run cypress'
npx cypress run --env allure=true --browser chrome
- task: AllureGenerate@1
inputs:
resultsDir: 'allure-results'
targetDir: 'allure-report/$(Build.BuildNumber)'
- task: PublishAllureReport@1
inputs:
reportDir: 'allure-report/$(Build.BuildNumber)'
The report that is generated looks like this :
I was expecting the allure report to have details of the tests which ran in the pipeline but no data is appearing.
New contributor
Deepika Gupta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.