Execute Command in Step Configuration Wizard
To add an Execute command step using the GUI scripting support:
While in the Test Steps pane, add a step by choosing the Actions > Add step... command. Select an Execute command, click thebutton to validate the selection, and specify the following parameters:
- Run Type: An Execute step can be executed sequentially (Sequential) or in parallel with other steps (Parallel). When defining a step as parallel, an step Id needs defined, such as to be able to access the step using a Join command step.
- Delay: A delay specifying by how much step start is delayed. A delay value is automatically set when the step is added using the Capture functionality.
- Timeout: A period of time after which the step execution is considered to have timed out.
- Blocking: A read-only option that defines the script step execution behavior as either of the following, and which becomes editable only for some IxLoad commands:
- blocking: the next step only starts after the current step finishes executing
- non-blocking: the current step starts execution and then execution advances to the next step.
- Ignore step: When this option is selected, the step is skipped at execution time. Selecting this option is equivalent to right-clicking a step in the Script Steps table and choosing the Exclude command from the context menu that appears.
- Description: An optional step description can be associated with a step.
Click Next.
Define the Conditional Execution settings as explained below.Conditional Execution settings enable you to define the system conditions a script step execution is monitored for. When such a predefined condition occurs a step error or a step timeout a user-defined procedure is executed and an additional action is performed. For example, on encountering a step error, you could enforce the execution of a cleanup procedure and then terminate the script.
To monitor the step for a predefined Timeout or Error condition, select the corresponding condition, then define the associated procedure local or shared (external) by clicking the
control of the Procedure field and selecting a procedure from the the drop-down pane that appears.
For the selected procedure you can view its defined arguments by clicking the
control of the Input Arguments field, which displays a cascading table-format pane containing the argument list. To specify the actual runtime argument(s) enter the desired values in the Current Value field(s).
Configure an additional action by clicking into additional actions column and selecting either of the following options:
- Continue: After performing the specified procedure, the script execution continues.
- Exit Test: After performing the specified procedure, the script execution is terminated.
Click Next.
Whenever the step execution is monitored for predefined or user-defined events, an
icon is displayed in the step's corresponding Events selected column entry. For information on turning on the displaying of the Events selected column refer to Customizing the Script Steps Table Layout.
Select an existing session and a command appropriate for that session type, as described in Table:Execute Command Step Parameters.
Table:Execute Command Step Parameters
Field Description Session An existing session to the configured device. Depending on the selected session type, the Command String field below accepts a command that is available for that type. Return Variable A return variable can be used to retrieve the step result.Specify a return variable by editing it in place, or by clicking thebutton and selecting a variable from those defined in the previous script steps.
Command String A command accepted by the selected interface and the configured device, ranging from CLI protocol commands to pre-configured IxLoad test application command (`event').A complete listing of IxLoad test application events that can be executed on the default IxLoad session is given in IxLoad Events.A complete listing of commands for SNMP, Syslog, and CSVAnalyzer session types is given in Predefined Commands for Miscellaneous Other Session Types. Control characters A control character sequence can be sent along with the command by choosing a CTRL + <char> entry and clicking the Add valuebutton.
Encrypt If selected, the command string is displayed using * characters instead of being displayed in clear. Replace Composer variables If selected (default), string command parameters using a prepended $ character, such as for example $a, are treated as TestComposer variables.When this option is not selected, the character sequence is treated as a literal value and is passed to the session as typed.Click Next.
Response Templates enable you to parse the command output and retrieve -user-defined portions marked as targets in the template.Select one or multiple Response Template by performing either of the following:
- Click into the Response Template field, which displays a list of matching Response Templates, and choose a Response Template entry. Matching Response Templates are template resources that have been associated with a command of the current type and are located in a user-defined Response Template folder specified in the configuration of the current device session.
For a detailed description of creating Response Templates and defining a Response Template - command association refer to Creating Response Templates and Defining a Response Template - Command Association.
- Click into the Response Template field and then click the
button to associate a Response Template from another resources location. In the Resource Manager window that appears, navigate to the desired location and select a Response Template.
In both cases, after you have selected a Response Template, the Exported Targets pane below is populated with a list of tokens defined as targets in the template(s).
Assuming, for example, that you have selected two templates, say RT01 and RT02, which are exposing the sent_bytes and received_bytes targets respectively, then both sent_bytes and received_bytes are displayed in the Targets pane. Assuming also that the var1 return variable was assigned to the step, in subsequent script steps you will be able to reference both targets using the var1.sent_bytes and var1.received_bytes expressions respectively.
Alternatively, if no Response Template is specified, you can later execute the script step (also in the Edit mode), which produces a Local Step Response containing the actual step output. Based on the Local Step Response you can then define a Response Template, as described in Creating Response Templates.
Click Next.
Depending on the session type, the Match Options page enables you to monitor the command output for specified messages or traps.When a message or a trap is received that matches a specified regular expression, an user event (local or global) is triggered and a configured (local to the script or shared) procedure is executed. If the procedure to be executed has arguments, these can be assigned a number of predefined portions of the received message.
The main difference between local and global user events is that local events are defined and used only within a single script step, whereas global events can be accessed from all script steps. For information on defining global user events, refer to Defining User Events.
Click the
button and define an expression to match, associated with the performing of an action and the execution of a procedure.
- For sessions other than SNMP and Syslog configure event processing as follows:
Specify a regular expression (Search For column).
Select a local event or an existing global event (Event column). Alternatively, define a new global event by clicking the field's <add user event entry>, which brings up the User Events Catalog. See Defining User Events.
If a local event is selected, you can configure an executed procedure, local or shared (Procedure to Run column). If a global event is selected, the procedure that is associated with that event automatically becomes selected in the Procedure to Run column.
Eventually, if the associated procedure has arguments, click the
button to assign one of the following entities to a procedure parameter:
- value of message: The entire message string is assigned to the parameter.
- search result: The matched expression is assigned to the parameter.
- constant value: A constant user-defined value is assigned to the parameter.
- For SNMP sessions configure event processing as follows:
Specify the expected trap by clicking into the Look For field and editing in-place, or by clicking into the field and then clicking the
button in the drop-down pane that appears. From the MIB Browser window that appears select a trap id. See Using the MIB Browser.
Select a local event or an existing global event (Event column). Alternatively, define a new global event by clicking the field's <add user event entry>, which brings up the User Events Catalog. See Defining User Events.
If a local event is selected, you can configure an executed procedure, local or shared (Procedure to Run column). If a global event is selected, the procedure that is associated with that event automatically becomes selected in the Procedure to Run column.
Eventually, if the associated procedure has arguments, click the
button to assign one of the following entities to a procedure parameter:
- value of message: The entire message string is assigned to the parameter.
- search result: The matched expression is assigned to the parameter.
- constant value: A constant user-defined value is assigned to the parameter.
- For Syslog sessions configure event processing as follows:
Specify a message to match by defining a message pattern, possibly using regular expressions. Received messages can be further filtered by specifying additional filtering expressions in the Facility, Severity, and Host fields.
Select a local event or an existing global event (Event column). Alternatively, define a new global event by clicking the field's <add user event entry>, which brings up the User Events Catalog. See Defining User Events.
If a local event is selected, you can configure an executed procedure, local or shared (Procedure to Run column). If a global event is selected, the procedure that is associated with that event automatically becomes selected in the Procedure to Run column.
Eventually, if the associated procedure has arguments, click the
button to assign one of the following entities to a procedure parameter:
- value of message: The entire message string is assigned to the parameter.
- search result: The matched expression is assigned to the parameter.
- constant value: A constant user-defined value is assigned to the parameter.
Click Next.
Special attention is required when configuring user event processing such as to avoid inconsistent device output monitoring:
Assuming, for example, that we have an Execute command that generates continuous, multi-portion output, and that the command output is monitored for multiple expressions triggering multiple events, say E1 and E2.
Given the continuous nature of the output, it could happen that at one moment an output portion matches one of the specified expressions and that the corresponding event, say E1, is triggered by this occurrence.
Now, assuming that E1 is configured with the "Proceed with Next Step" additional action, it could happen that, while E1 is being processed, and before the Device Terminator is sent, another event, E2, is triggered. This would result in both events, E1 and E2, being processed, irrespective of E1's configured "Proceed with Next Step" option. Verify the step summary information and revert to a previous configuration step if needed. Click Finish.
IxLoad TestComposer │ User Guide |