15 Presentation-layer testing

This chapter covers

  • Developing HtmlUnit tests
  • Developing Selenium tests
  • Comparing HtmlUnit and Selenium

If debugging is the process of removing software bugs, then programming must be the process of putting them in.

--Edsger Dijkstra

Simply stated, presentation-layer testing involves finding bugs in the graphical user interface (GUI) of an application. Finding errors here is as important as finding errors in other application tiers. A bad user experience can lose a customer or discourage a web surfer from visiting your site again. Furthermore, bugs in the user interface can cause other parts of the application to malfunction.

Due to its nature and user interaction, GUI testing presents unique challenges and requires ...

Get JUnit in Action, 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.