In-Container Testing Using Cactus, JUnit, StrutsTestCase, and Ant

This section is based on the file that’s included on the CD-ROM that accompanies this book. Later sections of this chapter use different archives.

It turns out that every one of the test cases run in the previous section on mock object testing works fine as a mock object test. This is actually good because mock object tests are easier and more convenient to run than in-container tests. Mock object tests are easier because for in-container testing you need a container available for testing, at a minimum. Plus, you must get the code deployed and loaded in the container in order to test it. Many times this involves deploying the application and restarting the container ...

Get Struts Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.