即使 Azure Pipelines 上的 cypress 测试失败,是否有任何选项可以始终通过管道?
Is there any options for always passing pipeline even though cypress tests fails on Azure Pipelines?
"instance1": "CYPRESS_API_URL='http://localhost:1234/' cy2 run --record --parallel --config video=false -e TAGS='not @cleanup and @focus' --key sofy-automation --ci-build-id `date +%F+%H+%M`",
"cleanup-instance": "CYPRESS_API_URL='http://localhost:1234/' cy2 run --record --parallel --config video=false -e TAGS='@cleanup' --key sofy-automation --ci-build-id `date +%F+%H+%M`",
"parallel": "npm-run-all --sequential delete:reports --parallel --continue-on-error instance1 instance1 instance1 --sequential cleanup-instance --sequential combine:reports"
以上是我在 vsts Microsoft azure 管道上的 cypress 测试脚本 运行。
每当任何测试用例失败时,它也会使整个管道失败。
我已经通过 Yaml 文件配置了。
- task: Yarn@2
displayName: 'run parallel'
inputs:
ProjectDirectory: '$(Build.SourcesDirectory)'
Arguments: 'parallel'
workingDir: '$(Build.SourcesDirectory)'
verbose: 'true'
有没有办法让构建管道始终为真?
使用 continueOnError property 使管道继续,即使此任务失败:
- task: Yarn@2
displayName: 'run parallel'
inputs:
ProjectDirectory: '$(Build.SourcesDirectory)'
Arguments: 'parallel'
workingDir: '$(Build.SourcesDirectory)'
verbose: 'true'
continueOnError: true
"instance1": "CYPRESS_API_URL='http://localhost:1234/' cy2 run --record --parallel --config video=false -e TAGS='not @cleanup and @focus' --key sofy-automation --ci-build-id `date +%F+%H+%M`",
"cleanup-instance": "CYPRESS_API_URL='http://localhost:1234/' cy2 run --record --parallel --config video=false -e TAGS='@cleanup' --key sofy-automation --ci-build-id `date +%F+%H+%M`",
"parallel": "npm-run-all --sequential delete:reports --parallel --continue-on-error instance1 instance1 instance1 --sequential cleanup-instance --sequential combine:reports"
以上是我在 vsts Microsoft azure 管道上的 cypress 测试脚本 运行。 每当任何测试用例失败时,它也会使整个管道失败。 我已经通过 Yaml 文件配置了。
- task: Yarn@2
displayName: 'run parallel'
inputs:
ProjectDirectory: '$(Build.SourcesDirectory)'
Arguments: 'parallel'
workingDir: '$(Build.SourcesDirectory)'
verbose: 'true'
有没有办法让构建管道始终为真?
使用 continueOnError property 使管道继续,即使此任务失败:
- task: Yarn@2
displayName: 'run parallel'
inputs:
ProjectDirectory: '$(Build.SourcesDirectory)'
Arguments: 'parallel'
workingDir: '$(Build.SourcesDirectory)'
verbose: 'true'
continueOnError: true