ASP.NET MVC NUnit

Free

Adds a project and an item template to generate NUnit based tests of ASP.NET MVC 3 applications. NUnit as NuGet package is included.

(7) Review
Visual Studio
2010
Download (8,206)
9/2/2011
0.4
View
E-mail Twitter del.icio.us Digg Facebook
Add To Favorites
Description
Reviews (7)
Q and A (1)
Sign in to Write a Review
Sort By:

by Manuel Wenk | April 13 2012

Pretty cool Tool! I'm using it daily...

by thnk2wn | April 13 2012

Nice. Do you plan on updating this or doing another one to support ASP.NET MVC 4?

by Dzmuh | January 12 2012

Thanks!

by secretGeek | July 01 2011

by Jay R. Wren | June 22 2011

This is a must have for anyone doing ASP.NET MVC.

by Phil.Wheeler | May 31 2011

This extension finally makes getting NUnit test templates into your MVC3 applications easy; something which has always been a major point of pain for developers.

There's nothing particularly elaborate that happens here, the extension is simple and effective. Your NUnit project is not created with the latest production release of the NUnit framework (at time of writing, the latest version is 2.5.10 where the template installs with 2.5.9) but this is forgiveable and one would assume that regular updates would correct this issue periodically, although perhaps more attention could be paid to the NUnit release cycle.

Project classes and references are all named correctly and the suite of AccountController classes are thorough and correct.

Overall, this makes life infinitely easier for plugging NUnit test templates into your MVC3 projects.

by Monomachus | April 16 2011

Nice job, I'm glad there is someone like you to make this possible.

Sign in to Start a Discussion


  • AccountController does not contain a definition for FormsService on new project
    5 Posts | Last Post March 15, 2012
    • I'm getting the below error on brand new box.  I've update VS sp1 and april '11 tools update.  There is no FormsService off the AccountController.  Any idea what's going on?
      
      thx,Dan 
      
      'MvcApplication4.Controllers.AccountController' does not contain a definition for 'FormsService' and no extension method 'FormsService' accepting a first argument of type 'MvcApplication4.Controllers.AccountController' could be found (are you missing a using directive or an assembly reference?)	c:\users\danieleli\documents\temp\MvcApplication4\MvcApplication4.Tests\Controllers\AccountControllerTest.cs	128	71	MvcApplication4.Tests
      
    • Hey, I am getting the same problem. The Accounts controller does not contain either FormsService or MembershipService as I believe it should based on other code I've seen for MVC3. The test utility method GetAccountController() tries to create a Account Controller with these variables, but they don't exist so the whole thing fails and none of the tests can be used.
      
      I'm woundering if the Accounts controller code in the template is from a differenct version of MVC or something strange like that?
    • Just as an update I think there may have been changes to the Account Controller for security reasons (Open Redirect Attack).
      
      http://weblogs.asp.net/jgalloway/archive/2011/01/25/preventing-open-redirection-attacks-in-asp-net-mvc.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+jongalloway+%28Jon+Galloway%29
      
      You can also see progress on development here: 
      http://blog.kimpenhaus.de/asp.net-mvc-nunit-test-template-on-visual-studio-gallery
    • He guys,
      this problem is due to Tools Update for ASP.NET MVC 3 as they changed the default project template and its controller classes. This will be fixed in vNext coming up shortly. Temporary solution could be deleting the faulted tests (as they are only a template).
      
      Thanks for pointing out the problem.
      m.
    • After downloading the file ASP.NET MVC Nunit.vsix from your site, I click on it to install and I get error message "This extension is not installable on any currently installed products"  I have VWD Express 2010 sp1 and MVC3 and Windows 7 Pro. I want to be able to create NUnit test projects. I wasn't able to do it in VWD 2008 Express, i was hoping it would work in 2010 Express. Please help