Selecting Template
Generating EJB Test Assets
53
Select
weblogic_remote.template
and click
Open
if you are working in a
WebLogic environment.
Select
sunj2ee_remote.template
and click
Open
if you are working in a Sun J2EE
environment.
QualityArchitect defaults to the last template chosen, so in the future you can skip
this step if you plan to use the same template. For more information about
templates, see Templates on page 7.
5
In Rose, right-click the
getBalance
method again and click
QualityArchitect >
Generate Unit Test.
A message appears, indicating that code generation is in progress, after which you
will be prompted to log in to a Rational project.
6
Log in to the project and click
OK
.
Each project contains a datastore for storing test assets, such as datapools, lookup
tables, and log files.
If this is the first time you have generated a script for a particular datastore, you
will be prompted to select a directory in which to store your scripts.
QualityArchitect maintains an association between the test script directory that
you have chosen and the test assets that are stored in the project's test datastore.
As a result of this association, you can execute your test scripts directly from
TestManager.
7
Select a directory location and click
OK
.
QualityArchitect creates a directory hierarchy under the location you have chosen
and saves the test script. The test script itself is assigned a name of the format
InterfacenameMethodname.
Thus, a script generated to test
getBalance
in the
ExecuteTransaction
interface would be named
ExecuteTransactiongetBalance.java
.