Discussions

News: Container Driven Testing Part III: Advanced Testing Techniques

  1. In this article, N. Alex Rupp covers advanced EJB testing practices, goes over some pitfalls and how to avoid them, identifies OpenEJB's glass jaw, and outlines a future course for the EJB testing community. Some of the topics covered include configuring multiple EJB containers, isolating component subsets, mock object techniques with real components, and more.

    Read Container Driven Testing: Advanced EJB Testing with OpenEJB - Part 3: Advanced Testing Techniques
  2. CDT for EJB3.0?[ Go to top ]

    Will Container Driven Testing be of any use in EJB3.0? I think in EJB3.0 I can test my ejb just like another java object.

    -Kirupa
  3. CDT for EJB3.0?[ Go to top ]

    Will Container Driven Testing be of any use in EJB3.0? I think in EJB3.0 I can test my ejb just like another java object.-Kirupa
    Anything that references the EJB 3 API including EntityManager, SessionContext, UserTransaction and others will still need container support to run or test. Throw in attributes with deployment descriptors overriding those attributes and you have a little too much to mock up.

    As CDT tools like JunitEE, Cactus, and OpenEJB will always exist and several people will have applications that mix EJB 2 with EJB 3, the need and applicability of CDT tools won't go away.
  4. Yes, you are right, the out of container test approach leads to short build-test-cycles, because no container deployment is necessary anymore. I used Ejb3Unit, to automate our entity and session bean testing outside the container for the EJB 3.0 specification. Ejb3Unit is a JUnit extention and can execute automated standalone Junit tests for all EJB 3.0 conform JEE projects. You will find it here: http://ejb3unit.sourceforge.net/
  5. the link to OpenEJB container driven testing plugin [ http://www.openejb.org/cdt yields ] a 404
  6. Yeah, sorry about that. We'll have to get some status up on that page. This isn't ready for public consumption quite yet. We're working on it and we'll keep you posted ;)

    --
    Alex