Editing unit test case

Use the test case editor to edit a unit test case.

Before you begin

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, it reanalyzes the source automatically. Then the test case is flagged as changed (*) in the editor. When the test case is saved, all the data is migrated to the 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, right-click a source program in the Project Explorer or z/OS Projects view, and then select New > Unit Test. It analyzes the source program file, generates a test case, and opens the test case in the Test Case Editor. For an existing test case (*.tc) file, you can double-click it or right-click and select Open With > Test Case Editor to open it.

The Test Case Editor opens in table format with rows that represent parameters in a data record and columns that represent test entries:
Test Case Editor with parameters and test entries

About this task

The Test Case Editor displays data records for a COBOL source program and any subroutines or dependent files that are discovered when the source program is parsed by the parser, which is based on the COBOL 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.