Using existing files for input and output data

You can use existing files for input and output data in the test case editor without using the Capture file I/O option. For output file, you can set SuperC options to compare existing output files and generated output files.

Before you begin

You can use this function when the Capture file I/O option is disabled. You can change this option on the Optional parameters pane in the New Unit Test dialog.
Change Capture file I/O option setting

About this task

Note: You can use this function when the Capture file I/O option is disabled. You can record and import test data instead. For more information, see Setting preferences for Early Development Test for z/OS.
In the Test Case Editor, the test type setting is shown at the top row of each file I/O:
  • When the file I/O is an input file, the settings are shown in the input data columns of each entry.
  • When the file I/O is an output file, the settings are shown in the expected data columns of each entry.
  • When the file I/O is used as both input and output, the settings are shown in the input and expected output columns.

Procedure

  1. In the Test Case Editor, right-click a cell that shows <use data>.
  2. Select Set File Test Type from the pop-up menu.
  3. In the Set File Test Type window, select Use test data or Use existing file.
  4. To use an existing file for input, enter the name of a data set or data set member in the Data set name field. You can also click Browse to select a data set or member.
    Use existing file for input
  5. Optional: When a QSAM file is selected in the Test Case Editor, you can select Concatenate data sets to use concatenated data sets.
    Select Concatenate data sets
    Note: When this option is selected, the Browse button is disabled. You can click Add to add concatenated data sets. Data set names added to the Data set name field are separated with semicolons.
  6. Optional: Edit values in the Data set name field. You can use semicolons (;), commas (,), and spaces as delimiters for multiple data set names.
    Note: For concatenated data sets, the data set name is stored in the form of a concatenated name.
    xxx.xxx.xxx;yyy.yyy.yyy
  7. To use an existing file for output, you can specify process options for the SuperC Compare Utility.
    Use existing file for output
    The SuperC Compare Utility compares the output file and the specified existing file while running a ZUnit test case.
    • Process options: Specify SuperC process options. Separate multiple options with a comma ( , ) or space ( ).
    • Process statements: Specify SuperC process statements.
    For information about the SuperC Compare Utility, see SuperC reference in the related links.

    When the window opens, these fields contain the process options and process statements defined in the property group associated with the test case. You can edit the process options, but not the process statements.

  8. Click OK to validate the data sets.
    The selected data set name is displayed in the cell of the Test Case Editor, and the data set is assigned to the file for the test.
  9. Save the changes in the Test Case Editor.
    The specified data set names and SuperC process options are saved in the test case generator configuration file.
    Note: When an existing file is specified, the file record format of the file is checked.
    • If the I/O file is already specified with an existing file, the record format of the specified existing file must have the same record format as the I/O file.
    • If a specified existing file has an invalid record format (such as "U"), an error message is displayed, and the Set File Test Type operation is canceled.
  10. Generate, build, and run the test case.

Results

When the test case successfully runs, the Runner Results view opens. You can see the generated file compare result under Test details.
File compare result under Test details
You can also click the Show file compare result button to open the SuperC compare result of new and old output files.
SuperC compare result