O'Reilly logo

JUnit Recipes: Practical Methods for Programmer Testing by J B Rainsberger, Scott Stirling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Testing web components

This chapter covers

  • Testing HTTP session data
  • Testing static and dynamic web pages
  • Testing JSP components
  • Testing servlet code
  • Testing dynamic data before it is displayed
  • Using ServletUnit to simulate the web container

In this chapter we provide recipes for testing web components in isolation, rather than testing the web application as a whole. We divided the chapters this way because we use different technologies and approaches to test a web application than we do to test its components—the servlets, JSPs, Velocity templates, and what have you that make up the application. In short, we test web applications from end to end using HtmlUnit, something described in detail in chapter 13, “Testing J2EE Applications,” ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required