diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-01 09:09:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-01 09:09:35 +0300 |
commit | b7ff336e241d1ece19498218f670041b16f62b1c (patch) | |
tree | 0693462d2f7fa28b5a6fa3b994291257fb000946 /doc/ci/unit_test_reports.md | |
parent | f5823d9c245c6186ac27265af22927bda40f33f7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/ci/unit_test_reports.md')
-rw-r--r-- | doc/ci/unit_test_reports.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/ci/unit_test_reports.md b/doc/ci/unit_test_reports.md index e55393a79a1..7b5f6b5167d 100644 --- a/doc/ci/unit_test_reports.md +++ b/doc/ci/unit_test_reports.md @@ -307,6 +307,25 @@ test: - report.xml ``` +### PHP example + +This example uses [PHPUnit](https://phpunit.de/) with the `--log-junit` flag. +You can also add this option using +[XML](https://phpunit.readthedocs.io/en/stable/configuration.html#the-junit-element) +in the `phpunit.xml` configuration file. + +```yaml +phpunit: + stage: test + script: + - composer install + - vendor/bin/phpunit --log-junit report.xml + artifacts: + when: always + reports: + junit: report.xml +``` + ## Viewing Unit test reports on GitLab > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24792) in GitLab 12.5 behind a feature flag (`junit_pipeline_view`), disabled by default. |