EJB testing tools & techniques for unit & functional tests


EJB programming & troubleshooting: EJB testing tools & techniques for unit & functional tests

  1. Hello everybody,

    Would like to discuss with you about what are the tools and techniques to do testing in the J2EE world.

    Since these are distributed applications, I'm thinking about testing all the layers involved which are : data, business logic (ejbs) and presentation (struts/jsp). Am I right to want that?

    For the presentation part, there's all the tools like Empirix E-Tester, Mercury QuickTest Pro, and plenty of others. These tools are mostly functional but only at the user interface level.

    What if we would like to test our EJB without going through the ui? I know there's Cactus framework to unit tests, but what about functional tests for ejbs? Could we do functional test with Cactus? Bean-Test from Empirix is not offered anymore... what other choices or alternatives?

    Also, would be interesting to make these tests to run automatically, for example, from an ANT script... this kind of idea might be used?

    Also, what do you do to load your database data before running some test cases? Do you have any tools that could build all the database schema with some sample data? What would you recommend?

    What are other tests that we might need other than code coverage, profiling?

    Is there some articles that cover all the tests adapted to J2EE applications?

    Your advices or shared experience would be very appreciated.

    Thank you!

  2. Hi,
        As u would like to test EJB without going through the ui......u can use JUNIT and unit test your code. For IDE like websphere studio application developer(WSAD) the plugin can be added and tests can be performed on the Bean class.
    Test case generator generates the test case for the bean class u would like to test. So one can easily configure JUnit and test EJB's.