background image
<< Database verification point | Setting Up the Java Runtime Environment >>
<< Database verification point | Setting Up the Java Runtime Environment >>

Using the EJB Session Recorder

82
Chapter 3 - Testing Enterprise JavaBeans
Viewing and Verifying the SQL Query Results
When the custom SQL query has been successfully executed on the connected data
source, the query results are displayed in the Query Results table. The columns of the
table correspond to the columns that you included in the SQL query in the SELECT
clause.
After you finish creating the query for a scenario test, the script generator asks if you
want to create verification points for each additional message in the diagram. If you
choose to do so, create a database verification for the
deposit
message.
After you finish entering database verification points, the scenario test script is
generated. The values specified in the Query Builder are placed into a datapool, and
the generated code retrieves these datapool values, allowing the verification point to
be data driven.
A sample verification point is listed in the script as follows:
// A verification point may be automatically inserted below.
String svp1JDBCdriver = dp.value("svp1JDBCdriver").toString();
String svp1JDBCurl = dp.value("svp1JDBCurl").toString();
String svp1JDBCuser = dp.value("svp1JDBCuser").toString();
String svp1JDBCpassword = dp.value("svp1JDBCpassword").toString();
String svp1SQL = dp.value("svp1SQL").toString();
String svp1VPname = dp.value("svp1VPname").toString();
DatabaseVP vp1openCheckingAcctVP = new DatabaseVP("svp1VPname",
svp1SQL, svp1JDBCuser, svp1JDBCpassword, svp1JDBCdriver,
svp1JDBCurl);
vp1openCheckingAcctVP.performTest(null);
For more information about coding verification points, see the Rational Test Script
Services for Java
manual.
Using the EJB Session Recorder
The EJB Session Recorder is a tool that lets you visually connect to and interact with
EJBs. As you execute transactions against the component, interaction data is recorded
and stored in an external XML file. The XML file is then converted to a scenario test
script that can be used for testing the EJBs.
Before working with the EJB Session Recorder, see EJB Session Recorder Requirements
on page 34.