On the bases of feedback and issues, a lot of SpecFlow users seem to try to put step definitions and other binding codes to base classes. I’ll try to explain why inheritance doesn’t fit to the concept of global step definitions used by SpecFlow.
We were always told to clean up after ourselves when we were children, this is also what I teach to my daughters. Probably due to this, when writing the first integration tests that inserts data to a database, devs cleanup (or reset) the database after the test has been executed (with an [AfterScenario] SpecFlow hook, for example). In reality, however, it is much more practical to do the cleanup before the scenario execution.
I can still remember my very first customer [read more…]