Skip to content
代码片段 群组 项目
提交 070e8829 编辑于 作者: Meindert-Jan Kroese's avatar Meindert-Jan Kroese 提交者: Evan Read
浏览文件

Added PHPUnit example for generating junit output

上级 353657f5
No related branches found
No related tags found
无相关合并请求
......@@ -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.
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册