Building test case programs
Use the Build Test Case action to build a test case that was generated for an Enterprise COBOL or Enterprise PL/I source program.
Before you begin
Before you can use the
Build Test Case action, you must complete these steps:
- Set compiler, JCL job card, and link options in a property group that is associated with the source program for which you want to build a test case. For instructions, see Setting property group options for a test case (COBOL) or Setting property group options for a test case (PL/I).
- Generate the test case. For instructions, see Creating/modifying a test case (COBOL) or Creating/modifying a test case (PL/I).
- When you build the test case generated as a local resource, upload the test case and the associated files. If multiple files are generated for the test case, make sure you upload all of them.
- Build the source program that is to be tested and any stub programs that are generated for
subroutines. If the source program file name does not match the COBOL PROGRAM-ID or PL/I procedure
name, then specify the PROGRAM-ID or procedure name as the load module name. COBOL Example: A COBOL source program named <HLQ>.ZUNIT.COBOL(ANAGRAM.cbl) specifies the following
PROGRAM-ID
in the identification division:IDENTIFICATION DIVISION. PROGRAM-ID. 'ANAGRA2'.
PL/I Example: A PL/I source program named <HLQ>.ZUNIT.PLI(ANAGRAM.pli) specifies the following procedure name:When you build the load module for either of these examples, specify the load module name as follows:ANAGRA2: procedure(anagramio_ptr) external;
Before building a test case, ZUnit checks whether the test target load module exists in the data set that is specified in the associated property group. If the test target load module exists in another data set, open the z/OS Automated Unit Testing Framework (ZUnit) Preferences window and clear the check box beside Check whether the test target load module exists before building test case.
The ZUnit preference page is at
in the Preferences window.