Testing enterprise beans in the universal test client
The workbench provides you with a Web-based Universal Test Client where you can test your enterprise beans and Java™ classes.
Restriction
- You can test enterprise beans at 2.1 (or earlier) specification-level in the Universal Test Client running on a WebSphere® Application Server v6.0, v6.1 or v7.0. However, you can only test EJB 3.0 beans in the Universal Test Client running on a WAS v7.0. The Universal Test Client does not support testing EJB 3.0 beans on a WAS v6.1 with Feature Pack for EJB 3.0.
Prerequisites
- Create an EJB project and add it to a new EAR project
- Create or import an enterprise bean into your EJB project.
- Generate deployment code for your enterprise bean at 2.1 (or earlier) specification-level. This step is not needed for EJB 3.0 modules. To do this right-click on the Deployment Descriptor of the EJB project and select
Prepare for Deployment.
To use the Universal Test Client:
- Create a WAS.
- Add the EJB project to the server.
- To ensure that the server is enabled to use the Universal Test Client:
- In the Servers view, double-click the WAS. Select the
Overview tab and expand the Server section.
- Enable the
Enable universal test client check box.
- Close the editor and save your changes.
- Start the server.
- You can open the Universal Test Client in the Web Browser in any of the following ways:
- In the Project Explorer view, select your EJB Project you want to test and right-click on an enterprise bean resource or an independent or stand-alone Java class. Select
Run As > Run on Server.
- In the Servers view, right-click the server and select
Universal Test Client | Run
- Use the Universal Test Client to perform one or more of the following tasks:
- Finding an enterprise bean or class
- Calling a method
- Removing an enterprise bean or class
- Viewing fields
- Filtering the methods displayed
- Editing the JNDI property settings
- You can start over a Universal Test Client session by going into the Servers view, right-click the server and select
Universal Test Client | Restart.
- When you have finished using the Universal Test Client, close it.
Related concepts
Related tasks
Related reference
Universal Test Client namespace limitations on WebSphere® Application Server