In SpecFlow the test runner is just glue
February 10, 2011
I answered a question on Twitter today from a guy who had problems running SpecFlow scenarios with MSTest. That shouldn’t be I thought to myself – in SpecFlow the test runner is only used for the auto-generated stuff (#2 in this pictures) and shouldn’t affect the code you write. Lets try it.
The default test runner is NUnit so first I simply create a new Specs-project and created the following scenario:
![]()
I then Nuget’d SpecFlow, Should and NUnit with these commands:
Install-Package SpecFlow Install-Package NUnit Install-Package ShouldFluent And sure enough – when I compile some NUnit code is auto generated for me:
![]()
Just for good manners I implemented the steps and ran the specification. It worked with these (naïve) steps in place:
![]()
If I now change...