BOF: Java EE Testing from the Trenches

Abstract

It is a known fact that unit testing is a powerful aid in the software development process. But when the application is divided in layers, the http://www.javapolis.com/confluence/pages/editpage.action?pageId=26215#development of the unit tests can be as challenging as the software development itself. Some of the challenges are:

  • testing of many distinct components (like Façades, DAOs, Web Actions, and Helper Classes)
  • in isolation, but reusing testing data;
  • integration with external entities, such as databases, containers, and frameworks, which require non-POJO testing;
  • running the tests on both the IDE and building process.

    At VoxBlue, we have developed a 3-tier JavaEE application and
    unit-tested most of its components, using open-source tools like:
  • DbUnit to test the Hibernate-based Persistence layer;
  • StrutsTestCase to test the Struts-based Web layer;
  • HttpUnit for integration testing;
  • EasyMock to provide mock objects;
  • Eclipse, HSQLDB and Jetty as productivity boosters;
  • Apache Maven 2 as the building orchestrator;
  • Spring for dependency injection;

In this BOF, we describe how we incorporated these tools in our development process, which challenges and limitations we have found, and how we addressed (or not) them.

This BOF will be followed by a Whiteboard when the speaker and the audience can discuss other TTTT (Testing Tips, Tools and Techniques}

Host(s)

bof

Adaptavist Theme Builder Powered by Atlassian Confluence