OK so my solution to this problem is as follows: - remove the call to 'countWebtestResults' from the main webtest.xml. - call that task after I'm finished doing everything with my build.
On Thu, Jun 5, 2008 at 6:01 PM, Kallin Nagelberg <[EMAIL PROTECTED]> wrote: > I'm working on integrating webtest into my cruise control build, and am > almost there! > > The ant I use to run webtests out of cruise control looks something like > this: > > <target name="run.webtests"> > <exec executable="bash"> <!-- Start up a server to run tests > against --> > <arg line="deploy.sh"/> > </exec> > > <ant antfile="build.xml" dir="client1/webtests" target="full" > inheritRefs="true"> > <property name="webtest.home" value="/home/cm/webtest"/> > <property name="hostname" value="localhost"/> > <property name="port" value="9001"/> > <property name="wt.headless" value="true"/> <!-- Prevents > manual processes like auto-open reports in browser etc. --> > </ant> > <ant antfile="build.xml" dir="client2/webtests" target="full" > inheritRefs="true"> > <property name="webtest.home" value="/home/cm/webtest"/> > <property name="hostname" value="localhost"/> > <property name="port" value="9001"/> > <property name="wt.headless" value="true"/> <!-- Prevents > manual processes like auto-open reports in browser etc. --> > </ant> > > <exec executable="bash"> <!-- Shut everything down --> > <arg line="../config/cleanup.sh"/> > </exec> > </target> > > > > It basically starts up an environment, runs two sets of tests, and then > shuts it down. > My problem is that as soon as the tests out of 'client1/webtests' fail > that's it for cruise control. It raises an exception, and client2 doesn't > get a chance to run, and even worse my cleanup script never runs. > > I realized I could set the 'wt.countWebtestResults.failIfFailedTest' > property of 'countWebTestResults' to false to stop this exception being > raised, but then I don't know if my test failed! > > I'm thinking about using the 'failureProperty', so that webtest will just > set a property that I could read later on from ant to determine what > happened, and then raise that to CC if need be. I'm not sure how I would > access that from the target I just described though. > > Any suggestions would be most welcome! >

