Adding data to test entries

Use the Test Case Editor to add data to test entries in an Enterprise PL/I test case.

Before you begin

For information about known limitations in the Test Case Editor, see PL/I Limitations.

When a new element or new syntax is supported in the Test Case Editor and the format of the test data layout files (AZUSCH) is changed, ZUnit reanalyzes the source automatically. Then the editor comes up with a dirty mark (*). When the test data is saved in the editor, all the data will be migrated to new format.

To learn more about how the Input and Expected output columns pass data between main programs and subprograms, see Flow of input and expected output data.

To open the Test Case Editor, select a source program in the Remote Systems or z/OS Projects view, and then click z/OS Automated Unit Testing Framework (ZUnit) > Create/modify Test Case. ZUnit analyzes the source program file, generates a test case, and opens the test case in the Test Case Editor.

The Test Case Editor opens in table format with rows that represent parameters in a data record and columns that represent test entries. The editor contains two columns for each test entry: one column for input values and one column for expected output values. The following screen capture shows the Test Case Editor with test entries:
Test Case Editor with parameters and test entries

About this task

The Test Case Editor displays data records for a PL/I source program and any subroutines or dependent files that are discovered when the source program is parsed by the ZUnit parser, which is based on the PL/I importer. The data records are displayed in table format. Use the Test Case Editor to add test data to a test case.

Toolbar buttons for expanding and collapsing data records make it easier to navigate in the Test Case Editor:
  • To expand or collapse a table row, click + or - beside the row.
  • To expand all rows, click Expand All toolbar button Expand All.
  • To expand rows to the top node of each parameter, click Expand to Parameter toolbar button Expand To Parameter.
  • To collapse all rows to the top-level node, click Collapse All toolbar button Collapse All.
  • To undo any edits before you save the test data, click Edit > Undo.
By using the Test Case Editor, you can also do the following operations:
  • Generate stub programs for selected subroutines in the source PL/I program.
  • Generate stub programs to simulate input/output operations.
  • Generate stub programs to simulate the return value of a function-type subprogram. The return value that is not defined as variable in the source program is denoted by AZU_RTn, where n represents 1, 2, 3, and so on in the Test Case Editor.
  • Build the test case program.
These tasks are described in the following help topics.