Previous Topic Next topic Print topic


Enabling Code Coverage

Note: This facility is supported in native COBOL only.

Before you run an application in code coverage mode and produce code coverage statistics, you must enable code coverage in the properties of your project, a project's build configuration or in the properties of the project's files. You then need to build your application.

To enable code coverage for your project:

  1. Open your project's properties, expand Micro Focus > Project Settings and click the COBOL tab.
  2. Check Enable code coverage.
  3. Click Apply and then click OK.

To enable code coverage for a build configuration of your project:

  1. Open your project's properties, expand Micro Focus > Build Configurations and click the COBOL tab.
  2. Expand Override project COBOL settings and check Enable configuration specific settings.
  3. Check Enable code coverage.
  4. Click Apply and then click OK.

To enable code coverage for individual files in your project:

  1. Open a file's properties and click the COBOL tab.
  2. Check Enable file specific settings and check Enable code coverage.
  3. Click Apply and then click OK.
Note: If Build Automatically is not enabled in the IDE, you need to build your project manually.

If your application executes in an enterprise server, you also need to configure the server to run in code coverage mode:

  1. In the IDE, open Server Explorer.
  2. Right-click the server that is associated with your application and click Configure Analysis > Code Coverage.

To enable code coverage to produce reports in HTML format in addition to producing statistics, specify your preferences on the Code Coverage page in Window > Preferences > Micro Focus > COBOL. See Configuring the Code Coverage HTML Reports.

Previous Topic Next topic Print topic