newman icon indicating copy to clipboard operation
newman copied to clipboard

ignore requests error

Open yakhira opened this issue 5 years ago • 9 comments

Version and environment information:

  1. Newman Version (can be found via newman -v): 4.4.0
  2. OS details (type, version, and architecture): Linux, Mac OS X
  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: Always
  5. Expected behaviour: tests passed
  6. Command / script used to run Newman: newman run collection.json -e variables.json --verbose
  7. Sample collection, and auxiliary files (minus the sensitive details): N/A
  8. Screenshots (if applicable): N/A

We had issue "retry in case of failure" was suggested to solve it programmatically, but newman fails anyway because of request error, even if we retry it successfully. Is it possible somehow to ignore requests error?

yakhira avatar Feb 27 '19 16:02 yakhira

i have a similar request. Basically, i KNOW that an API will fail for x number of times before it begins working. it retries until it begins working, then the collection continues running. is there any way i can mute the error? or somehow not report it as a failure at the end of the newman run?

is there any ETA for the same?

WinstonJake avatar Aug 26 '20 14:08 WinstonJake

+1 for this feature request. We have a use case where the pre-request script retries the request to an endpoint for 'x' number of times until the server is up/ready and continues running the rest of the collection.

This is from following the advice on this post: https://community.postman.com/t/retry-a-failing-request/5934

However, at the end of the collection run, newman returns the result as a failure if a request failed even though a retry was successful and no test cases actually failed.

Is there a way to ignore such an error?

gpabo avatar Mar 09 '21 02:03 gpabo

any update

debu99 avatar Feb 18 '22 22:02 debu99

+1 for this feature request. We have a use case where request to an endpoint sometimes fail with a timeout/ network hiccups (it's very rare) and we have a logic in place to retry it after a few seconds.

Even if one of retries succeed, at the end of the collection run newman returns the result as a failure if a request failed even though a retry was successful and no test cases actually failed.

Screen Shot 2022-02-18 at 5 22 38 PM

It would be nice to have a flag that would allow the exit code to be 0. Something like --ignore-requests-failed or the ability to recognize retried failed requests that succeed.

jjduarte avatar Feb 18 '22 22:02 jjduarte

Any update?

elyes-mms avatar Sep 12 '22 12:09 elyes-mms

Any update on this new feature please?

sowjanyabodla avatar Jan 30 '23 05:01 sowjanyabodla

Hello, Would it be possible to review the fix and do a merge please? Thanks

sowjanyabodla avatar Feb 13 '23 08:02 sowjanyabodla

Hello,

Can someone review the PR and merge it please?

https://github.com/postmanlabs/newman/pull/3066

Thanks,

rvijayarajan avatar Feb 20 '23 18:02 rvijayarajan

Having Newman fail the final result because of requests falling on some network issues is a real dealbreaker. Could the maintainer please review @rvijayarajan PR? Releasing a version with a flag that marks request network hiccups as non-breaking is greatly anticipated. Thank you in advance!

sindilevich avatar Apr 14 '24 16:04 sindilevich