users@glassfish.java.net

Re: Re: EJB Unit Testing

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Mon, 16 Apr 2007 18:48:25 +0200

Hello again,
Jason, below is my quick response for your email, at home I will read
your blog and see what is this all about :)

Meanwhile... what do you mean saying:
> I used to test in the container, but it took forever for the container
> to start, which made testing slow and painful.

I am creating EJB3 <-> Swing application, so every time I change
anything in client or EJB, I have to redeploy application (simply F6
in Netbeans) which takes about 30sec to redeploy and launch
application (client in ACC).
So, after I add/change something I have, for example, to open form and
invoke some action to see if it is working or not. When I change
entities, I have to recreate database as well, so it takes additional
time to prepare some data using GUI or manually using SQL.

That would be great if I could redeploy application and invoke some
tests, these tests would be responsible for providing some data if
necessary, like:
create person,company and loan and test how does loan schedule look
like, test a case, where customer is paying installment, check if
capital and interest were generated properly... etc...

Now I have to try all these actions using mouse and keyboard :(
Very often, when I or someone else from the team, change something, it
affects other parts of system, and for few days we don't know that
some functionality is broken, but we know it was working few days
before.
With such a tests I could deploy application once, invoke all the
tests, wait few minutes and when everything is OK I am much more sure
my system is not broken than I know this now.