Running a test case from a source file

To run a test case from a source file, select the file and then select z/OS Automated Unit Testing Framework (ZUnit) > Run Test Case.

Before you begin

You must generate and build a test case from the source file. For instructions for generating and building a test case, see these topics:
If you want to run a test case that simulates VSAM file I/O operations, allocate the necessary data sets and specify DD statements for file I/O in the Additional JCL field of the Procedures and Steps page on the ZUnit tab of the property group that is associated with the test case. To edit the Additional JCL field, expand the AZUZUNIT JCL procedure, and then select the RUNNER step.
Tip: For test cases that simulate QSAM file I/O operations, ZUnit allocates the necessary data sets and generates the necessary DD statements when it generates the JCL for running the test case.

Procedure

  1. Right-click a COBOL or PL/I source file for which a test case has been generated and built. Select z/OS Automated Unit Testing Framework (ZUnit) > Run Test Case.
    If the source file is locally stored, do the following two steps in the Run As Test Case window.
    1. Select the host system connection from the drop-down menu. If you want to connect to it, select the system again from the menu to call out the login window.
    2. Browse for and select the test case generation configuration file and the test case executable file.
  2. Specify the file or member names for the configuration and result files. If you choose an overwrite option for the configuration, or the member does not exist in the data set, the configuration will be generated. If the member exists in the data set, it will be reused. Choose an overwrite option for the generated runner result.
  3. Click OK.
    The test runner starts.

Results

When a test case is run, the ZUnit test runner starts and completes the following actions:
  1. Generates a test runner configuration file with the properties that you specified in the property group.
  2. Runs the test case. ZUnit submits a JES job to run the test runner with the uploaded runner configuration file.
  3. If the test runner is successful, it generates a test result file with the properties that you specified in the property group.
  4. Opens the result file in the IBM z/OS Automated Unit Testing Framework (ZUnit) Runner Results viewer.

What to do next

For more information about test case results, see Viewing test case results.
For help with any error messages that are displayed as a result of errors in your test case, property group, configuration file, or the test runner job submission, see the following topics: