Generating code coverage in headless mode using Remote Debug Service

To run code coverage in headless mode using Remote Debug Service, ensure that Remote Debug Service is started and configured with code coverage collection options, and the settings of the application are specified to connect to Remote Debug Service.

Before you begin

Note: Remote Debug Service is only available with IBM® Developer z/OS® Enterprise Edition and IBM Wazi Developer for Red Hat® CodeReady Workspaces.
  • Ensure that Remote Debug Service is running with code coverage collection enabled. If not, ask your system programmer to configure as instructed in Customizing with the sample job EQARMTSU and start Remote Debug Service.
  • Obtain the port for local connections for Remote Debug Service from your system programmer.
  • Obtain the root directory where Remote Debug Service writes code coverage results from your system programmer. By default, results are stored in $HOME/CC/user_ID, where $HOME is the home directory of the user running Remote Debug Service, but might use a different directory root_location/user_ID if otherwise specified by the system programmer.

Procedure

  1. Configure for Remote Debug Service with either a debug profile or the TEST runtime option:
  2. Start the application. Remote Debug Service then runs the code coverage session and the result will appear in the home directory. You can find the results in a subdirectory with the same user ID that ran the application.

What to do next

To review the code coverage result, you can use the -e=CCPDF option in your startup key to generate a PDF or use the Code Coverage Results view in the Eclipse IDE. The Code Coverage Results view is not available in Wazi Developer for Eclipse.

Viewing the report in the Code Coverage Results view

Procedure

To view the code coverage report in the Eclipse IDE, complete the following steps:

  1. Open the Code Coverage Results view.
  2. Add a result location, and specify the z/OS UNIX directory root_location/user_home_directory/user_ID.
    If Remote Debug Service is configured to output code coverage data to /shared/ccResults and user PAULB is used to run a code coverage session, the results are stored in directory /shared/ccResults/PAULB. For more information, see Working with result locations.
    If the results do not appear, check the following:
    • Ensure that the application ran to completion.
    • In Code Coverage Results view, refresh your remote location. Remote locations are not automatically refreshed.
    • Check with the system programmer that you have permission to the code coverage output directories and files.
  3. Double-click the result to view the report. For more information about viewing reports, see Generating and working with web-based reports.