Configuring the test runner
Use the IBM z/OS Automated Unit Testing Framework (ZUnit) Runner Configuration editor to add test cases and set options for handling errors or failures.
Before you begin
- Create a test runner configuration file. For instructions, see the related topics.
- Create one or more test cases to add to the test runner configuration. For information about creating test cases, see the related topics.
- Verify file mappings for the configuration and results
files.Open the z/OS File System Mapping view and look for the following entries:
If these entries do not exist, do one of these steps:Mapping Criterion Workstation File Extension Transfer Mode Host Code Page Local Code Page **AZUCFG azucfg binary UTF-8 UTF-8 **AZURES azures binary UTF-8 UTF-8 **AZUGEN xml binary UTF-8 UTF-8 **AZUSCH xsd binary UTF-8 UTF-8 **AZUTDT xml binary UTF-8 UTF-8 - Create a workspace. Workspaces created by Rational Developer for System z version 8.5 or later include these mappings.
- Add mappings with these characteristics to your current workspace. For instructions for creating file mappings, see Mapping data sets and partitioned data set members.
- If push-to-client support is enabled on the remote system, you can add these mappings to the z/OS file system mapping configuration files so that they are downloaded to each client when it connects to the remote system. For more information about push-to-client, see Distribution of updates by using push-to-client.
About this task
ZUnit test runner results are generated when you run a test case. The test
results are stored in a file in the location you point to in the property group. Developer for z/OS supports four
formats for test result files:
- Version 1.0.0.0, which is supported by Rational Developer for System z version 8.5.1 and earlier.
- Version 2.0.0.0, which is supported by Rational Developer for System z version 9.0 and earlier. This version was developed to provide compatibility with JUnit test results.
- Version 2.1.0.0, which is supported by IBM Developer for z Systems version 14.1 and earlier. This version was developed to provide run/debug/code coverage for selected tests.
- Version 3.0.0.0, which is supported by IBM® Developer for z/OS version 14.2.1 and earlier. This version was developed to provide results for the z/OS Dynamic Test Runner.
To determine the version of a configuration file:
- Open your .azucfg file in a text editor.
- Look at the
<RunnerConfiguration>
tag in the file. The xmlns attribute refers to the version of the test runner:- Version 1.0.0.0:
xmlns="http://www.ibm.com/ZUnit/1.0.0.0/TestRunner"
- Version 2.0.0.0:
xmlns="http://www.ibm.com/ZUnit/2.0.0.0/TestRunner"
- Version 2.1.0.0:
xmlns="http://www.ibm.com/ZUnit/2.1.0.0/TestRunner"
- Version 1.0.0.0:
Adding test cases
Procedure
- To open the editor, double-click the test runner configuration
file, or right-click a COBOL or PL/I source file for which test case
has been generated and built, and then select The IBM z/OS Automated Unit Testing Framework (ZUnit) Runner Configuration editor opens.
- To add a test case, select ZUnit
runner and click Add.
The Add item window opens.
- Select Test case and click OK.
A test case entry is added to the ZUnit runner list. The editor opens the Details area for the test case entry.
- In the Details area, click Browse.
The Browse for File window opens. The browser contains a list of remote systems and projects.
- Locate the remote system or project where your test cases are stored and expand that node until you find your test cases.
- Select the test case and click OK.
The test case entry in the ZUnit runner list is updated with the test case name.
- Repeat steps2 through 6 until all test cases are added to the configuration.
- To remove a test case, select it and click Remove.
- To reorder a test case in the list, select it and click Up or Down.
Setting test to be skipped
About this task
Procedure
- Select the test in the left tree view.
- Select the Skip the test checkbox.
Setting test runner options
About this task
For each test, you can indicate whether the test is skipped or not. You cannot clear Skip the test for Test(dummy). For each test, you can indicate whether or not to stub another program call.
Procedure
- To enable a continuation condition, select the check box.
- To disable a continuation condition, clear the check box.
- To clear all continuation settings, click .
- To enable a skip condition, select the check box.
- To disable a skip condition, clear the check box.
- To enable a stubbing condition, select the check box.
- To disable a stubbing condition, clear the check box.