Trail: PROIV Documentation > Developer > PROIV Developer > Code Coverage > Frequently Asked Questions

This page contains a list of the frequently asked questions about code coverage.

  1. Why is the logic for an event missing?

  2. Why are there multiple ".p4cc" files?

  3. Captured ".p4cc" files are missing from the dashboard.

  4. Why are we getting code coverage reports with details of a function(s) that has 0 covered and 0 percentage entries?

Why is the logic for an event missing?

Occasionally the code coverage output may have an event (e.g. after successful file read) that links to a non-existent logic. However in Developer you can see that the logic does exist. This happens if the logic has no statements i.e. it only contains comments and empty lines. A logic that has no statements is dropped in the compile ("gen") stage and is no longer part of the function that is executed. The code coverage uses the executable form of function and not the source form seen in Developer.

Why are there multiple ".p4cc" files?

If you are enabling code coverage via the PROIV Dashboard then all sessions will have ".p4cc" files generated for them. Some parts of the PROIV system (e.g. Developer) create their own sessions as well as the user ones. These sessions will generate very small ".p4cc" files that can be ignored.

Captured ".p4cc" files are missing from the Analytics.

Are you setting a custom directory to save the ".p4cc" files in via the Session.CodeCoveragePath method? The PROIV Dashboard will only look in the directory specified by Virtual Machine's configuration settings.

Why are we getting code coverage reports with details of a function(s) that has 0 covered and 0 percentage entries?

When in the Dashboard, Virtual Machine tab and Code Coverage section and with Gen Metadata and Capture Metrics both switched on. Run PROIV. If a GEN/Build/Bulk Build is run then the code coverage report will capture functions that have been built. These will appear in the report as entries with zero coverage and percentage.

Without exiting PROIV, then if other functions are run directly after the build process has completed then the coverage report will intermingle these entries in the report with functions from the build and the report will contain functions that may not have been requested by coverage processing.

To avoid spurious entries only run the coverage process for functions that are relevant to the report required.

Comment on this topic

Topic ID: 700086