Li, I've looked at your scripts and they look fine (although there is no need to sleep with the runservertests task - which is why it is better than the parallel/sequential stuff).
Indeed, it appears that start_jrun is not called by runservertests ... The only case when it would not be called is if the testURL URL succeeds in connecting to a server. The rationale behing this is : if the server is already started, runservertests will not start it again nor will it stop it after the tests have run. This is to allow the use of dynamic reloading of containers and thus shorten the time to test. Prior to starting the Ant, can you verify with a browser that connection to http://localhost/asp fails (404 error) ? Something I don't understand : you said earlier that if you removed "startTarget=xxx" then stop_jrun was executed... I don't understand this as internally the code is : // Verify that a test URL has been specified if (this.testURL == null) { throw new BuildException("A testURL attribute must be specified"); } // Verify that a start target has been specified if (this.startTarget == null) { throw new BuildException("A startTarget Ant target name must " + "be specified"); } which means Ant will report an error if you start to run the runservertests without a startTarget attribute. Something wrong here... -Vincent > -----Original Message----- > From: Zhang, Li [mailto:[EMAIL PROTECTED]] > Sent: 01 February 2002 23:29 > To: 'Cactus Users List' > Subject: RE: Cannot use "runservertest" in an Ant build.xml to start JRun > 3.1 > > > > Hi, Vincent and other cactus/Ant gurus: > > I have attached the ant build files and ant console output here. The > bad-build.xml uses runservertests and generated bad-output.txt. The > good-build.xml uses Ant tasks to start/stop JRun and generated > good-output.txt. > > Thank you. > > Li > > -----Original Message----- > From: Vincent Massol [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 01, 2002 12:25 PM > To: 'Cactus Users List' > Subject: RE: Cannot use "runservertest" in an Ant build.xml to start > JRun 3.1 > > > Li, > > Have you had a look at the example build files in the sample/build > directory of the cactus distribution. They may help you. > > Are you sure the testURL is valid (can you manually start JRun and use a > browser to connect to http://localhost/myapp ? > > Can you send us your build.xml file and the ant console output ? > > Thanks > -Vincent > > P.S.: testTarget="tests" but the target you define below is "test" > > > -----Original Message----- > > From: Zhang, Li [mailto:[EMAIL PROTECTED]] > > Sent: 30 January 2002 17:46 > > To: 'Cactus Users List' > > Subject: Cannot use "runservertest" in an Ant build.xml to start JRun > 3.1 > > > > Have anyone experienced problem to start the application server with > > "runservertests" cactus ant task? > > > > I first define the task useing "taskdef" and map "runservertests" to > > org.apache.cactus.ant.RunServerTestsTask; then I define a task which > calls > > the "runservertests" as follows: > > > > <target name="tests_jrun"> > > <runservertests testURL="http://localhost/myapp" > > startTarget="start_jrun" > > stopTarget="stop_jrun" testTarget="tests"/> > > </target> > > > > <target name="start_jrun"> > > ... > > </target> > > <target name="stop_jrun"> > > ... > > </target> > > <target name="test"> > > ... > > </target> > > > > It looks like Ant ignores the "startTarget" attribute of the cactus > ant > > customized task because jRun is never started. If I remove > > "startTarget="start_jrun" then Ant does invoke the "stop_jrun" target. > But > > if I run "ant start_jrun", this time jRun will start as expected > (which > > means there's no problem with my "start_jrun" target). > > > > Any ideas? > > > > I'm using Ant 1.4 + cactus 1.2 + JRun 3.1 on Windows 2000. > > > > BTW: If I use "parallel","sequential","junit","java" tasks in the > > "tests_jrun" target, I have no problem to start JRun, run tests, and > stop > > JRun. > > > > Thanks. > > > > Li > > > > -- > > To unsubscribe, e-mail: <mailto:cactus-user- > > [EMAIL PROTECTED]> > > For additional commands, e-mail: <mailto:cactus-user- > > [EMAIL PROTECTED]> > > > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
