Testing Web Applications

Modern web applications separate user experience markup from the code that responds to requests and serves views to the user. This separation makes web code much more testable (as opposed to code files mixed with markup and server-side code). As an example, the ASP.NET Model-View-Controller (MVC) and web application programming interface (API) models use controllers as C# classes to respond to Hypertext Transfer Protocol (HTTP) requests and return results. This structure makes writing unit tests against controller classes a straightforward process.

There are times, however, when you need to write tests against actual pages running on the web server. Visual Studio supports this scenario, too, allowing you to write tests ...

Get Microsoft Visual Studio 2015 Unleashed, Third Edition 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.