background image
<< Test Cases - Recording the cleanup stage and pasting the recording | Test Cases - Using object files >>
Test Cases - Saving a script file
<< Test Cases - Recording the cleanup stage and pasting the recording | Test Cases - Using object files >>
User's Guide
133
5 D
ESIGNING
AND
R
ECORDING
T
ESTCASES
Saving a script file
3
Review the code and take the following actions:
4
Save the script file, as described in the next section.
How the application
state is recorded
If you chose DefaultBaseState as the application state, the testcase is
recorded in the script file as:
testcase
testcase_name ()
If you chose another application state, the testcase is recorded as:
testcase
testcase_name () appstate appstate_name
If you chose "(none)" as your application state, the testcase is recorded as:
testcase
testcase_name () appstate none
The recording
statement
When you paste a recorded testcase (or other recorded actions, such as when
you use Record Actions) into a script, SilkTest indents the code under a
recording statement to facilitate playback. For more information about the
recording statement, see online Help.
Saving a script file
Procedure To save a script file, select File/Save. If it is a new file, you are
prompted for its name and location.
When saving a file, SilkTest does the following:
If Then
All the information in the
window is complete and what
you want.
Click OK. SilkTest closes the Record
Testcase dialog and places the new testcase
in your script file.
The 4Test code is not what
you expected.
Edit the code in the Testcase Code field.
The testcase name is not what
you want.
Edit the name in the Testcase Name field.
The application state is not
the one you want.
Delete the code in the Testcase Code field,
select a new application state from the
drop-down list and click Resume
Recording to rerecord the testcase.
The testcase is not finished.
Click Resume Recording. The Record
Testcase window is reopened. You can
continue to record your interactions.