ResExportOnClose Function

Action

Exports the most recent results set from the current results file to a results export (.rex) file when the script/suite/testplan terminates.

Syntax

ResExportOnClose ( [sREXFile] )
Variable Description
sREXFile Optional. Results export file to save the results set to. If not specified, results are saved in a file with the same name as the current results file, in the same directory, with the .rex extension. If only a file name is specified, the file is saved in the same directory as the current results file. STRING.

Notes

Use ResExportOnClose to save the most recent results set from the current results file to a .rex file, which is a structured (delimited) text file that is suitable for importing into a spreadsheet or other application for further processing.

ResExportOnClose uses export parameters that are specified in the [ResultsExport] section in partner.ini. These parameters specify which fields are exported and the format of the exported file. You can view and set these parameters in the Results Export dialog. To set the parameters, select Results > Export, specify your preferences, then click OK. The preferences are saved in the [ResultsExport] section in partner.ini (if you changed one or more values from the defaults) and are used the next time you call the ResExportOnClose function in a script or select the Results > Export command.

Example

The following statement exports the most-recent results set from the current results file to current.rex file when the script terminates.

ResExportOnClose ("current.rex")