Generating Unit Test Scripts
Chapter 3 - Testing Enterprise JavaBeans
Generating EJB Unit Test Scripts and Datapools from a Rose
To try out the QualityArchitect unit test generation feature, you can use the sample
model that is included with the Rational Bank Account Sample Application. For
example, try generating a unit test for the
method, which is part of the
remote interface named
. This method is used to obtain the
current balance from the specified account.
method calls three methods from the
bean. The three methods are
. All of these methods take noncomplex objects as
To generate the unit test:
If you haven't already done so, create a project with the Administrator for
maintaining your test assets.
For details, see Adding a Project in the Administrator Help.
Start Rose and open the
In Rose, right-click the
method and click
QualityArchitect > Select
Unit Test Template
Do one of the following:
if you are working in a