You can use the JUnitEE user interface to run your all your tests inside the Container. JUnitEE is a JUnit TestRunner that has been written as a servlet with the user interface in HTML format.
You cannot achieve all features of Cactus using JUnitEE as part of them depend on being executed on the client side. Executing JUnitEE from ANT commands will probably not be possible. Some benefits however of JUnitEE are:
junit.framework.TestCase
and from
org.apache.cactus.JspTestCase
will be located in the same place and only once.
junit.framework.TestCase
to test methods that do not
require the http objects such as the
HttpServletRequest
or
HttpServletResponse
objects.
junitee.jar
to your Container
classpath. Add also references to
junit.jar
,
httpunit.jar
cactus.jar
and
aspectjrt.jar
if you have not
already done that.
junitee.jar
in the same way as cactus.jar is added.
org.infohazard.servlet.TestServlet
that
comes with JUnitEE. Check JUnitEE documentation. TestServlet extends
junit.htmlui.TestServletBase
that executes
junit.htmlui.TestRunner
i.e. the JUnitEE interface.
/TestServlet?suite=fi.iki.kaila.MyTests&list=yes
"
<input type="text" name="suite" size=60 />
in
a form element that requests TestServlet
cactus.properties
file must be located so that your
container can find it e.g. in your containers classpath.