Question

When one creates a new ASP.NET MVC project in visual studio, the New Project Wizard provides the option to create a unit test project at the same time. Typically, the only choice offered is MSTest, but I want to use MSpec. MVC is supposed to be pluggable, including for unit test frameworks, so I'd really like to be able to choose 'MSpec' from that wizard and have my MSpec project created alongside the MVC project.

Is anyone aware of an MSpec integration that's been done that lets users get going with MSpec right from the New Project Wizard?

Was it helpful?

Solution

There's no integration for the new project wizard as of today.

Creating a MSpec test project ist easy, so I would argue that there's no real benefit in having a new option in the project wizard:

  1. Download MSpec from the TeamCity server at CodeBetter
  2. Extract the zip file to your project's lib or tools folder
  3. Create a new class library and reference Machine.Specifications.dll
  4. Write specs
  5. Run tests with ReSharper or TestDriven.Net (or use the console runner, but that's not really preferred)

OTHER TIPS

I don't know if it's been done already for MSpec, but below you'll find the instructions on how to get an MSpec option into the drop down.

How to: Add a Custom ASP.NET MVC Test Framework in Visual Studio

HTHs,
Charles

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top