-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cucumber 3.0.0.pre1 - running before hooks multiple times #1098
Comments
Thanks for reporting, @westlakem, I'll have a chance to look into this tomorrow. If you'd be interested in making a pull request we'd be happy to help you put something together - otherwise if we're able to repro we'll fix it but can't guarantee a timeline. |
The unit of execution in Cucumber is what is internally is called a Test Case, and it includes all hooks (before, after, after-step, and around hooks). The semantics of the |
@brasmusson The problem is the --retry flag is running the hooks multiple times in the same test execution. See example execution stack below. Before hook runs |
@westlakem Oh, I misinterpret the issue description. We do not want that. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
My Before hook runs twice after a failed scenario with the --retry flag
Expected Behavior
The before hook should only run once
Steps to recreate
Create a test suite with a "fail" in the step. In the before hook, open a new Watir::Browser. You will see that 2 browsers get opened after the first "fail")
The text was updated successfully, but these errors were encountered: