You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An issue that has been bothering me for a while is that when a status assertion (it can be other assertion as well) fails, the response is not printed. Most of the time (at the least in the case of Rest APIs), the response contains a hint about why the status assertion fails, and it makes it easy to debug when the response is printed. Currently, I need to add parse and print response code everytime I need it, and it gets more annoying when tests are running in the CI. I am aware of the plugin https://github.com/izumin5210/gentleman-logger, but with the plugin the response is printed in all cases (and also it seems very old and not maintained). Example:
An issue that has been bothering me for a while is that when a status assertion (it can be other assertion as well) fails, the response is not printed. Most of the time (at the least in the case of Rest APIs), the response contains a hint about why the status assertion fails, and it makes it easy to debug when the response is printed. Currently, I need to add parse and print response code everytime I need it, and it gets more annoying when tests are running in the CI. I am aware of the plugin https://github.com/izumin5210/gentleman-logger, but with the plugin the response is printed in all cases (and also it seems very old and not maintained). Example:
The assertion error in this case is
Unexpected status code for: POST https://httpbin.org/anything => 200 != 500
To be able to see the error, one has to add some boilerplate code:
It would be nice if this is provided out of the box, and only when the assertion fails.
The text was updated successfully, but these errors were encountered: