ReadFile Command Step in Step Configuration Wizard

A ReadFile command reads an ASCII formatted input file and retrieves parts from it.

To add a ReadFile command step using the GUI scripting support:

  1. While in the Test Steps pane, add a step by choosing the Actions > Add step... command.
  2. Select a ReadFile command, click the button to validate the selection, and specify the following parameters:
    • Run Type: A ReadFile step can only be executed sequentially (Sequential).
    • 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.
    • 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 Test 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.

  3. Define the Conditional Execution settings as explained below.
  4. 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 – an 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 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.

  5. Specify the following parameters:
    • File to Read: The file to parse is specified by clicking the button and selecting a file from the window that appears.
    • Content Type: This version of the TestComposer plugin supports only ASCII format files.
    • Return Variable: A return variable is used for retrieving a specified portion of the parsed file. Specify a new return variable by editing its name in place, or click the button and select a variable from those defined in the previous script steps.
    • Click Next.

  6. Select a Response Template defining the portions to be retrieved from the parsed file. To specify the template, click into the Response Template field, click the button and select an existing resource template. Once the response template has been selected, the Exported Targets pane below is populated with a list of tokens defined as targets.
  7. Alternatively, if no Response Template is specified, you can later execute the step (also in the Edit mode), which produces a Local Step Response containing the actual file input. Based on the Local Step Response you can then define a Response Template, as described in Creating Response Templates.

    Click Next.

  8. Verify the step summary information and revert to a previous configuration step if needed. Click Finish.