This chapter covers
Unit-testing a JSP in isolation with Cactus and mock objects
Running Cactus JSP tests with Maven
Unit-testing taglibs with Cactus
Unit-testing taglibs with mock objects and MockMaker
A test that can’t be repeated is worthless.
In this chapter, we’ll continue with the Administration application we introduced in chapter 9. In chapter 9, we focused on unit-testing the servlet component of the application. In this chapter, we concentrate on the view components—namely the JavaServer Pages (JSPs) and custom tag libraries (taglibs).
We’ll cover unit-testing JSPs and taglibs with both Cactus and mock objects. The two techniques are complementary. Mock objects excel at writing focused, ...