Skip to content

Stop testcase execution on failure in beforeEach #577

@FrankyBoy

Description

@FrankyBoy

I think it would be very useful to stop execution of a testcase if the beforeEach fails (i.e. throws an exception or similar).

Example: precondition is used for login -> if the login does not succeed, it does not make any sense to run the actual test.

I already tried to expect() something in the beforeEach (or in a function that it calls, to be more exact), and throwing an exception. The first did not work at all for my purposes (as other steps in the beforeEach were still executed), the 2nd at least registers as an error but the execution still continues.

Or maybe something like an option to stop executing the testcase as soon as one expectation fails could work, but I didn't find any such option.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions