Testing Java EE 6 Applications: Tools and Techniques

Reza Rahman
This session outlines tools and techniques for effectively testing Java EE APIs like JSF 2, Servlet 3, CDI, EJB 3.1, JPA 2, JAX-WS and JAX-RS. Java EE 6 includes a number of new features that enhance testability like generic dependency injection, CDI @Alternative, portable extensions, embedded containers and JSF project stages.
Using these features and tools like JUnit, JSFUnit, HttpUnit, DbUnit, Selenium, soapUI, Arquillian and HSQLDB it is possible to perform unit, integration, system and functional testing for Java EE 6 APIs at all layers of the application. In addition to discussing tools and features, the session will also demonstrate testing techniques like designing for testability, mock objects, isolation, test configuration and test data.
Summary:
Testing has always been an important part of server-side Java development. However testing is a pain-point that has not been addressed well by Java EE standardization. Java EE 6 changes that by adding a number of features geared towards more effective testing such as powerful generic dependency injection via CDI, CDI @Alternative, CDI portable extensions, embedded containers and JSF project stages.
This session outlines how these changes enable robust testing across the Java EE 6 API stack via a number of new and established tools and techniques. The following is an outline of the session:
• Overview of Java EE 6
• Overview of testing (unit, integration, system, functional, load)
• Coverage of how each Java EE 6 API can be tested, including:
o Testing Servlet 3 using JUnit and HttpUnit
o Testing JSF 2 through JSFUnit and Selenium using project stages
o Testing EJB 3.1 and CDI through JUnit and Arquillian/ShrinkWrap using CDI dependency injection, CDI @Alternative, portable extensions, embedded containers and XML deployment descriptor overrides
o Testing JPA 2 using JUnit, DbUnit and HSQLDB/Java DB
o Testing JAX-WS and JAX-RS via JUnit, SOAP/REST client APIs and soapUI
• Example driven discussion of testing technique like designing for testability, mock objects, isolation, test configuration and test data
This session is intended for Java server side developers, architects and managers. A moderate understanding of testing and Java EE is assumed.








