Start of change

Debug Tool Code Coverage Plug-in

Debug Tool code Coverage Plug-in is a UI application that guides you through the process that measures test coverage in application programs which are written in COBOL, PL/I and C and are compiled with certain compilers and compiler options. With this UI application in PD Tool Studio, you can test your application and generate reports to determine which code statements have been executed and unexecuted.

You can access Debug Tool Code Coverage Plug-in by taking the following steps:
  • Click Window > Show view > Other.
  • Type "Debug Tool Code Coverage" in the text box at the top of the window or scroll down until you find this entry in the drop-down menu. Select and click OK. The view contains the following options:
    Debug Tool code Coverage Option Files
    Modify the debug tool code coverage options.
    Code Coverage Report Generation
    Create code coverage reports.

Establishing a connection between the Code Coverage view and your z/OS® system

  1. Select "Host connections" view.
  2. In the Host Connections view, select Problem Determination Tools for z/OS and click Add to create a connection to the Problem Determination Tools for z/OS Common Component Server.
  3. Specify the settings in the following fields and click Save and Close:
    Name
    The name of the connection. It is auto filled in by combining the host name and port number that you specified with a ":".
    Host name
    The TCP/IP name or address of the z/OS system, which is set by the system administrator according to the instructions in "Server Overview" in the Common Component Customization Guide and User’s Guide.
    Port number
    The port number of the z/OS system, which is set by the system administrator according to the instructions in "Server Overview" in the Common Component Customization Guide and User’s Guide.
    Default encoding
    The default encoding is "cp037". If you use a different encoding scheme, specify it in this field.
  4. If this is the first time you are connecting to the IBM Problem Determination Tools Common Component Server, click Yes in the Certificate Information window.
  5. In the Problem Determination Tools Signon window, specify the settings in the following fields, or select Use existing Credentials if you have at least one credential defined, and click OK:
    Credentials Name
    The name of the credential. You can leave it blank for the default.
    User Id
    The ID that you use to log on to the z/OS system.
    Password or Passphrase
    The password or passphrase that you use to log on to the z/OS system.
Generate code coverage reports by taking the following steps:
  1. In the Debug Tool Code Coverage view, double click Code Coverage Options File to open the option file editor. Specify the settings in the corresponding fields, then click Create | Update.
    Data set name
    You can enter an existing or new data set name, then click the Select… button to retrieve a data set list. Before you click the button, specifying a partially qualified data set name is highly recommended. Retrieving all data sets from the server may be time-consuming. The partially qualified data set name used as a filter must begin with first qualifier of the data set you are looking for.
    Program name
    The name of program targeted for code coverage. Up to 8 names are allowed. You can use a wild card either at the end the name string or standalone if you want all programs in the application.
    Group ID
    Group ID 1: If you want to group observations to form a set based on the characteristics of the applications, you can use this field.

    Group ID 2: If you want a subgroup for the observation to form a subset based on the characteristics of the application, you can use this field. During the analysis of the observations the user can sort based on the grouping.

  2. In the Debug Tool Code Coverage view, double click Code Coverage Report Generation. A wizard guides you through code coverage report generation. Specify the settings in the following wizard pages.
    Wizard Page1
    Specify a partially qualified data set name in the field as a filter, then click the Select… button to retrieve a list of data set names. Before you click the Select… button, specifying a partially qualified data set name is highly recommended. Retrieving all data sets from the server maybe time-consuming. The partially qualified data set name used as a filter must begin with first qualifier of the data set you are looking for. After the output data set name is selected, click Next.
    Wizard Page 2
    In the Observation selection criteria page, all fields are pre-populated based on the file you selected from the previous page. The selection wizard page is where you specify the criteria that should be used in the evaluation of the code coverage observations in order to create a set of statistics based on the selection provided. You might want to see only the results for a specific group, or a specific program even if the Options file indicated more than one program. This allows the user to define the granularity of the information. You can specify one or more attribute values and their associated comparison operator. After specify selection criteria, click Next or Finish.
    Wizard Page 3
    This Source Marker Page is optional. The source markers provide a way to select source lines that are to be included in the statistics calculation for code coverage. It is based on the indicators in the source listing like a comment, and numeric sequence, a range of statements, or a string at a specific place in the source listing. An indicator marks a statement or section of statements that are changed/added as a result of a defect fix or enhancement. Click Finish after you have done with it.
  3. In the Debug Tool Code Coverage report view, there are four menu icons on top of the view and three context menu items.
    Expand All
    Expand the tree view to the lowest level.
    Collapse All
    Collapse the tree view to the top level.
    Export to XML
    Save the report as XML.
    Export to PDF
    Save the report as a PDF. This report includes the program source.
    View/Update Selection Criteria
    Right click on the top level of the tree view to display the context menu View/Update Selection Criteria. Click this menu item to display the Observation Selection Criteria wizard page, where you can update your selections again. Notice that all fields are pre-populated based on your previous selections.
    View Annotated Source
    Right click on the lowest level of tree item to display two menu items. One of them is View Annotated Source. Executed lines are highlighted with green color, and unexecuted lines are highlighted with red color.
    View Statistics
    Right click on the lowest level of tree item to display two menu items. Another one is View Annotated Source.
End of change