background image
<< TOC - Testing Enterprise JavaBeans | TOC - Testing COM Components >>
<< TOC - Testing Enterprise JavaBeans | TOC - Testing COM Components >>

TOC - Generating EJB Test Assets

vii
Creating the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Configuring VAJ to Use the New Sample Database . . . . . . . . . . . . . . . . . . . . . . . . . 41
Adding EJB Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Deploying the Sample Application in the VAJ Test Environment . . . . . . . . . . . . . . . . 42
Importing the Required JAR Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Deploying the Sample Application to a WebLogic Application Server . . . . . . . . 45
Deploying the Sample Application to WebLogic 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . 45
Deploying the Sample Application to WebLogic 6.1 . . . . . . . . . . . . . . . . . . . . . . . . . 47
Deploying the Sample Application to the Sun J2EE Reference Server . . . . . . . 48
Configuring Visual Cafe to Run the Sample Application . . . . . . . . . . . . . . . . . . 49
Adding Account Information to the Rational Bank Account Sample . . . . . . . . . 50
Reverse Engineering a Deployed EJB into Rose . . . . . . . . . . . . . . . . . . . . . .50
Generating EJB Test Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Generating EJB Test Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Generating EJB Unit Test Scripts and Datapools from a Rose Model . . . . . . . . . . . . 52
Populating the Datapool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Generating Test Scripts with the EJB Session Recorder . . . . . . . . . . . . . . . . . . . . . . 56
Generating Stubs and Lookup Tables for the Unit Test . . . . . . . . . . . . . . . . . . . 56
Populating the Lookup Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Importing Test Assets into Your IDE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
Importing Test Assets into VAJ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Importing Test Assets into Visual Cafe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Deploying Stubs to a WebLogic Application Server . . . . . . . . . . . . . . . . . . . .59
Deploying Stubs Permanently to a WebLogic Server . . . . . . . . . . . . . . . . . . . . 60
Deploying Stubs to a Running WebLogic Server (Hot Deployment) . . . . . . . . . 61
The wl_deploy Build Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Building and Hot Deploying the Sample Application and Stubs. . . . . . . . . . . . . . . . . 62
Undeploying the Sample Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Deploying Your Own Stubs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Deploying Stubs to the Sun J2EE Reference Server . . . . . . . . . . . . . . . . . . .65
Executing Test Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67
Editing Host Name and Port Number Variables . . . . . . . . . . . . . . . . . . . . . . . . . 67
For WebLogic and Sun J2EE Application Servers. . . . . . . . . . . . . . . . . . . . . . . . . . . 67
For WebSphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Executing Test Scripts from VAJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Executing Test Scripts from Visual Cafe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Executing Test Scripts from TestManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Using EJB Scenario Tests to Test Transactions . . . . . . . . . . . . . . . . . . . . . . .70
Using the Java Query Builder to Add Database Verification Points . . . . . . . .72