If you want to quickly get a feeling of Cactus, there is a 20 minutes tutorial that take you through running your first Cactus test using Tomcat. It doesn't explain how Cactus works or any other details but let's you have something running quickly.
We suggest you take this quicky tutorial and then come back here and continue reading below. You would have had a first glimpse of Cactus in action and will be ready to understand the concepts behind it and its full power.
There is not really an installation of Cactus per see, as Cactus is not an application but a framework. However you do need to understand how it integrates in your working environment. In order to simplify this integration Cactus offers several integration modules. Thus, installing Cactus simply means picking an integration module and learning how to configure and use it.
In order to run Cactus tests you need to have the following software already installed on your system:
[cactus root]
directory.
You'll find the following directories under [cactus root]
:
doc/
: contains Cactus web site and
API javadocs.
lib/
: contains Cactus jars and related
external libraries.
samples/
: contains
sample applications
showing how to write Cactus tests and how to automate their
execution.
samples/ejb
: contains a sample
application showing how to test EJBs with Cactus.
samples/jetty
: contains a sample
application showing how to test Servlet with Cactus and Jetty
(using the JettyTestSetup
extension).
samples/servlet
: contains a sample
application showing how to test Servlet/JSPs/Taglibs with Cactus.
web/
: contains the JSP redirector file
which is only required if you're using the
manual integration.
cactus.jar
: the main jar,
contains the framework classes. You can find this jar in
[cactus root]/lib
.
cactus-ant.jar
: a jar which
contains some custom Ant tasks to help integrate easily with Ant.
This is only needed if you wish to use Ant for automating the
execution of Cactus tests. For more information on how to integrate
Cactus with Ant, see the
Ant Howto tutorial. You also
find this jar in [cactus root]/lib
.
httpclient.jar
: Cactus is relying
on the Jakarta Commons HttpClient framework for Cookie handling.
junit.jar
: Cactus extends JUnit and
thus needs the JUnit jar.
aspectjrt.jar
: Cactus uses
AspectJ for performing
several tasks (logging entries and exit of methods, checking
configuration, etc).
commons-logging.jar
: Cactus uses
the Jakarta Commons Logging facade framework to provide seamless
Cactus logging using any existing Logging framework (Log4j,
LogKit, JDK 1.4 Logging, etc). It is also needed for Commons
HttpClient.
servletapi.jar
: Required for compiling
the Servlet sample. Ideally we should be bundling the J2EE jar (which
is required for compiling the EJB sample). However the Sun license
does not allow us to redistribute it so you'll need to download it
by yourself (see the Sample howto
page.
httpunit.jar
: Cactus uses the
HttpUnit framework to perform complex
assertions of returned responses. Cactus also bundles a default
web response object but the HttpUnit one should be preffered for
complex assertions.
nekohtml.jar
: Required by HttpUnit.