You can use the Create Test Script section of the Integrated
Test Client to create or modify test scripts for your monitor model.
In the Create Test Script section you can add commands, including
a command to import events when the script runs, and rearrange the
commands in the test script.
About this task
To create or modify a test script, complete the following
steps:
Procedure
- Either create a new test script or open an existing test
script.
- To create a new script, click the Create new test
script
button at the top of the Create
Test Script section.
- To open an test script that you previously created in the
Integrated Test Client, click the Open existing test script
button. Browse to the directory where you put the script,
select the script, and click Open.
- To add events to the test script, perform one of the following
steps:
- To create new events, use the Add Values to Events section
and then click Add to Test Script
. See Creating sample events for testing. for more
information. New events are added to the bottom of the test script.
You can use the arrow buttons in the Create Test Script section to
change the order of events in the script.
- To import events when the script runs, either from an existing
file or from the Common Event Infrastructure (CEI) database, or by
creating a file from previously recorded events, see Importing events for testing.
- Add or modify the following commands as necessary to finish
the test script:
- To add a time delay, click Add Delay
l You are prompted to specify the number of milliseconds that
the script will sleep before proceeding to the next command.
- To add a pause command, click Add Pause
. When it reaches a pause command, the script stops until
you either click Run Script to continue from
the pause point or you select a command from the list and then click Run
Script again to continue from the selected command.
- To move an event or command up one position in the test script,
select the event or command in the script, and click Move
Up
.
- To move an event or command down one position in the test script,
select the event or command in the script, and click Move
Down
.
- To change the value of a command, select the command, and click Edit
. If you select an event that you previously created in the
Add Values to Events section and click Edit
, the event data elements are loaded into the data tables
in the Add Values to Events section. See Editing sample events for more information. After making
your changes, click the Add Edited Values
button under the tables to update the currently selected
event in the script or Cancel Edit
to cancel editing the event.
- To remove an event or command from the test script, select the
event or command, and click Remove
.
- To save the test script, use one of the following buttons:
- To save the test script after creating it, click the Save
test script as
button at the top of the Test Script section. Browse to where
you want to save the script and give it a name.
- To save a test script while working on it (for example, after
using the Edit button and editing the values
of an event), click the Save test script
button to save the updated script.
When a script is saved, its file name is displayed in
the Script file field of the Create Test Script
section.
Example
The following code is an example of a test script:
Emit ClaimEventStartedSample1
Sleep 100 ms
Import c:\mytest\myevents.xml
Pause
Emit ClaimEventStartedSample2