[EMAIL PROTECTED] wrote:

Thanks for your reply. Now I understand what and how the MDB's need to be
unit tested.

But, I would like to "integrate test" to ensure all the components MDB1,
session ejb and MDB2 combined together works fine.  This will give me the
confidence that the functional unit  works together fine.

Well, actually, I think it duplicates the effort, and it costs you more in terms of effort, but that's a conclusion you're best reaching on your own. <opinion>If you test each component in isolation /and/ have end-to-end tests (your functional tests), then there is little need for integration tests.</opinion>


<snip />
Does my problem come under functional unit testing? If so, does/will the
cactus framework help do the "functional test" consisting of several server
components put together.

If there are no suggested approach to"integrate test", I would like to use
Thread.sleep() till the MDB1, session ejb and MDB2 completes and then test
the records created. It also tests that all the components completes within
the stipulated time, which also works fine for me. Do you see any problems
with this?

I think you should test however makes you most comfortable for now, with exposure to some alternatives. I tend to test everything in isolation as much as possible. Not everyone likes that. I do it because it minimizes my dependence on the outside world (containers), keeps my tests lightning fast and allows me to execute them dozens of times per day. Not everyone needs or wants that.


The test you want to write is complicated, and prone to failing even when nothing under your control is wrong (such as a mis-configured test container or garbage collection happening at the wrong moment). If that doesn't bother you, then push forward; but I think you'd benefit from trying both.

Good luck.
--
J. B. Rainsberger,
Diaspar Software Services
http://www.diasparsoftware.com :: +1 416 791-8603
Let's write software that people understand

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to