-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collection runner stops to run if one request fails. #3845
Comments
I have the same |
+1 |
1 similar comment
+1 |
Also want to +1, especially... can the report show 1 fail. At the moment it reports 0 fail, so it looks like all tests passed. |
+1 |
attempting to use this in production on a web server to verify connectivity. we prefer not to run node on our windows servers, so newman isn't preferred. |
+1 |
14 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
Would also appreciate this. |
+1 |
+1 It's so weird to offer this feature incomplete like this. We would like to build our our tests ahead of time and run while we develop - catching more than one bug/issue at a time. |
Strange to know this feature is still not there. If i have 100 test, and test nbr 2 fails.. I cannot check what others 98 are doing.. For now this has helped from command line, but this feature should be brought to UI. Its very basic
--bail false.. does not stop the test when ran from command line as mentioned by one of the user above |
@RuniQa anytime line to get this feature ? |
@RuniQa Would really appreciate having this. As it stands, the behaviour is a bit all over the place: a test assertion fails? Tests continue. A request returns an error code? Tests continue. A Javascript error occurs in a Test? Tests stop. |
+1 - I would like the runner to continue when it does not get a response at all from the server, in the same way it goes on when a 404 or a 500 status code is returned from the server. Not getting a response from the server is, in a way, a server error but that the server wasn't able to manage, right? Could not get response - Error: read ECONNRESET halts all processing. I would like to have the --bail option as a checkbox on the runner next to Save Responses, Keep variable values, etc. If it exists in Newman it could exist as well in Postman, right? Thanks! |
+1. |
+1 |
2 similar comments
+1 |
+1 |
+1 It's been 6 years since this was brought up, still nothing? |
Over the years I found a solution for this. If you cover all the code within pm.test, then exceptions will always be handled and the runner won't stop. |
Hi all, To confirm you are looking for Runner to continue to execute if there is an error in a Request. I have a rough mockup to share, let me know if this makes sense, we can add an option in Advanced Settings to give you more control over your runs : You can indicate if you wish to stop the run on request error or continue to run by checking/unchecking this option. We will remember this setting in your session. By default, we will go with the existing behavior i.e. to stop the run when error occurs. Let me know if you like to add some thoughts on this. Regards, |
This looks really good to me. Thanks! |
That looks great - thanks Malvika. Will Newman also support continued running when an error occurs? |
@LTRichHouse newman already supports this. By default, a newman run will continue to happen and go to the next request if the current request is in error. If you wish for the run to stop when an error occurs you can use the option --bail. Hope this helps. |
@malvikach Oh boy, that looks great. |
Can you please provide an example on how you cover the error within pm.test? I tried doing that but since the error sometimes comes from the request I think it doesn't even reach the testing phase. |
Yes, that's great! Do you have a prediction on how long it would take to implement this? |
@lucianamerege I will keep this thread updated with timelines as I have more to share. Regarding the errors inside pm.test(), I checked how Postman CLI or Newman handles it currently, it seems even if the request errors out, the assertions are run and result in assertion failures. (To reproduce an error inside the pm.test() I tried to access an object of a response, I also tried to just return an exit code of 1) If you have some other examples regarding this, feel free to share and I can take a look. Overall, how would you like the system to behave in case there is an error inside a pm.test() - do you expect the run to stop or continue? Currently, the behavior we will build will be similar to Newman/ Postman CLI so feel free to give it a spin on the terminal and let us know. Thanks |
Both postman client and Newman should continue to run further requests and tests. Both should clearly indicate that a failure has occurred during the test run in the test results. Newman should return a non-zero failure status. I can only remember seeing the problem when using Windows Postman client (not Newman) , but my memory is bad. |
Thanks. I had a feeling it did and it's reassuring to have this confirmed. I mentioned Newman as I wanted this "continuing" behaviour in Newman to continue by default - sounds like it will be. For Postman client it would be even better if the option to continue was a persisted user setting that I would always have turned on, without having to remember to tick it in each session. I would almost always want continuation. |
Hi All, Glad to inform everyone that this improvement has been released in the latest Postman release (version 10.13). You can now customize the Collection Runner to continue to run if an error occurs. The setting will be checked by default i.e. by default Runner will stop the execution in case of an error. If you wish to continue runner to execute, you can uncheck this setting and Postman will remember it throughout your session for all subsequent runs unless you change it. Hope this helps your workflows. Once again, thanks a lot for sharing your feedback on this. Please note: The Postman version update is being rolled out, you will get it in the next 1-2 days if you haven't already. @LTRichHouse Please do give this a try and let us know your experience, we can discuss further regarding the option to always remember the setting. Cheers, |
This is great, but not available in scratchpad mode... |
App Details:
Postman for Windows
Version 5.3.2
win32 10.0.15063 / x64
Issue Report:
Description
![screenshot 48](https://user-images.githubusercontent.com/33484160/33076994-c2df0c8e-cece-11e7-9c6b-69a2dad97390.jpg)
One of my services (name it service_X) is off from time to time. In that case there I will not get response from it.
However rest of my services will respond with success. Service_X is tested somewhere in the middle of the collection. Like in the example:
![screenshot 47](https://user-images.githubusercontent.com/33484160/33076936-8b80fbee-cece-11e7-9ebc-643a5fb8f86d.jpg)
When I run Collection Runner to check all requests in the collection and service_X is off, I am getting error and any next steps are not executed.
![screenshot 49](https://user-images.githubusercontent.com/33484160/33077103-1cbde8e2-cecf-11e7-805f-cb208f5b0f6d.jpg)
Expected behaviour:
Collection Runner should run to the end of the collection and log error in execution of one of the tests.
I would be grateful for any help on that matter.
The text was updated successfully, but these errors were encountered: