2011/08/05 - Jakarta Cactus has been retired.

For more information, please explore the Attic.

Starting Cactus tests

The Cactus tests are started using a JUnit Test Runner. There are several integration clients you can use for executing these test runners:

  • Manually. This means that you need to deploy your code and tests into your container and start this container by yourself. Then you can execute the tests by running a standard JUnit test Runner. For example, you can start the tests:
    • From the java command line, calling the main() method of a JUnit Test Runner. For example, running the JUnit Swing Test Runner: junit.swingui.TestRunner.main [test case class]
    • From an IDE or any tool providing a JUnit integration plugin.
    • From a browser, by using the Cactus Servlet Test Runner, which is a special JUnit Test Runner. Please also check the Tomcat quick start tutorial which is a step by step tutorial describing how to deploy Cactus tests in Tomcat and how to execute them through a browser.
    • From Ant by simply using the <junit> Ant task found in the Ant distribution.
  • Using the Cactus Ant integration. Cactus provides several custom Ant task to automate the deployment of Cactus tests (<cactifywar>) and the start/stop/configuration of your container (<cactus>). Note that you can also use the custom <runservertests> Ant task which allows you to use your existing container configuration should you wish to.
  • Using the Cactus Maven plugin. As with the Ant tasks this plugin offers a fully automated solution to deploy and execute Cactus tests.