Code Coverage Frequently Asked Questions |
VIRTUAL MACHINE |
Trail: PROIV Documentation > Developer > PROIV Developer > Code Coverage > Frequently Asked Questions
This page contains a list of the frequently asked questions about code coverage.
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.
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.
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.
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.
Topic ID: 700086