Most of the speed you see is MSTests, which starts the ASP.NET development server every time you want to run at least one test.
I save as much of my application as possible in different libraries outside of my ASP.NET application so that they can be tested independently. This avoids the bumps you take when starting the ASP.NET development server during unit testing.
When the controllers taunt, I see no reason why you could not remove the attributes that tell the testing system to start the development server. After all, is it not the goal to taunt the βexternalβ components?
Similarly, the whole purpose of using repositories for your models is that you can introduce mocking objects for testing. These tests are also not needed by the development server.
As for the views, I would not write unit tests for them. Keep them as thin as possible and check them manually by visual inspection.
A different set of tests may be included for your models and controllers that include the ASP.NET development server. These tests will be part of your integration test suite.
source share