[GH-ISSUE #5069] [feature]: Support early exit of test script #1929

Open
opened 2026-03-16 22:24:59 +03:00 by kerem · 0 comments
Owner

Originally created by @wonson on GitHub (May 13, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5069

Is there an existing issue for this?

  • I have searched the existing issues

Summary

Basic abort:
return;
throw pwAbortScript(); throw pwAbortCollection(3);``throw pwAbortTest;

Advance abort:
pw.expect(..).toBe(..) and pw.test(...) returns bool
so that we can do
if (pw.test(...) != true) { throw pwAbortScript(); }

Why should this be worked on?

While checking the response code / result is not as expected,
I don't need the further checking or setting env below

Better it can also abort at different levels (this script only, the collection, 2 level collections, whole test set) as well

Originally created by @wonson on GitHub (May 13, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5069 ### Is there an existing issue for this? - [x] I have searched the existing issues ### Summary Basic abort: `return;` `throw pwAbortScript();` `throw pwAbortCollection(3);``throw pwAbortTest;` Advance abort: `pw.expect(..).toBe(..)` and `pw.test(...)` returns bool so that we can do `if (pw.test(...) != true) { throw pwAbortScript(); }` ### Why should this be worked on? While checking the response code / result is not as expected, I don't need the further checking or setting env below Better it can also abort at different levels (this script only, the collection, 2 level collections, whole test set) as well
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1929
No description provided.