I've recently started on an existing project that uses SpecFlow.
I've added a method with [BeforeScenario]
in BaseSteps.cs
that does some logging. BaseSteps.cs
doesn't have a [Binding]
attribute on its class, but the derived classes do have [Binding]
.
However, an example.feature
can use steps from differentDerivedSteps.cs
classes. In these case the [BeforeScenario]
is being called multiple times in a single scenario from that feature.
Why is this happening? What is calling the BeforeScenario multiple times for a single scenario?