Cactus

Last update : September 25 2001

About
  • What is Cactus ?
  • Features/Status
  • Goals
  • News/Changes
  • Roadmap/Todo
  • Contributors
  • Contributing
  • License
  • Feedback


  • Downloads
  • Downloads


  • Documentation
  • How it works ?
  • Getting Started
  • Mock vs Container
  • API Reference


  • Howto Guides
  • Config Howto
  • TestCase Howto
  • Ant Howto
  • HttpUnit Howto
  • Sample Howto
  • EJB Howto
  • IDE Howto


  • Support
  • Bug database
  • Mailing list
  • FAQ


  • Misc.
  • Why the name ?
  • Resources


  • Developers
  • CVS
  • Coding Conventions


  • Project description

    Cactus is a simple test framework for unit testing server-side java code (Servlets, EJBs, Tag Libs, Filters, ...).

    The intent of Cactus is to lower the cost of writing tests for server-side code. It uses JUnit and extends it.

    Cactus has been developed with the idea of automatic testing in mind and it provides a packaged and simple mechanism based on Ant to automate server-side testing.

    Cactus implements an in-container strategy (click on the diagram below to undestand how it works). An alternative but complementary approach not covered by Cactus is to use Mock Objects (see the Mock vs Container page to understand the differences and why Cactus believes in the usefulness of an in-container approach).

    How it works ...


    Different kind of unit tests

    There are several kinds of unit testing frameworks. We categorize them in 3 types :

    1. Type 1 : code logic unit testing. Probably the best strategy for these tests is to use a Mock Objects type framework.
    2. Type 2 : integration unit testing. Cactus is typically in this category (I'll let you judge if it is the best or not :)). These tests will exercise the interactions with the container.
    3. Type 3 : functional unit testing. These unit tests will let you test the returned values from your server code. This is for example HttpUnit .

    Ideally you would use 3 different frameworks just to unit test your code ! Then you have to think about acceptance testing, system integration testing, ...

    Cactus was developed to fit Type 2 but also to be a very good compromise for Type 1 and 3, with the idea that it is much easier to have to write tests for a single framework than for several ! Moreover, you can never fully test your code. We believe Cactus provides a middle ground that provides a high confidence that your code will run when deployed. However, it is your choice and you can use Cactus only for Type 2 if you wish.


    Getting Started

    To get started, read the Getting Started guide.




    Copyright © 2000-2001 The Apache Software Foundation. All Rights Reserved.