Specifying code coverage options in the startup key
When you run code coverage in the client or in headless mode, code coverage options can be directly specified in the startup key. In the case of the client, this allows the user to specify code coverage options prior to the creation of an Incoming Debug Session launch configuration. If the launch configuration already exists, then the startup key options override any settings in the launch configuration. In the case of headless mode, specifying startup key options allows the user to override daemon settings.
About this task
You can specify a number of code coverage options from within your JCL by including them in the startup key.
The
startup key EQA_STARTUP_KEY
contains four parts: EQA_STARTUP_KEY=<PARM1>,<PARM2>,<PARM3>,<PARM4>
.
- PARM1
- To enable code coverage, specify
CC
. To enable debug, don't specify. - PARM2
- Name of the program, usually the main module used to start the application.
- PARM3
- Parameter=value pairs. Most of the parameters supported by the
CC
headless mode can be specified. If a parameter doesn't take a value, then use=true
or=false
EQA_STARTUP_KEY
:EQA_STARTUP_KEY=CC
enables code coverage.EQA_STARTUP_KEY=CC,PGM1
enables code coverage and uses the Incoming Debug Session launch configuration assigned to program with the namePGM1
.EQA_STARTUP_KEY=CC,,testid=test01
enables code coverage and assigns the results to testcasetest01
.EQA_STARTUP_KEY=CC,,testid=test01,savesource=true
enables code coverage, assigns the results to testcasetest01
and save source with the results
When a non-CICS debug profile is enabled in code coverage mode, a default code coverage startup key is included in the profile. Specifying a startup key in JCL is not required when a profile is activated in code coverage mode because the startup key in the debug profile supersedes the one specified in the JCL.
The following list of properties that can be specified on the startup key applies to running with the client. To get a complete list of properties supported by the headless mode, enter codecov -help from the command line where the headless mode is configured to run. The parameters must be in lowercase as in the table.
Property | Valid Values | Description |
---|---|---|
cclevel | FUNCTION, LINE | Code coverage level |
ignoreerrors | TRUE, FALSE | Results are produced even if errors occur during the session. However, the results might be incomplete. |
modulelist | path | The path to a file which contains the list of modules to include in a module level report. |
moduleexcludelist | path | The path to a file which contains the list of modules to exclude from a code coverage report. Modules should be listed one per line, and the file may contain regular expressions. |
startupcommandlist | NONE, PREV, path | The path to a file which contains debug startup commands. Commands should be listed one per line within the file. |
savesource | TRUE, FALSE | Whether or not source should be saved for the code coverage session. |
tag | A string of alpha-numeric characters | A list of tags to associate with the code coverage result. Multiple tags should be enclosed in quotes and separated by a comma (,). |
testid | A string of alpha-numeric characters | Test id |
timeout | An integer | Number of seconds to wait for a debug engine response before timing out. The default is 120 seconds. The session will terminate and results already captured will be saved. Specifying 0 (zero) will wait indefinitely. |
view | DEFAULT,SOURCE_LISTING,SOURCE_ONLY,LISTING_ONLY | Choose the view to use when you save source.
Notes:
|
Procedure
// PARM.RUN=('/TEST(,,,TCPIP&&<IP_address_for_RDz_client>%<port_for_RDz_debug_UI_daemon>:*)')
//******* ADDITIONAL RUNTIME JCL HERE ******
//CEEOPTS DD *
ENVAR("EQA_STARTUP_KEY=CC,PRTPRIM,cclevel=FUNCTION")
/*
//CEEDUMP DD SYSOUT=*