Using Attached Script Files

Each TestComposer script has a number of attached files comprising baseline results, IxLoad-generated files such as configuration ‘snapshots’, and the definition of associated statistics. In addition to these files that are attached by default, you can also add additional files that you can read from or write into at script execution time using CSVAnalyzer session commands.

When a script is run as a custom test from the IxLoad Quick Tests configuration page, the attached script files are saved on the IxLoad host and can be accessed from the Data Miner plug-in of IxLoad, as described in Data Miner Results Display .

To specify attached files:

  1. Click the Files Catalog button from the Test ribbon to display the Files Catalog window ( Figure:FIles Catalog Window):
  2. Figure:Files Catalog Window

    The catalog displays the following files that are attached to the script by default:

    • Baseline_results.txt: This file, which comprises script baseline values, is populated only if Tcl baseline commands – getbaseline, setbaseline – are used in the script.
    • PassFailStats.csv: This file comprises the exported stats in CSV format.
    • PassFailStats.xml: This file comprises an XML schema defining the exported statistics.
    • SummaryReport.html: This file contains a script summary report in HTML format.
    • SummaryReport.xml: This file contains a script summary report in XML format.

    In addition to these files, a predefined system variable named UserResults-Directory defines a folder on the local host that can be used by the IxLoad application for storing dynamically generated files. When the TestComposer script is executed from as a custom test from the IxLoad QuickTests configuration page, all files from that folder also become available from the IxLoad Data Miner plug-in.

    The UserResultsDirectory variable value can be changed. Once changed, subsequent script steps or script runs use the modified value for specifying the folder where the generated files are stored in.

  3. Add an attached file by clicking the button.
  4. For the new table entry specify a file by clicking into the File Location column and selecting a file from the standard Open window that appears.

    Define other parameters as follows:

    • Composer variable: A variable that is used to reference an attached file, such as for example for the purpose of reading a file value.

    Variables referencing File Catalog items (other than the predefined UserResultsDirectory variable) are only available in a script's main procedure body and cannot be referenced in inline or external (shared) procedures.

    • Type: Source or Result. If defined as a source file, it must be existing prior to script execution. If defined as a result, it is generated by the script execution and can be used for writing into it using the WriteBlock command of a CSVAnalyzer session.
    • Global: Indicates if the variable is global or local. A global variable that is defined within the main script body is still visible in the bodies of inline or external procedures.
    • For all configuration snapshot files, which store a IxLoad test configuration state, this parameter is always Global.

    • Description: An optional description information.
    • The File location (indicating the location of the attached file with respect to the TestComposer-specific folder) and the Modified Time (indicating the date of the last modification to the file) are updated automatically.

  5. Alternatively, add several existing files at once by clicking the button. In the standard Open dialog that appears specify multiple files, possibly using wildcard (* and ?) characters and click the Ok button.
  6. In the window that appears choose to add the files as source files (by clicking the Yes button) or as result files (by clicking the No button).

  7. Files having an active adjoining symbol can be visualized by double-clicking the table entry. An alternative mode to visualize the content is to select the entry and click the button.
  8. When the repository folder specified by the UserResultsDirectory variable exists, clicking its adjoining button displays a Windows Explorer window that enables you to visualize the stored files.

  Example: Considering, for example, that we have defined an output file referenced by the file_out variable, we could perform the following Tcl commands sequence to open the file and write into it a string specifying a script result status:

  TclEval set f [open $file_out w]
  TclEval puts $f "The test script executed successfully"
  TclEval close $f