[ajug-members] Out-of-container testing approaches for EJB 3

Barry Hawkins barry at alltc.com
Tue Jan 9 10:17:56 EST 2007


Colleagues,
    Hello!  I have a question for all of you who are using EJB 3; what
approaches to unit/integration/functional testing are folks using?  I
spend way more time in the Spring/Hibernate area for business and
persistence, but have recently begun working with clients using an
EJB3/Hibernate stack.  It seems there are several frameworks and
approaches for testing your EJB3 components, and I am wondering if any
of them have emerged as a defacto standard.
    Since EJB3 dictates Java 5 or greater, TestNG is an option in
addition to JUnit-based approaches.  I must say that framework looks
pretty appealing.  Here's what I have seen for EJB 3 unit testing:

JUnitEE (http://www.junitee.org/)
MockEJB (http://dev2dev.bea.com/pub/a/2005/10/mock_ejbs.html)
Cactus (http://jakarta.apache.org/cactus/writing/howto_ejb.html)
TestNG (http://blog.hibernate.org/cgi-bin/blosxom.cgi/2005/11/24)

    So, what are people doing?  Is the absence of an evident default
approach an indicator that EJB-based solutions still remain largely
untested?  Admittedly I don't follow EJB 3 closely, but I would still
expect 15 to 20 minutes of Google legwork to turn up more than I have
found.  It's so foreign to me to not have a stack that is steeped in
testing and automation; hopefully I'm just not finding evidence of it yet.

Regards,
-- 
Barry Hawkins
All Things Computed
site: http://www.alltc.com
weblog: http://www.yepthatsme.com

Registered Linux User #368650




More information about the ajug-members mailing list