Yes, it’s this is another “hey this is a cool feature of Visual Studio 2012” post. If you know all about the new Test Explorer and how to get NUnit, xUnit and by association SpecFlow to work with it - you can stop reading here. For me it took awhile to get up and running.
I don’t remember where I first read about it but I remember that I was happy to read that Visual Studio 2012 comes with a new Test Explorer. What’s really cool about it is that it’s no longer limited to just MsTest tests, but can run NUnit, xUnit … you name it.
This means that my SpecFlow tests can be run from the new Test Explorer as well. You know, all SpecFlow actually does is translating the Gherkin lines you write into unit tests of your framework of choice. It should just work.
So they said…
Imagine my disappointment when the test explorer just reported “No unit tests found in solution” over and over again.
So after awhile I picked up that you (of course!) need to install adapters for the unit test frameworks you want to have the Test explorer to pick up.
That’s quite easy. You go to Tools -> Extensions and Updates and search the Visual Studio Gallery (you’ll find it under the Online-tab in the dialog) for NUnit, xUnit or whatever framework your using. What you are looking for are Test adapters for Visual Studio 2012. Like these: