Chapter 20. Full system testing
This chapter covers
ASP.NET MVC ushered in a new level of testability for.NET web applications. Although testing a controller action is valuable, the controller action itself is only one piece of ASP.NET MVC’s request pipeline. Various extension points can be used, such as action filters, model binders, custom routes, action invokers, controller factories, and so on. Views can also contain complex rendering logic, unavailable in a normal controller action unit test. With all of these moving pieces, you need some sort of user interface (UI) testing to ensure that an application works in production as expected.
The normal course of action is to design a set of manual tests in the form of test scripts and hope that the QA team executes them correctly. Often, the execution of these tests is outsourced, increasing the cost of testing because of the increased burden on communication. Testing is manual because of the perceived cost of automation as well as experience with brittle UI tests. But this doesn’t need to be the case. With the features in ASP.NET MVC, you can design maintainable, automated UI tests.