Code Coverage

Unofficial Content

In this page, you will find information on how to configure and use the Code Coverage feature.

Requirements

GeneXus 16 Upgrade 8 or above is required to use this feature.

Set up

The first step needed is enable the feature. For this, you must set Test -> Generate Code Coverage information to Yes in the environment's properties.

After that, a Rebuild All operation is needed to generate all objects with trace information.

Getting code coverage information

Once the Rebuild All operation finishes, run the objects you are interested. A file named “gxperf.gxd” will be created (or updated in case it is not your first code coverage run for the environment).

To open this file, go to menu “Test” -> “Code Coverage”. 

A document window will be opened, select “...” and locate the file under “<KBLocation>/<EnvironmentPath>/web/gxperf.gxd” path. 

Once you selected the file, a prompt window is shown to select which session you are interested to see. Select all you want and click “OK”

Now Code Coverage window is updated like this:

On this window every object involved in selected executions are loaded with information about hit count, time, time with children, time percent and coverage. Also, when an object from this list selected, a graph indicating the call tree is shown and line codes with their respective trace information too.