Closed
Description
Hi,
I'm missing "bail" functionality in VSCode. Currently Httpyac CLI supports "--bail" option which terminates execution when a first test case fails, so I'm wandering is there a way to achieve the same behavior in VSCode?
Here's a simple example:
### First
# @name first
POST https://httpbin.org/anything
Content-Type: application/json
{
"name": "First"
}
{{
test('first test', () => {
// "This will always pass";
});
}}
### Second
# @name second
POST https://httpbin.org/anything
Content-Type: application/json
{
"name": "Second"
}
{{
test('second test', () => {
throw "This will always fail";
});
}}
### Third
# @name third
POST https://httpbin.org/anything
Content-Type: application/json
{
"name": "Third"
}
{{
test('third test', () => {
// "This will always pass";
});
}}
//==========================================
### All
# @forceRef first
# @forceRef second
# @forceRef third
When I execute "All" in VSCode I would expect that after "second" request is executed, further requests will not be invoked at all since "second" has failing test.
I assume that there could be introduced "bail" metadata (which would allow to bail specific http regions) or env variable (which will allow to set default behavior for all requests).
Please consider adding this feature.
Metadata
Assignees
Labels
No labels