background image
<< Deploying Stubs to the Sun J2EE Server | Executing Test Scripts >>
<< Deploying Stubs to the Sun J2EE Server | Executing Test Scripts >>

Using the deployment tool

66
Chapter 3 - Testing Enterprise JavaBeans
6
Using the deployment tool, click
File > Open Application
. For example, to open the
Rational Bank Account sample application, select
<RQA
Home>\Samples\ejb\bankacct\j2ee\ratlbankacctee.ear
.
7
Add the Rational support class library files to the EAR file.
a
In the Local Applications pane, click on the
RationalBankAccount
package.
b
On the General Tab, click
Add Library JAR
.
c
Navigate to
<RQA Home>
, select
Rational_ct.jar,
and click
Add Library JAR.
d
Navigate to
<Rational Test Home>,
select
rttssjava.jar,
and click
Add Library JAR.
e
Navigate to
<Rational Test Home>\tsea,
select
rttseajava.jar,
and click
Add Library
JAR.
8
Expand the
BankAcctEJBJar
folder and select the folder that matches the EJBs you
will be replacing with the stub code. You should see the classes associated with
that EJB in the list box.
9
Remove the EJB classes that you will be replacing with the stub code. Normally
there are three classes for each generated stub: the Home Interface class, the
Remote Interface class, and the Implementation class.
In the Contents list box of the General tab, select the existing bean classes to be
removed--
RationalBankAcct\ManageAccountsBeans.class
,
RationalBankAcct\ManageAccountsHome.class
, and
RationalBankAcct\ManageAccounts.class
, and click
Delete
button.
10
Once all of the classes are removed, add the stubbed classes to the currently
selected EJB.
a
On the General tab, click the
Add
button in the Contents list box.
b
Using the Browse button, navigate to the directory that contains the stubs, for
example
C:\RatlBankAcct\RatlBankAcct
, select the stubs--for example,
ManageAccounts.class, ManageAccountsBean.class, and
ManageAccountsHome-- and click
Choose Root Directory.
c
Choose the directory name where the class files exist, click
Add
,
and then click
OK
.
11
In the Local Applications pane, click on the
RationalBankAccount
package.
12
Change Application Display Name to a new name, such as
RatlBankAcctEE_stubbed
, click
Save > As,
and assign a new file name.