There are two fundamental attributes developers look for in a given technology to ease their development tasks: extensive functionality and code reusability.
Look at the success of the Unix operating system. A fundamental part of its success is that it can be written in a machine-independent language and ported to multiple hardware platforms. Thus it provides robust functionality that can be reused on multiple platforms. However, despite the extensive similarity between most of the popular Unix flavors, there's no guarantee that an application written for one Unix platform will be portable to another without making significant changes to the application's code. Thus, it falls short as far as code reuse is concerned.
A key design goal for the Java platform from its inception was to address this code portability issue. The "Write Once, Run Anywhere" mission of Java is paramount to its success. A developer no longer needs to code to a specific-hardware platform; rather, the code is interpreted and run in a virtual machine that shields the developer from the underlying hardware and operating system.
The Java 2, Enterprise Edition (J2EE) platform extends this portability to a set of enterprise components that run in a J2EE server. A developer coding to these APIs now not only has the assurance that the code will run on any platform supporting a JVM, but that the components will be portable across any container supporting the J2EE APIs.
Plus, J2EE component developers can get further assurance that this is true through the J2EE Compatibility Test Suite (CTS). The CTS was created to ascertain the portability of developers' enterprise components by testing whether an application server meets each individual requirement set forth in the J2EE specifications.
This article presents the types of tests addressed by the J2EE CTS, the future of the CTS, and further explores the benefits as well as the limitations of the CTS for the J2EE developer.
The CTS
The J2EE CTS includes the tests and tools necessary to ensure that a J2EE-based application server works as established in the J2EE specifications. It consists of several thousand tests that explore whether all the required APIs are present, the necessary services are provided, and the contracts between the required components work as expressed in the specifications. Once the CTS is successfully completed by a given vendor, that vendor's application server is considered J2EE-compatible and receives the J2EE brand. Being J2EE- compatible implies that an application server meets the requirements that guarantee the stability of a J2EE application component in any J2EE environment.
The CTS tools consist of a GUI console for executing and monitoring the tests (see Figure 2) and an associated testing harness. The testing harness consists of a portability component that allows a vendor to plug in a set of classes that govern the deployment and removal of the test applications. In addition, the harness defers to vendor-specific classes for the creation of URLs that access the Web-tier components of a test. Finally, vendor-supplied porting kit classes govern JNDI lookups of deployed test application components.






