Skip to content

Handle failures in BeforeAll hooks and AfterAll hooks#1857

Open
brasmusson wants to merge 1 commit intomainfrom
feature/global-hooks-fix
Open

Handle failures in BeforeAll hooks and AfterAll hooks#1857
brasmusson wants to merge 1 commit intomainfrom
feature/global-hooks-fix

Conversation

@brasmusson
Copy link
Copy Markdown
Contributor

Description

  • All BeforeAll hooks and AfterAll hooks shall be executed regardless of they pass or fail.
  • The TestCases shall only be executed if all BeforeAll hooks passes.
  • BeforeAll hooks shall be executed after the TestRunStarted event has fired.
  • AfterAll hooks shall be executed before the TestRunFinished event is fired.
  • Print the global hook failures shall be printed by the console formatters.
  • Aslo global hook failures shall affect the exit code.

With this change Cucumber-Ruby conforms fully with CCK v22

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds new behaviour)

Checklist:

Your PR is ready for review once the following checklist is
complete. You can also add some checks if you want to.

  • Tests have been added for any changes to behaviour of the code
  • New and existing tests are passing locally and on CI
  • bundle exec rubocop reports no offenses
  • RDoc comments have been updated
  • CHANGELOG.md has been updated

* All BeforeAll hooks and AfterAll hooks shall be executed regardless
  of they pass or fail.
* The TestCases shall only be executed if all BeforeAll hooks passes.
* BeforeAll hooks shall be executed after the TestRunStarted event
  has fired.
* AfterAll hooks shall be executed before the TestRunFinished event
  is fired.
* Print the global hook failures shall be printed by the console
  formatters.
* Aslo global hook failures shall affect the exit code.
Copy link
Copy Markdown
Contributor

@luke-hill luke-hill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once v11 is out I'll get to this. Might take me a week or two

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants