ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Doyle <jdo...@iso-ne.com>
Subject Re: Custom WLUnit task
Date Wed, 09 May 2001 14:10:59 GMT
Hi Vincent,
  I'm glad other people have tried to address this in a way other than
writing shell scripts.  I started an ant-user thread ("Running junit
tests that access EJBs") about unit-testing servers, but I didn't hear
anything about the Ant tasks written for Cactus.

  The Cactus "runservertests" task looks more flexible in that it can
refer back to arbitrary Ant tasks for starting, stopping, and testing. 
I also like that it tests the URL to decide whether the server is up yet
(my thought was to filter the server output for "Weblogic Server
started", but I haven't gotten to that).  The "wlunit" task I wrote is
obviously more ad hoc, just focusing on JUnit and WebLogic.  But it is
simpler in that the task itself creates and waits for the server
process, rather than launching other threads.  This might be a more
reliable approach, since it insures that the server process really
ended.

  I don't know which is more Ant-like: a task that re-uses other Ant
tasks, or a task that encapsulates the setup and interaction with other
processes.

  Are the Ant extensions for Cactus available separately as a
sub-project?  I can always download Cactus, or just fetch individual
sources from the web, but it would be nice if there's a package I could
download and try out.

  Anyway, thanks for the tip!

Jim Doyle

> Hey Jim,
> You implemented the same tasks as I did in the Cactus project, it seems ...
> !
> Have a look at :
> 
> http://jakarta.apache.org/cvsweb/index.cgi/jakarta-commons/cactus/conf/sample/build/servlet22/build-tests.xml?rev=1.2&content-type=text/vnd.viewcvs-markup
> 
> and
> 
> http://jakarta.apache.org/cvsweb/index.cgi/jakarta-commons/cactus/conf/sample/build/build.xml?rev=1.1&content-type=text/vnd.viewcvs-markup
> 
> The source code for the tasks are in :
> http://jakarta.apache.org/cvsweb/index.cgi/jakarta-commons/cactus/src/ant/org/apache/commons/cactus/ant/
> 
> Have a look and tell me what you think !
> Thanks
> Vincent Massol.
> 
> >     I've been working on automating EJB testing in our nightly build,
> > and I've come up with something that a few Ant users might find useful.
> > It's a task that starts a WebLogic 5.1 server, runs a suite of JUnit
> > tests against the server, and then shuts down the server.
> > [snip]
> > Jim Doyle

Mime
View raw message