Testing enterprise applications poses many challenges:
Enterprise applications usually depend on resources such as databases, which will need to be considered in any testing strategy.
Testing web applications can be difficult. They don’t expose simple Java interfaces that we can test, and unit testing is complicated by the dependence of web tier components on a web container.
Testing distributed applications is difficult. It may require numerous machines and may be hard to simulate some causes of failure.
J2EE components – especially EJBs – are heavily dependent on server infrastructure.
A J2EE application may involve many architectural layers.
We must test that each layer works correctly, as well as perform acceptance testing of the application as a whole.