4
votes

ASP.NET Web API allows for in-memory integration tests where the application-under-test and the test fixture are both in the same app domain. This makes it simple for the test fixture to modify IOC container bindings to have various objects faked during the integration test.

In contrast, ASP.NET MVC was not designed to allow in-memory integration tests. Steve Sanderson devised his MVC Integration Test Framework to provide this capability. However, it appears that framework causes the MVC application to be running within an appdomain that is separate from the test fixture.

Has anyone devised a way to have the test-fixture be in control of IOC container bindings, and still affect the target application despite the fact that it is in a separate app domain?

1
Side note: sample of type of test you trying to do would make your question better. Not everyone have the same definition of "integration test".Alexei Levenkov

1 Answers

0
votes

If I understand your words, I Have only one idea. You should completely fake your context of MVC app. Then you can test everything you want. I don't have idea how to test it under separate app domain.