Chapter 17. Automated Testing

Throughout this book , we’ve promoted architectural patterns and application development practices such as the Model-View-Controller pattern, separation of concerns, SOLID, and others, stating that they make the components in your application more reusable and maintainable, resulting in a higher-quality application. The problem with these techniques is that they focus on long-term benefits whose value is not always apparent in the short term. For instance, why does it matter that a component is extensible, if it never gets extended in the first iteration of an application?

The true value of these techniques really starts to become clear in the later stages of an application’s life, when it has been released and developers must be able to fix outstanding issues and add new features while reducing the risk of introducing new breaking changes to the working, released application.

However, these techniques can also provide value in the short term. Luckily, there is one way to take advantage of that value and help guarantee the ongoing quality of your application at the same time: by testing your components with automated testing techniques.

This chapter discusses what it takes to test your application, using various tools and techniques to write and exercise your code effectively and verify that it does what it was designed to do. We’ll also explore how to apply these concepts to your entire codebase, with an emphasis on testing ASP.NET MVC applications all ...

Get Programming ASP.NET MVC 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.