newman
newman copied to clipboard
ignore requests error
Version and environment information:
- Newman Version (can be found via
newman -v
): 4.4.0 - OS details (type, version, and architecture): Linux, Mac OS X
- Are you using Newman as a library, or via the CLI? CLI
- Did you encounter this recently, or has this bug always been there: Always
- Expected behaviour: tests passed
- Command / script used to run Newman: newman run collection.json -e variables.json --verbose
- Sample collection, and auxiliary files (minus the sensitive details): N/A
- 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?
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?
+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?
any update
+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.
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.
Any update?
Any update on this new feature please?
Hello, Would it be possible to review the fix and do a merge please? Thanks
Hello,
Can someone review the PR and merge it please?
https://github.com/postmanlabs/newman/pull/3066
Thanks,
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!