Topics

 

Introduction

To top of page

This guideline describes some additional considerations that need to be taken into account when unit testing J2EE components.

 

Setting Up the Test Environment

To top of page

Ordinary Java classes can be compiled and tested without creating a J2EE Module. However, J2EE components, such as EJBs and servlets, rely on services provided by the container, and must be assembled and deployed to a container in order to be tested.

Thus, the implementer of J2EE components must assemble the components into J2EE Module(s) and possibly a J2EE Application, and then deploy those archives to a unit testing environment prior to unit testing.

For more information on J2EE Modules, see Guidelines: J2EE Module. For more information on assembling J2EE Modules, see Guidelines: Assembling J2EE Modules.

For more information on J2EE Applications, see Guidelines: J2EE Application. For more information on assembling J2EE Applications, see Guidelines: Assembling J2EE Applications.

For more information on deploying J2EE Applications, see Guidelines: Deploying J2EE Modules and Applications.

 

General J2EE Testing Guidelines

To top of page

In addition to testing the functionality provided by the source code, for EJBs, JSPs, and Servlets, the container itself provides functionality that needs to be tested, such as persistence, transactions, and security.



Rational Unified Process  

2003.06.13