I have a simple script in Azure DevOps pipeline YAML executing postman collection tests using newman.
- script: $(Agent.WorkFolder)/node_modules/newman/bin/newman.js run "$(Build.SourcesDirectory)/postman/a.postman_collection.json" -e "$(Build.SourcesDirectory)/postman/b.postman_environment.json" -x -r junit --reporter-junit-export $(Build.ArtifactStagingDirectory)/PostmanResults/JunitResults.xml
displayName: Run Postman tests
Basically, it works. But this step is always green regardless of tests are passing or not.
How could I force this task/stage fail if there are some unsuccessful tests? Or somehow identify if there are test failures? Does anyone know any clever workaround?
