background image
<< TOC - Generating EJB Test Assets | TOC - Template Replacement Variables >>
<< TOC - Generating EJB Test Assets | TOC - Template Replacement Variables >>

TOC - Testing COM Components

viii
Connecting to the Database via JDBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
JDBC Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
JDBC URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74
User Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75
Password. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Designing a Custom Query Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Using the Query Design Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Viewing and Verifying the SQL Query Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Using the EJB Session Recorder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82
Setting Up the Java Runtime Environment (JRE) . . . . . . . . . . . . . . . . . . . . .83
Starting the EJB Session Recorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84
Starting the EJB Session Recorder from the Console . . . . . . . . . . . . . . . . . . . . 84
Starting the EJB Session Recorder from Visual Cafe . . . . . . . . . . . . . . . . . . . . 84
Passing in Command Line Parameters (optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Starting the EJB Session Recorder from Visual Age for Java . . . . . . . . . . . . . . 85
Creating a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Importing JavaHelp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Importing Xerces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Importing the Remaining Jar Files from the QualityArchitect Directory . . . . . . . . . . . 87
Importing rttssjava.jar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Importing Deployed EJBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Checking the Classpath and Launching the EJB Session Recorder . . . . . . . . . . . . . 87
Passing in Command Line Parameters (optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Using the EJB Session Recorder with the Sample Application . . . . . . . . . . . . . 88
Starting a Recording Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Connecting to an EJB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89
Interacting with the Home Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Interacting with the Remote Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Inserting a Verification Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Viewing the XML Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Generating a Test Script from the XML Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
4
Testing COM Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99
Testing Existing Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Testing with Iterative Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Programming in Visual Basic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Requirements for Testing COM Components . . . . . . . . . . . . . . . . . . . . . . .101
Working with the Sample Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
Understanding the Component View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Understanding the Logical View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102