PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to view the code coverage?
  • Project dashboard
  • Project explorer
  • Code editor
  • Configuration of data displayed by code coverage
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
The code coverage is the measure regarding the coverage of tests run on an application or site. Each code line run is considered as being "checked". The "manual" tests (code lines run during a GO for example) and the automatic tests are taken into account.
Caution: The code coverage does not allow you to find out whether tests are successful: it only allows you to find out whether the code line was run.
The code coverage is used to detect the code lines of an application that have never been run.
These code lines are found in all application elements:
  • window,
  • control,
  • procedure,
  • method,
  • "code section",
  • ...
The code coverage gives a good idea of test level regarding the application code.
Note: The code coverage collects:
  • individual data in a ".wdcoverage" file found in the project directory.
  • team data in the database of Control Centers. Therefore, it is shared between the different users of Control Centers. This allows you to get statistics regarding the team that is working on the same project.
How to view the code coverage?
The code coverage can be viewed from several locations:
  • Project dashboard,
  • Project explorer,
  • Code editor.

Project dashboard

The code coverage is viewed in the project dashboard via a specific widget named "Coverage".
This Widget displays a chart showing the percentages of tested and untested code.
A click on the Widget arrow is used to expand the Widget menu. This menu is used to:
  • Display the result of last GO. In this case, only the code coverage regarding the last GO of current configuration is displayed.
  • Display the personal results. In this case, the code coverage regarding the current developer on the current configuration is displayed. The data of GO and automatic tests is taken into account.
  • Display the team results. In this case, the code coverage regarding all the developers working on the current configuration is displayed. The data of GO and automatic tests is taken into account.
  • Enable or disable the Widget (to display or not the data of code coverage in the project dasboard.
  • Display the coverage in the code. Used to display the lines whose test was run in the code editor.
Note: These actions can also be performed from the "Automatic tests" pane. See Configuration of data displayed by code coverage for more details.

Project explorer

The project explorer displays the code coverage for each element found in the explorer. A chart is displayed for each element corresponding to the percentage of code run for this element.
A specific information is displayed in a tooltip when this chart is hovered by the mouse cursor.
The information displayed in the project explorer relates to the current configuration..
You have the ability to configure the information displayed. See Configuration of data displayed by code coverage for more details.

Code editor

In the code editor, you have the ability to see the code whose test was run. To enable this feature:
  • from the "Coverage" Widget, selectionnez "Display the coverage in the code".
  • on the "Automatic tests" pane, in the "Code coverage" group, click "Display in the code". If this option is highlighted, the display in the code is enabled.
The code whose test was run is displayed on a blue background.
Note: The display in the code depends on:
Configuration of data displayed by code coverage
The configuration of data displayed by code coverage is performed via the "Automatic tests" pane of ribbon.
To select the type of data to display:
  1. On the "Automatic tests" pane, in the "Code coverage" group, expand the first option.
  2. Select the data to display:
    • Last GO. In this case, only the code coverage regarding the last go of current configuration is displayed.
    • Personal total. In this case, the code coverage regarding the current developer on the current configuration is displayed. The data of GO and automatic tests is taken into account.
    • Team total. In this case, the code coverage regarding all the developers working on the current configuration is displayed. The data of GO and automatic tests is taken into account.
    • None. The code coverage is not displayed.
  3. The displayed data is automatically refreshed.
To reinitialize the data:
  • Personal data: On the "Automatic tests" pane, in the "Code coverage" group, click "Reinitialize the personal data". The personal data is deleted for the project and the current configuration.
  • Team data: On the "Automatic tests" pane, in the "Code coverage" group, click "Reinitialize the team data". The team data is deleted from the database of Control Centers for the project and the current configuration.
Minimum required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment