Chapter 7. Unit Testing the Web Tier

"If you don't like unit testing your product, most likely your customers won't like to test it either."

—Anonymous

Enterprise applications follow the N-tier architecture model to handle numerous nonfunctional concerns such as upgradability, scalability, and maintainability. The best design approach is to decouple the tiers from each other; this allows scaling out a tier without affecting another tier, or refactoring code in one tier without affecting the other tiers. Usually, any web application contains three tiers: presentation, business logic, and a database tier. This chapter deals with unit testing the web tier or presentation layer. The next chapters cover the application and database layers.

The following ...

Get Mastering Unit Testing Using Mockito and JUnit 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.