Search code examples
asp.net-mvcunit-testingintegration-testingasp.net-mvc-3

MvcIntegrationTestFramework or an alternative updated for ASP.NET MVC 3


I'm interested in using Steve Sanderson’s MvcIntegrationTestFramework or a very similar alternative with ASP.NET MVC 3 Beta.

Currently when compiling MvcIntegrationTestFramework against MVC 3 Beta I get the following error due to changes in MVC:

Error 6 'System.Web.Mvc.ActionDescriptor.GetFilters()' is obsolete: '"Please call System.Web.Mvc.FilterProviders.Providers.GetFilters() now."' \MvcIntegrationTestFramework\Interception\InterceptionFilterActionDescriptor.cs Line 18

Questions

  1. Can anybody provide the MvcIntegrationTestFramework working for ASP.NET MVC 3 Beta?

--- and / or ---

  1. Are there similar alternatives you would recommend?

EDIT #1: Note I have e-mailed Steve the creator of MvcIntegrationTestFramework, also hoping for some feedback there.

EDIT #2 & #3: I have received a message from Steve. Quoted for your reference:
I haven't needed to use that project with MVC 3, so sorry, I don't have an updated version of it. As far as I'm aware it should be possible to update it to work on MVC 3, but you'd need to figure that out perhaps by inspecting the MVC 3 source code to notice any changes in how actions, filters, etc are invoked now. If you do update it, and if you decide to adopt it as an ongoing project (e.g., putting it on Github or similar), let me know and I'll post a link to it! (Thanks Steve!)

EDIT #4: Honestly had a quick stab at using System.Web.Mvc.FilterProviders.Providers.GetFilters() didn't get anywhere fast and simply adding the [Obsolete] found that there was an error in the internals of the MVC requests. Anybody else had a dabble?

EDIT #5: Please comment if you are using an alternative Integration Test Framework with MVC 3.


Solution

  • Have a look at my fork:

    https://github.com/JonCanning/MvcIntegrationTestFramework/