-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(runner): enable the bail setting #7942
Conversation
292975c
to
f1c5b4f
Compare
in the CLI and other testing frameworks this is referred to as "bail" also please avoid abbreviation like "curIteration" where possible. |
Let me update that part although I just copied them. 🥹 |
c37ca27
to
a91d08a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ihexxa I've tried
- setting an assertion of a request to fail
- causing a reference error (e.g. non existing variable)
- or adding a non existing environment variable / template tag to the url path
in none of these cases did the bail seem to work, still executing the request that came afterwards.
Is there any other type of errors that are actually meant to make the option trigger?
Thanks @filfreire let me check, assertion failure and non-exist variables might not be regarded as "error"s in runner. You could try just throw an error although it is a bit wild. |
a91d08a
to
3a8030a
Compare
From my point of view, |
3a8030a
to
3e1d14b
Compare
bail or stop-on-error, should exit the runner if at any point a test fails or an unhandled exception occurs, in my mental modal a request is equivalent to a test suite containing 0..n tests. In the cli i need to keep a success flag in the outer loop and return out oif the runner loop early if bail is true. In this PR a throw is probably a more sensible way to bail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Bail should now work for referenceError thrown - I think this is OK 👍
Assertion and missing Env variable - might not be be a good idea to add now
We found in other clients the behavior is the same.
There is one extra case where an assertion can fail - and what's the behavior of that failure when outside of a test's scope - but it should be ok to leave it out of scope of this PR
c4e9528
to
6806665
Compare
Background
By enabling "stop on error" setting, runner stops immediately when it sees an error.
Changes
Ref: INS-4403