ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hilton, Chris" <>
Subject RE: Running JUnit in Weblogic server from Ant?
Date Fri, 08 Dec 2000 23:14:19 GMT
For the person who was looking to run JUnit within WebLogic, I recommend the
following article:

Things didn't seem quite as straightforward as the article showed, but I
eventually got it sorted out.  Personally, I wrote a Perl script to perform
the requisite HTTP request to run the tests, but that could easily be done
in java as well.

Hope that helps.

Chris Hilton

-----Original Message-----
From: Cyril Bouteille []
Sent: Tuesday, November 21, 2000 11:16 AM
Subject: Re: Running JUnit in Weblogic server from Ant?


> I have tests set up to run INSIDE the WebLogic server, since many of my
> objects require various services of the server.  Right now, the way I run
> JUnit tests is manually through a servlet which outputs the test results
> an HTML page while the server is running.
> Does anyone know if it's possible to run JUnit in the context of a running
> WebLogic server from Ant?  I'd love to build AND test at the same
> time...TIA.

To test your EJBs, you can write a jUnit test acting as a T3 client for
* Extend TestCase with a class A.
* Declare an instance-level EJB reference to your bean.
* Override the setup method to perform a lookup on your bean's home and
init the reference.
* Then, you can invoke biz methods on your EJB in each of you test
This can be integrated in Ant by calling A with the <java> task. Of
course you need to make this target dependent on <wlrun> :)

Hope it helps,

View raw message