Creating a launch configuration and running a unit test from the toolbar

You can create a unit test run launch configuration from the Run toolbar button.

Before you begin

You must generate and build a unit test case prior to running it.

Unit test cases use the IBM® z/OS® Debugger to debug a test case. To prepare a program for debugging, you must build it with certain compiler options. For more information about preparing to use the debugger, see Preparing to debug.

Procedure

  1. From the main toolbar, click on the down arrow next to the Run button, and then click on Run Configurations.
  2. Right-click on Unit Test on z/OS and select New Configuration. A new launch configuration is added.
  3. Optional: Specify a name for the launch configuration. Using a similar name to the unit test is recommended.
  4. Specify additional information in the Unit Test tab of the launch configuration:
    1. Select the RSE connection where you would like to run the unit test, and where the compiled unit test executable exists.
    2. Specify the local unit test case file. Use the Browse button to help locate it.
    3. Specify the test case executable on the remote system. Use the Browse button to locate the executable. Once you have specified a valid executable, the member names for the runner configuration and result data sets are computed and filled in.
    4. The runner configuration data set is determined from your default local project settings, and overridden by any project-specific settings. For more information, see Setting preferences for Unit Test.
    5. Optional: Update the runner configuration member name if the computed name is not correct.
    6. Optional: Remove the selection for overwriting the remote runner data set member if you wish to use the existing data set member instead of overwriting it with the local runner configuration file that was created when you generated the unit test case.
    7. The runner result data set is determined from your default local project settings, and overridden by any project specific settings. For more information, see Setting preferences for Unit Test.
    8. Optional: Update the runner result member name if the computed name is not correct.
    9. Optional: Click the Modify Local project settings link to open and modify the properties for the project containing the specified unit test.
  5. Optional: Specify any additional launch configuration options in the Common tab, such as saving the launch configuration to you. For more information, see Common Tab.
  6. Click the Run button to continue and run the unit test.
  7. You will now see the job progress indicator appear, indicating what phase of JCL generation and submission is happening.
  8. Once the job is submitted, you will see message CRRZI0784I appear. Select the option you prefer to deal with the submitted job.
  9. Once the job completes, you will see the Unit Test Runner Results editor open with the results of the unit test.

Results

Once you have run a unit test case and created a launch configuration, you can reuse and access the created launch configuration from:
  • The Run Configurations menu option for the workbench Run toolbar button , or the Run menu option from the workbench main menu bar.
  • The Debug Configurations menu option for the workbench Debug toolbar button, or the Run menu option from the workbench main menu bar.
  • The Compiled Code Coverage Configurations menu option for the workbench Compiled Coverage toolbar button, or the Run menu option from the workbench main menu bar.

The Run as, Debug as and Code coverage as context menu will now also recognize and reuse this launch configuration if you right-click on the unit test case file in the z/OS Projects or Project Explorer views.