Pedro,
Thank you for your reply. I should have mentioned that I do not want the build
to fail within the same target that the tests are run. After my
"run.server.tests" has been run, there's another target invoked that undeploys
the cactified application. If I fail the build after the tests are run, this
undeploy target is never invoked and the application remains on the server.
The simple solution, of course, is to have all the tasks done within the same
target (i.e. within your "run" target, have the undeploy task written right
before where appears). This just seems contrary to how I think cactus
and ANT should be working together. Namely, properties that are set in
runservertest's "testtarget" should persist throughout the rest of the build.
Thanks again for your time.
Keith
Quoting Pedro Nevado <[EMAIL PROTECTED]>:
> Hi there,
>
> This works for me. I hope it helps.
> Pedro
>
>
>
> haltonfailure="false" fork="${junit.fork}"
> errorproperty="test.failed" failureproperty="test.failed">
>
>
>
> //.
>
>
> includes="**/*Test.class"/>
>
>
>
>
>
>
>
>
>
>
>
> -Mensaje original-
> De: Keith Collison [mailto:[EMAIL PROTECTED]
> Enviado el: viernes, 01 de julio de 2005 22:30
> Para: cactus-user@jakarta.apache.org
> Asunto: Problem using runservertests & failureproperty
>
>
> Hello,
>
> In my current environment, I manually create a "cactified" war file and
> use runservertests to execute the tests. Everything happens as
> expected, with one important hitch -- my "failureproperty" is not
> getting set as expected.
>
> Here are my two relevant targets:
>
>
>testurl="${cactus.test.url}"
>starttarget="start.tomcat"
>stoptarget="stop.cactus"
>testtarget="test.server"
>/>
>
>
> description="Runs junit on test cases.">
>
>
>
> haltonerror="false"
>haltonfailure="false"
>failureproperty="test.failed"
>>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Note the echo tasks I have. When I run the tests and there are test
> failures, my output is:
>
> [echo] within test.server target, test failed=[true]
> [echo] within run.server.tests, test failed=[${test.failed}]
>
> Obviously the failure property is not being permanently set by the
> test.server target Am I misunderstanding how this is supposed to work?
> Are there other ways of accomplishing the same goal (without use of the
> task)?
>
> Thank you in advance.
>
> Keith
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]