* CI/CD is enabled: `Settings/General/Visibility, project features, permissions/Repository/'CI/CD'`
* CI/CD is enabled: `Settings/General/Visibility, project features, permissions/Repository/'CI/CD'`
* Shared runners are enabled : `Settings/'CI/CD'/Runners/Shared runners/Enable shared runners for this project`
* Shared runners are enabled : `Settings/'CI/CD'/Runners/Shared runners/Enable shared runners for this project`
Ref:
*[Gitlab docs: test reports](https://docs.gitlab.com/ee/ci/testing/unit_test_reports.html)
*[Gitlab docs: test coverage](https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html)
The gitlab-ci configuration is written in the file [.gitlab-ci.yml](.gitlab-ci.yml).
The gitlab-ci configuration is written in the file [.gitlab-ci.yml](.gitlab-ci.yml).
Gitlab may use test reports to provide some UI functionalities if you upload them as artifacts.
Gitlab may use test reports to provide some UI functionalities if you upload them as artifacts.
...
@@ -31,18 +35,23 @@ tests:
...
@@ -31,18 +35,23 @@ tests:
coverage: '/^TOTAL.+?(\d+\%)$/'
coverage: '/^TOTAL.+?(\d+\%)$/'
```
```
Ref:
You can download these artifacts on [Pipeline page](https://gitlab.inria.fr/gitlabci_gallery/testing/pytest-gitlab-reports/-/pipelines) with the download button on the right of a pipeline.
*[Gitlab docs: test reports](https://docs.gitlab.com/ee/ci/testing/unit_test_reports.html)
*[Gitlab docs: test coverage](https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html)
## Visualization on Gitlab UI
## Test reports
### Test reports
On [latest pipeline page](https://gitlab.inria.fr/gitlabci_gallery/testing/pytest-gitlab-reports/-/pipelines/main/latest), the Tests tab displays a list of test suites and cases reported from the XML file.
On [latest pipeline page](https://gitlab.inria.fr/gitlabci_gallery/testing/pytest-gitlab-reports/-/pipelines/main/latest), the Tests tab displays a list of test suites and cases reported from the XML file.
## Coverage
### Coverage
#### In Analytics
You can view a graph of coverage evolution on default branch in `Analytics` menu.
For example, on this project, it is visible at: https://gitlab.inria.fr/gitlabci_gallery/testing/pytest-gitlab-reports/-/graphs/main/charts.
### Adding coverage badge
#### Adding coverage badge
To add a coverage badge to your project, go to `Settings/General/Badges` to add a badge.
To add a coverage badge to your project, go to `Settings/General/Badges` to add a badge.