You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jim Doyle <ji...@gis.net> on 2001/05/08 13:51:04 UTC

Custom WLUnit task

Hi,
    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.  This allows
you to do testing against a server as part of a single Ant build, rather
than having to trigger multiple Ant builds from a shell script.

    It's consistent with the syntax and behavior of the optional junit,
wlrun, and wlstop tasks, and I've written a doc page as well.  There's a
jar file containing the source distribution attached to this email.
Note that it re-uses the junit task, so the jakarta optional.jar file is
necessary.  Also, it uses JDK 1.3 APIs (collections).

    I'd been following the discussion on parallelism and multithreading
features in Ant 2, and was thinking about what my ideal Ant file would
look like, and it occurred to me that I didn't really care if the
WebLogic stuff was in its own task - the JUnit tests are the significant
part from the build point of view - so it would be fine if there were
just one task taking care of both the server and the tests.

    Does this fit what other Ant users need as well?  Do the hardcore
Ant folks on this list think this is a nice, Ant-esque way to approach
this, or is it counter to the spirit of Ant?

    Looking forward to your feedback,
Jim Doyle
jimdoyle@gis.net



Re: Custom WLUnit task

Posted by Vincent Massol <vm...@octo.com>.
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/sampl
e/build/servlet22/build-tests.xml?rev=1.2&content-type=text/vnd.viewcvs-mark
up

and

http://jakarta.apache.org/cvsweb/index.cgi/jakarta-commons/cactus/conf/sampl
e/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/or
g/apache/commons/cactus/ant/

Have a look and tell me what you think !
Thanks
Vincent Massol.

----- Original Message -----
From: "Jim Doyle" <ji...@gis.net>
To: <an...@jakarta.apache.org>
Sent: Tuesday, May 08, 2001 12:51 PM
Subject: Custom WLUnit task


> Hi,
>     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.  This allows
> you to do testing against a server as part of a single Ant build, rather
> than having to trigger multiple Ant builds from a shell script.
>
>     It's consistent with the syntax and behavior of the optional junit,
> wlrun, and wlstop tasks, and I've written a doc page as well.  There's a
> jar file containing the source distribution attached to this email.
> Note that it re-uses the junit task, so the jakarta optional.jar file is
> necessary.  Also, it uses JDK 1.3 APIs (collections).
>
>     I'd been following the discussion on parallelism and multithreading
> features in Ant 2, and was thinking about what my ideal Ant file would
> look like, and it occurred to me that I didn't really care if the
> WebLogic stuff was in its own task - the JUnit tests are the significant
> part from the build point of view - so it would be fine if there were
> just one task taking care of both the server and the tests.
>
>     Does this fit what other Ant users need as well?  Do the hardcore
> Ant folks on this list think this is a nice, Ant-esque way to approach
> this, or is it counter to the spirit of Ant?
>
>     Looking forward to your feedback,
> Jim Doyle
> jimdoyle@gis.net
>
>
>