A test class instance is created for each step - adamralph/xbehave.net GitHub Wiki

This issue affects 1.x versions only. It does not affect versions 2.x and above.

In xBehave version 1.x, an instance of the test class (if it is not static) is created once before the scenario is executed and all the steps are executed in the context of that instance.

The xUnit.net runner also creates an instance of the test class before each step is executed. These per-step instances are not used for anything and are superfluous.

However, if the construction of your test class induces static side effects, you may experience issues. The recommendation is to use Backgrounds to create common contexts for your scenarios instead of test class constructors (see https://github.com/xbehave/xbehave.net/issues/187).

Thanks to George Hemmings for spotting this issue.