ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyril Bouteille <>
Subject Re: Running JUnit in Weblogic server from Ant?
Date Tue, 21 Nov 2000 17:15:41 GMT

> 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 my
> JUnit tests is manually through a servlet which outputs the test results to
> 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