-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Reqnroll Version
2.2.1
Which test runner are you using?
NUnit
Test Runner Version Number
3.14.0
.NET Implementation
.NET 8.0
Test Execution Method
Visual Studio Test Explorer
Content of reqnroll.json configuration file
No response
Issue Description
I have found weird behavior when inheriting from Driver class marked with [Binding] attribute and contains [BeforeScenario] and [AfterScenario] functions. If this situation occurs then Hooks are executed twice, which in my opinion is confusing and shouldn't happen.
I have prepared simple example on my github to demonstrate:
https://github.com/gucu112/ReqnrollBits/blob/master/BindingAttributeInheritance/StepDefinitions/CalculatorStepDefinitions.cs
When I ran the test I get this output:

My first impression is that this behavior exists due to inheritance flag on [Bindings] attribute set to true (by default). However, I did not look through the code, so I am not really sure why it works like this.
Steps to Reproduce
Run the test in the project