postmanlabs / newman

Newman is a command-line collection runner for Postman
https://www.postman.com
Apache License 2.0
6.88k stars 1.16k forks source link

Issue with integrating newman reporters with jenkins #850

Closed ShilAggarwal closed 7 years ago

ShilAggarwal commented 7 years ago
  1. Newman Version (can be found via newman -v): 3.3.0
  2. OS details (type, version, and architecture): Windows 7- 64 bit machine
  3. Are you using Newman as a library, or via the CLI? :CLI
  4. Did you encounter this recently, or has this bug always been there:
  5. Expected behaviour: Newman should generate report for the test collection run
  6. Command / script used to run Newman: newman run test_collection.json -e test.json -d test_data.csv --reporters json reporter-json-export ./outputfile.json
  7. Sample collection, and auxilliary files (minus the sensitive details):
  8. Screenshots (if applicable):

Running command : newman run test_collection.json -e test_environment.json -d test_data.csv --reporters json reporter-json-export ./outputfile.json Getting error : Build step 'Execute shell' marked build as failure

czardoz commented 7 years ago

@ShilAggarwal Newman exits with a non-zero status code on failures, so if your collection has failed tests or request errors, your Jenkins build will fail. You can use --suppress-exit-code option to ensure that Newman always exits with an exit code of zero.

kunagpal commented 7 years ago

@ShilAggarwal To add to what @czardoz has said, you'll also have to update the last part of your newman run ... command to: --reporter-json-export ./outputfile.json. All CLI options begin with one or more -, so reporter-json-export is invalid.

kunagpal commented 7 years ago

@ShilAggarwal Does this issue persist for you?

kunagpal commented 7 years ago

@ShilAggarwal Closing issue due to inactivity, feel free to re-open if you're experiencing difficulties.