Running a test case from z/OS UNIX System Services

To run a z/OS® Automated Unit Testing Framework (ZUnit) test case from z/OS UNIX System Services, submit the zunit command from a z/OS UNIX Shell.

Before you begin

If you want to run a test case that simulates 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.

Procedure

  1. To open a z/OS UNIX Shell from the Remote Systems view, expand your remote system connection name, select z/OS UNIX Shells, and then select Launch Shell from the menu.
  2. From the command line, set STEPLIB to the data set that contains your test case load modules.
    The following example sets STEPLIB to USER.ZUNIT.COBOL.LOAD:
    export STEPLIB=$STEPLIB:USER.ZUNIT.COBOL.LOAD
  3. Type the following command on the command line. Specify the location of your test runner configuration file by using the -c parameter and the location where you want the results to be written by using the -r parameter.
    >>--zunit--+- -c=/u/user/zunit/config/AZUCF001.azucfg -+------------->
               |                                           |
               +- -c="//'USER.AZUCFG(AZUCF001)'" ----------+
    
    >----------+- -r=/u/user/zunit/result/AZURS001.azures -+------------->
               |                                           |
               +- -r="//'USER.AZURES(AZURS001)'" ----------+
    
    >--+------------------------------------+--+------+--+------+-------><
       |                                    |  |      |  |      |
       +- -s=USER.COBOL.LOAD:USER.PLI.LOAD -+  +- -t -+  +- -v -+
    -c=: the location of the configuration XML (input).
    -r=: the location of the results XML (output).
    -s=: a colon-separated (:) list of load library data sets to append
         to the STEPLIB environment variable, for example, libraries
         holding test case modules. Note: the test runner locates test 
         case modules using the standard MVS search order.
    -t : enable test runner trace output.
    -v : enable verbose script output.
    For more information about test runner parameters, see the related topics.

Results

The test runner runs the test cases that are defined in the configuration file and places the results in the result file. Use the ZUnit Runner Results viewer to see the test results.

Example

The following example starts the test runner with all parameters specified. Specifying a parameter overrides its default value.
zunit -c=zunit/config/myconfig.azucfg -r=/zunit/result/myresult.azures -t