background image
<< Generating Stubs and Lookup Tables | Importing Test Assets into Your IDE >>
<< Generating Stubs and Lookup Tables | Importing Test Assets into Your IDE >>

Populating the Lookup Tables

Generating EJB Test Assets
57
The implementation class,
ManageAccountsBean.java
QualityArchitect also creates a lookup table for each method in the stub called by
the method-under-test. In this case, QualityArchitect creates two lookup tables
because
ExecuteTransaction.getBalance
, when called against a Savings
account, calls two methods in the
ManageAccounts
bean--
getSavingsBalance
and
getSavingsCustomerID
.
Note:
Lookup tables are based on Rational datapool technology. Whereas a
datapool is used to test inputs and expected behavior, a lookup table is used with
stubs to simulate the behavior of an actual component.
After generating the lookup tables, QualityArchitect asks you if you want to edit
the newly created lookup tables.
Populating the Lookup Tables
To populate the lookup tables:
1
When QualityArchitect asks if you want to edit the lookup tables that it created,
click
Yes
.
2
Select the lookup table to edit, for example,
ManageAccountBean_
getSavingsBalance_L
, and click
Edit
to display the
Datapool Properties dialog box.
3
In the Datapool Properties dialog box, click Edit Datapool Data and populate the
lookup table with several rows of data, for example:
4
Click
Save
and then
Close
when you are finished.
5
Click
OK
to close the Datapool Properties dialog box.
6
Repeat Step 2, through Step 5 for the
getSavingsCustomerID
method.
7
Click
Close
to close the Manage Datapools dialog box.
At this point, you should be finished creating your tests assets, and you can start
setting up your development environment in order to run the tests.
AccountID
expectedReturn
expectedException
Generated ID 1
incorrect AccountNo
java.rmi.RemoteException