cucumber / cucumber/cucumber-ruby
Rerun formatter: the message based version miss failures in around hooks
- Dominant language
- Ruby
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 3
Description
### 👓 What did you see?
For Around hook there are no TestStepStarted or TestStepFinished events fired. If an Around hook fails it is only detected from the result in the TestCaseFinished event. The result of the TestCaseFinished event are frequently used by formatters in Cucumber-Ruby, so the event based formatters do detect and report failures in Around hook.
In case of messages there is only result data in the TestStepFinished message and not in the TestCaseFinished message. Therefore, when the rerun formatter was changes to use messages instead of event, it no longer detect failures in Around hooks.
Using the message based version of the rerun formatter, a failure in an Around hook could look like:
Summary output:
```
1 scenario (1 failed)
4 steps (4 passed)
```
Content for rerun file is empty
### ✅ What did you expect to see?
Using the event based version of the rerun formatter, a failure in an Around hook could look like:
Summary output:
```
1 scenario (1 failed)
4 steps (4 passed)
```
Content for rerun file:
```division.feature:6```
### 📦 Which tool/library version are you using?
_No response_
### 🔬 How could we reproduce it?
_No response_
### 📚 Any additional context?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.