Java™ scripts
are generated when you work with the simplified scripts. You can switch
to Java scripting using the
Insert Java snippet and Insert Java module features in the simplified
script editor.
Before you begin
Advanced users can opt to work solely with Java scripting. Use the recording feature of IBM® IBM Rational Functional Testerto record actions on the
test applications. The actions on the test applications are generated
in the form of a Java test script
when you stop recording.
Prerequisites:
- Disable the Simplified Scripting feature on the IBM Rational Functional Tester Preferences page.
- The test application and the required environments must be configured
for functional testing.
- A functional test project has been created.
About this task
To record a Java test
script:
Note: All functional testing scripts use a default
helper superclass. You can create your own helper superclass if you
want to add additional methods or override the methods in RationalTestScript.
For more information, see Changing the Default
Script Helper Superclass.
To record a script:
Procedure
- Click Record a Functional Test Script(
).
- In the Record
a Functional Test Script dialog box, select the project for
the script to be a part of, and then type a name for the script.
Note: Script names cannot contain spaces or the following characters: $
\ / : & * ? " < > | # % -
- Optional: Select Add the script
to Source Control to place the script to be under source
control. The script is added to ClearCase® but remains checked out so that
you can modify it.
- Click Next.
- Optional: In the Select Script Assets page,
modify the test object map and test datapool if you do not want to
use the default settings.
- Click Finish to start recording. The Recording Monitor opens and the recording
starts.
- In the Recording Monitor toolbar,
click
to start your test application.
- Perform test actions in the application.
- Optional: You can record verification points
or data-drive your test script using the tools available in the Recording
Monitor toolbar while recording the script.
- Optional: To insert statements to call another
script, specify log information, timer or comments during recording,
use the Insert Script Support Commands feature
available in the Recording Monitor toolbar.
- Close your application, if you want closing the application
to be part of the script.
- Click Stop recording (
) when you finish recording. A Java test script is generated and displayed
in the Java editor.