New CSV Output Record Stream Edit Tab
- Updated2025-07-21
- 3 minute(s) read
New CSV Output Record Stream Edit Tab
Use the New CSV Output Record Stream edit tab in the TestStand Sequence Editor to configure the New CSV Output Record Stream step.
The New CSV Output Record Stream edit tab contains the following options:
- CSV File Path —Specify the path to the CSV file to write, either by browsing to the file or using an expression. To specify by expression, check the Specify by Expression check box.
-
File Open Mode
—Expression that specifies the file open mode for the underlying CSV file. The mode can be any of the following FileOpenModes constants:
- FileOpenMode_NoOptions —Create the file if it does not exist. Fail with a runtime error if the file exists.
- FileOpenMode_Truncate —If the file exists, overwrite it, deleting the previous contents. Create a new file if it does not exist.
- FileOpenMode_Append —If the file exists, append to the end of it, preserving the existing contents. Create a new file if it does not exist.
- FileOpenMode_Uniquify —Create a new file if it does not exist. If a file with the specified path exists, attempt to make the file name unique by appending “_” (underscore) plus a numeric suffix to the file name. For example, if AlreadyExists.csv already exists, AlreadyExists_2.csv is tried, then AlreadyExists_3.csv, etc. until a unique name has been found. If a unique name is not found after 10000 attempts, the operation fails with a runtime error.
-
Flush After Every Write
—Sets the CsvFileOutputRecordStream.AutoFlush property on the CsvFileOutputRecordStream the step creates.
Note Enabling AutoFlush will adversely impact performance.
- Output Record Stream Reference (Optional) —Expression that specifies where to store the reference to the CsvFileOutputRecordStream the step creates.
- Tag (Optional) —Expression that specifies a string data tag to write to the CSV file before any headers or data.
-
Field Headers (Optional)
—Expression that specifies the field names for the CsvFileOutputRecordStream. The specified headers are written immediately to the underlying CSV file. The expression may be either a container or an array of strings. If a container is specified, its subproperty names define the field headers. If an array of strings is specified, the array elements define the field headers. In addition, if
Attach to Execution
is checked, the field headers will be written to the Report View for the associated ExecutionOutputRecordStream.
- Specify Prototype —Writes both the field names and data types to the CSV file as a prototype .
- Header Mapping (Optional) —Specifies the mapping from elements (either subproperties or array elements) in the field headers to fields in the stream. The mapping is a comma-separated list of index ranges. For example, "0, 3-5, 8-7" specifies that elements 0, 3, 4, 5, 8, and 7 specify the field names. The final range in the list may be open-ended. For example, "2, 3-" indicates that elements 2, 3, and all elements beyond 3 specify the field names.
-
Attach to Execution
—Check the
Attach to Execution
checkbox to attach the newly created stream to the current execution.
- Stream Name —The name of the ExecutionOutputRecordStream to associate the newly created CsvFileOutputRecordStream with. If an ExecutionOutputRecordStream with the specified name is already attached to the current execution, the existing one is used. Otherwise, a new ExecutionOutputRecordStream is created with the specified name. You can use the stream name directly with the Write Record step type . You can also use it to retrieve the ExecutionOutputRecordStream by invoking ExecutionOutputRecordStreams.GetStream() via the Execution.OutputRecordStreams property of the current execution.
- Execution Output Record Stream (Optional) —Expression that specifies where to store the reference to the ExecutionOutputRecordStream the step creates or retrieves.
-
Report View
—These options control how the ExecutionOutputRecordStream displays information in the Report View.
- Records to Display —Specifies that value of the ExecutionOutputRecordStream.NumRecordsToDisplayInReportView property of the ExecutionOutputRecordStream. Specify -1 to indicate all records should be displayed. Specify 0 to indicate that no records should be displayed.
- Set Active Report —Check the Set Active Report checkbox to cause the ExecutionOutputRecordStream to become the active report displayed in the Report View for the current execution. If you leave the box unchecked, you can view the ExecutionOutputRecordStream in the Report View by selecting it manually from the Active Report menu item.