Forum Discussion
##[error]PowerShell exited with code '1'
When I run Newman in the pipeline if there is failure, it stop the rest of the pipeline.
##[error]PowerShell exited with code '1'.
How about this:
- task: PowerShell@2
displayName: Run newman
inputs:
targetType: 'inline'
script: 'newman run $(System.DefaultWorkingDirectory)/test/postman_collection.json -r htmlextra --reporters cli,htmlextra,junit --reporter-junit-export $(System.DefaultWorkingDirectory)/test/Results/junitReport.xml --reporter-htmlextra-export $(System.DefaultWorkingDirectory)/test/report/TestReport.html'
errorActionPreference: 'continue'
continueOnError: true
condition: succeededOrFailed()
How about this:
- task: PowerShell@2
displayName: Run newman
inputs:
targetType: 'inline'
script: 'newman run $(System.DefaultWorkingDirectory)/test/postman_collection.json -r htmlextra --reporters cli,htmlextra,junit --reporter-junit-export $(System.DefaultWorkingDirectory)/test/Results/junitReport.xml --reporter-htmlextra-export $(System.DefaultWorkingDirectory)/test/report/TestReport.html'
errorActionPreference: 'continue'
continueOnError: true
condition: succeededOrFailed()- thanujapathirajaCopper Contributortask: PowerShell@2
displayName: Run newman
inputs:
targetType: 'inline'
script: 'newman run $(System.DefaultWorkingDirectory)/test/postman_collection.json -r htmlextra --reporters cli,htmlextra,junit --reporter-junit-export $(System.DefaultWorkingDirectory)/test/Results/junitReport.xml --reporter-htmlextra-export $(System.DefaultWorkingDirectory)/test/report/TestReport.html --bail false'
ignoreLastExitCode: true
condition: always()
finally solved. Thanks for the help kidd_lp 🙂