You are previewing JUnit in Action, Second Edition.

JUnit in Action, Second Edition

Cover of JUnit in Action, Second Edition by Petar Tahchiev... Published by Manning Publications
O'Reilly logo

Chapter 14. Server-side Java testing with Cactus

Good design at good times. Make it run, make it run right.

Kent Beck, Test Driven Development: By Example

This chapter covers

  • Drawbacks of mock objects
  • Testing inside the container with Cactus
  • How Cactus works
  • Integrating Cactus with other projects, including Ant and Maven

In the second part of the book we explained what mock objects are and how to benefit from using them. We also described different techniques for unit testing your server-side code, and we even compared these techniques against each other. The one thing that you should be aware of now is that there is no absolute truth—the best techniques to use depend on the situation you’re currently in. For example, in most cases you ...

The best content for your career. Discover unlimited learning on demand for around $1/day.