diff --git a/doc/user/group/repositories_analytics/_index.md b/doc/user/group/repositories_analytics/_index.md index 8e01970ef7a28941c8d93860ab741d98c122de1b..b4629c9cc149386d85c8dc38b397a90bcb8c99e7 100644 --- a/doc/user/group/repositories_analytics/_index.md +++ b/doc/user/group/repositories_analytics/_index.md @@ -12,64 +12,69 @@ title: Repository analytics for groups {{< /details >}} -Repositories analytics for groups provides information about test coverage for all projects in a group. An -[issue exists](https://gitlab.com/gitlab-org/gitlab/-/issues/273527) to also extend support for all projects in -subgroups. +Repository analytics for groups provides test coverage data for all projects in a group. -It is similar to [repository analytics for projects](../../analytics/repository_analytics.md). +You can use group repository analytics to: -## Current group code coverage +- Monitor code coverage trends across all projects in a group. +- Track the total number of projects and jobs that generate coverage reports. +- Download historical coverage data for analysis. -The **Analyze > Repository analytics** group page displays the overall test coverage of all your projects in your group. -In the **Overall activity** section, you can see: +Support for subgroups is proposed in [issue 273527](https://gitlab.com/gitlab-org/gitlab/-/issues/273527). -- The number of projects with coverage reports. -- The average percentage of coverage across all your projects. -- The total number of pipeline jobs that produce coverage reports. +## View group repository analytics -## Average group test coverage from the last 30 days +Prerequisites: -The **Analyze > Repository analytics** group page displays the average test coverage of all your projects in your group in a graph for the last 30 days. +- Projects within the group must be configured to collect test coverage data. -## Latest project test coverage list - -To see the latest code coverage for each project in your group: +To view repository analytics for a group: 1. On the left sidebar, select **Search or go to** and find your group. 1. Select **Analyze > Repository analytics**. -1. In the **Latest test coverage results** section, from the **Select projects** dropdown list, choose the projects you want to check. -You can download code coverage data for specific projects to view -[code coverage history](../../../ci/testing/code_coverage/_index.md#view-coverage-history). +## Coverage metrics -## Download historic test coverage data +The group **Repository analytics** page displays: -You can get a CSV of the code coverage data for all of the projects in your group. This report has a maximum of 1000 records. The code coverage data is from the default branch in each project. +- **Current group code coverage**: + - Number of projects with coverage reports. + - Average coverage percentage across all projects. + - Total number of pipeline jobs that produce coverage reports. -To get the report: +- **Average test coverage**: A graph that shows the average test coverage across all projects in your group for the last 30 days. -1. On the left sidebar, select **Search or go to** and find your group. -1. Select **Analyze > Repository analytics**. -1. Select **Download historic test coverage data (.csv)**. -1. Select the projects and date range you want to include in the report. -1. Select **Download test coverage data (.csv)**. +- **Latest test coverage results**: A list of the most recent coverage data for each project in your group. Select projects from the dropdown list to filter the results. + +## Download coverage data -The projects dropdown list shows up to 100 projects from your group. If the project you want to check is not in the dropdown list, you can select **All projects** to download the report for all projects in your group, including any projects that are not listed. There is a plan to improve this behavior in this [related issue](https://gitlab.com/gitlab-org/gitlab/-/issues/250684). +You can download a CSV file containing historical coverage data for projects in your group. -For each day that a coverage report was generated by a job in a project's pipeline, a row in the CSV includes: +The CSV report: -- The date the coverage job ran -- The name of the job that generated the coverage report -- The name of the project -- The coverage value +- Contains up to 1000 records. +- Includes data from the default branch of each project. +- Shows one row per day when coverage was reported. +- Uses the last value of the day if multiple coverage reports were generated. +- Contains the following information for each coverage report: + - Date the coverage job ran + - Name of the job that generated the report + - Project name + - Coverage percentage -If the project's code coverage was calculated more than once in a day, the last value from that day is used. +To download the coverage data: -{{< alert type="note" >}} +1. On the group **Repository analytics** page, select **Download historic test coverage data (.csv)**. +1. Select the projects to include: + - From the **Projects** dropdown list, choose specific projects. The projects dropdown list shows up to 100 projects. + - Optional. Select **Select all** to include all projects in your group. +1. From the **Date range** dropdown list, select the time period to include. +1. Select **Download test coverage data (.csv)**. -Group code coverage data is taken from the configured [default branch](../../project/repository/branches/default.md). +## Related topics -{{< /alert >}} +- [Repository analytics for projects](../../analytics/repository_analytics.md) +- [Code coverage](../../../ci/testing/code_coverage/_index.md) <!-- ## Troubleshooting