JaVa
   

Summary

This chapter examined the importance of in-container integration testing and the role the Cactus framework plays in implementing it. Cactus enables extreme coding on the J2EE platform by providing tests with access to the inner workings of a J2EE container. By doing so, Cactus allows and encourages scores of unit tests that might not otherwise have been written. The test cases it enables are often those that most need to be run—tests of code that intertwines with container services. Also, because it allows access to the real thing rather than mock objects or the stub framework, you can gain valuable insight into your container as well as into your app.

With Cactus, when you feel tempted to grouse about the app server, you can write a quick test case to prove yourself wrong (or right!). Personally, we couldn't live without Cactus—unit tests of server-side code should be easy to write, and Cactus makes that a reality.


JaVa
   
Comments