Forum Discussion

thanujapathiraja's avatar
thanujapathiraja
Copper Contributor
Aug 12, 2024
Solved

##[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'. Finishing: Run newman   I need to continue the...
  • Kidd_Ip's avatar
    Aug 12, 2024

    thanujapathiraja 

     

    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()

Resources