[Newman question] - How to overcome an issue once test failed due to network issue but on retry test has been succeeded thus Newman will return Success (exit code 0) instead of failed(exit code -1) at the moment

Iā€™m searching for a solution for a following issue:

  • There is a user-flow (folder with a list of requests with a relevant tests).
  • User-flow running under Newman + htmlextra ci/cd pipeline
  • User-flow running on test environments which is has 3 party dependencies (services, networking etc)

The issue is the network timeouts, socket hang up.
Which is why i added a kind of retry mechanism in postman
that allows me to repeat the requests once test got status code 5xx

So eventually the user-flow itself pass as you see at the print screen
(the second retry succeded) but Newman return fail on such user-flow
once we got at least one timeout.

The question is: How i can overcome such issue
Once the retry succeeded i would like newman will return Success (exit code 0)