Code coverage

This dashboard shows data collected from the continuous integration pipeline artefacts produced by test executions of one or more projects (in the following “project” and “source code repository” are treated as synonymous).

This dashboard is focussed on percentage of code coverage, its trends and project size.

From here you can monitor how much code was covered by each test execution in terms of two coverage criteria:

  • statement coverage, the percentage of statements in the program that were executed during the tests;

  • code branch coverage, the percentage of branches (originated by IF, WHILE, FOR, TRY control statements) that were followed when executing the tests. This criterion is stronger: if you get x% branch coverage then you have covered at least as many execution paths than with x% statement coverage, possibly more.

The top-level filter (top-left of the dashboard) can be used to select the desired criterion.

dashboard of coverage

Coverage level

The first chart displays the coverage by test cases execution, and its trend.

Collected data

Data is collected from test artefacts. These include:

  • pytest coverage reports (xml).

Coverage level of two projects

Usage

You can use this panel:

  • to monitor the trend of coverage and spot when it decreases;

  • to identify projects that are below choosen thresholds;

  • to compare numbers and trends between projects.

Benefits

With this panel you can:

  • identify projects that have a very small amount of code covered by tests.

  • Identify projects whose trends are not as expected.

  • Identify projects that do add new tests but these tests do not increase coverage (and hence might be useless).

Project size

This chart shows the number of lines of code of a project.

Collected data

Data is collected from test artefacts. These include:

  • pytest coverage reports (xml).

Coverage level of two projects

Usage

You can use this panel:

  • to understand how fast a project is growing;

  • to compare size and growth of different projects.

Benefits

With this panel you can:

  • (together with the previous panel) understand if test coverage remains constant or increases, as the size of this project increases.

Relative change of coverage

This chart shows the trend of the relative change of coverage within the selected time interval. For each project, the percentage of coverage at the initial date of the time interval is used as a reference value. Subsequent data points show how much the coverage has changed.

Collected data

Data is collected from test artefacts. These include:

  • pytest coverage reports (xml).

Relative change of executed tests for four projects

Usage

You can use this panel:

  • To monitor the rate of change of code coverage in different time intervals;

  • to compare the rate of change between different projects.

Benefits

With this panel you can:

  • identify projects where the rate of change does not evolve as expected (for example, it decreases over time);

  • Identify time periods, for a single project, where the rate of change is not as expected.

Mean coverage

This panel displays the mean of coverage for each project in a given range of time.

Collected data

To compute this chart Argos uses the same artefacts needed by “Coverage level”, namely:

  • pytest coverage reports (xml).

Relative change of executed tests for four projects

Usage

You can use this panel:

  • to compare different projects over the same time period.

Benefits

With this panel you can:

  • to understand which project needs better testing.

Overall coverage

This panel displays the coverage mean of across all projects: it’s the mean over all projects of the project mean.

Collected data

To compute this chart Argos uses the same artefacts needed by “Coverage level”, namely:

  • pytest coverage reports (xml).

Relative change of executed tests for four projects

Usage

You can use this panel:

  • to have a single point of view about code coverage among all projects.

Benefits

With this panel you can:

  • have a global vision about code coverage for selected projects.