You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Vitaly Yurik <vy...@bea.com> on 2003/06/11 00:23:33 UTC

Running cactus test from ant

Hi all,
I have the following problem.
My test suites are running fine from my browser with a URL like this:
http://localhost:7001/testactions/ServletTestRunner?suite=actions.console.TestConsoleActions 

I am trying to run similar tests from ant. If I specify runservertest :
<runservertests
testURL="http://localhost:7001/testactions/ServletTestRunner"
startTarget="test.actions.deploy"
stopTarget="test.actions.undeploy"
testTarget="current.test"/>
<target name="current.test">
<junit printsummary="yes" haltonfailure="yes" haltonerror="yes" fork="yes" >
<test name="actions.console.TestConsoleActions"/>
<formatter type="xml"/>
<classpath refid="testactions.class.path"/>
</junit>
In this case after having a message:"Deployment completed on Server 
myserver", my ant target hang forever.
On the other hand: if I change testURL to
testURL="http://localhost:${test.port}/testactions/ServletRedirector?Cactus_Service=RUN_TEST"
then I got the following error:
current.test:
[junit] Running actions.console.TestConsoleActions
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.431 sec
BUILD FAILED
file:C:/p4server/dev/src_console/build-newconsole.xml:225: Test 
actions.console.TestConsoleActions failed
I couldn't find in Cactus docs the right way to set up testURL and <test 
name=.../>
How do you set up those things?
Regards,
Vitaly Yurik