background image
<< TOC - Introduction | TOC - Generating EJB Test Assets >>
<< TOC - Introduction | TOC - Generating EJB Test Assets >>

TOC - Testing Enterprise JavaBeans

vi
Editing Message Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
How Message Signatures Correlate to Datapool Fields . . . . . . . . . . . . . . . . . . . . . . . 16
Message Signature Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Stubs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
Templates for Stub Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
EJB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
COM/VB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Test Script Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Datapools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Datapools in Scenario Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Datapools in Unit Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
Verification Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
How Data Is Verified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Static, Dynamic, and Manual Verification Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Database Verification Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
The Query Builder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
Extensibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3
Testing Enterprise JavaBeans . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
EJB TestScripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Packages Imported Into EJB Test Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Documentation Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Requirements for EJB Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
Supported JDKs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Application Server Classpath Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Classpath Requirements for the Sun J2EE Reference Server . . . . . . . . . . . . . . . . . . 32
Classpath Requirements for WebLogic 5.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Classpath Requirements for WebLogic 6.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Classpath Requirements for Remote WebSphere 3.5 . . . . . . . . . . . . . . . . . . . . . . . . 33
Rational Test Script Playback Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
EJB Session Recorder Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Modifying the Additional Classpath Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Rational TestManager Playback Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 35
Visual Age/WebSphere Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Visual Cafe/WebLogic Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Adding WebLogic to the Global Classpath in Visual Café. . . . . . . . . . . . . . . . . . . . . . 37
The Rational Bank Account Sample Application . . . . . . . . . . . . . . . . . . . . . .38
Setting Up the Sample Application for VAJ/WebSphere. . . . . . . . . . . . . . . . . . . 39
Importing the Sample into VAJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39