users@glassfish.java.net

RE: Re: EJB Unit Testing

From: Jason Lee <lee_at_iecokc.com>
Date: Mon, 16 Apr 2007 09:06:26 -0500

For what it's worth, here's the approach I use:

http://blogs.steeplesoft.com/2007/03/27/unit-testing-ejbs/

I used to test in the container, but it took forever for the container
to start, which made testing slow and painful. It also posed issues for
us on our continous integration server, as we could only test one
EJB-based application at a time due to contention for the ports by the
multiple EJB containers. The approach I outlined in my blog, while
still needing some polish, allows us to run tests for several projects
simultaneously (as is common in a CI environment), and we avoid the
30-45 second penalty every time we kick off the tests.

-----
Jason Lee, SCJP
Senior Software Engineer
http://www.iec-okc.com
 

> -----Original Message-----
> From: Witold Szczerba [mailto:pljosh.mail_at_gmail.com]
> Sent: Sunday, April 15, 2007 1:20 PM
> To: users_at_glassfish.dev.java.net
> Subject: Re: EJB Unit Testing
>
> Hi there,
> I was wondering - what would be wrong in testing EJBs inside
> container?
> For example, I would like to deploy my application and then
> run some tests (using separate testing database and other
> necessary resources), would be that possible?
>
> If that is possible and reasonable, how can I make it so?
>
>
> 2007/4/7, glassfish_at_javadesktop.org <glassfish_at_javadesktop.org>:
> > You could use ejb3unit which is a junit extention for out
> of container testing (EJB3):
> > http://ejb3unit.sourceforge.net/
> >
> > In this moment it supports entity bean tests, session bean
> tests and mocked session bean tests.
> > [Message sent by forum member 'fbauschulte' (fbauschulte)]
> >
> > http://forums.java.net/jive/thread.jspa?messageID=211468
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>