newman icon indicating copy to clipboard operation
newman copied to clipboard

Interaction between `--bail` & `--iteration-count`

Open vrinek opened this issue 8 years ago • 5 comments

Assume collection.json with 2 requests and the following command:

newman run collection.json --bail --iteration-count 2

The behaviour I can observe now is that if the first request on the first iteration fails, nothing else is run.

The behaviour I would expect is if the first request on the first iteration fails, the second iteration still runs. The reason I expect this behaviour is that I use --iteration-count to test for flaky vs broken APIs and I use --bail because the calls in each collection are sequential (each one depends on globals set by the previous one).

Is the behaviour I describe above something that is possible with some options? Is it a potentially interesting addition to newman?

vrinek avatar Sep 23 '16 10:09 vrinek

Hey @vrinek, you've made an interesting point there. @czardoz @shamasis

kunagpal avatar Sep 23 '16 11:09 kunagpal

I'm thinking of a concept of "bail mode" that can be passed optionally as parameter to --bail

shamasis avatar Sep 28 '16 07:09 shamasis

@vrinek This is not a part of our current roadmap, but has been marked as a feature request and added to our internal tracker. We'll update this thread when any progress occurs on this. :)

kunagpal avatar Oct 20 '16 15:10 kunagpal

@kunagpal thanks for the update

vrinek avatar Oct 23 '16 11:10 vrinek

@czardoz can we make --bail also accept an optional parameter and then allow bailing modes? Say, --bail iteration. It could take iteration or collection and collection is set as default if nothing is set.

shamasis avatar Oct 30 '16 17:10 shamasis