Add Java Maven example to junit_test_reports.md
This commit is contained in:
parent
5fb044b055
commit
cc34f7402e
1 changed files with 19 additions and 3 deletions
|
@ -116,7 +116,23 @@ java:
|
|||
junit: build/test-results/test/TEST-*.xml
|
||||
```
|
||||
|
||||
If you define multiple tasks of kind test, it will generate multiple directories
|
||||
under `build/test-results/` directory.
|
||||
To address all subdirectory at once, you can leverage regex matching by defining following
|
||||
If you define multiple tasks of kind test, it will generate multiple directories
|
||||
under `build/test-results/` directory.
|
||||
To address all subdirectory at once, you can leverage regex matching by defining following
|
||||
path: `build/test-results/test/TEST-*.xml`
|
||||
|
||||
### Java example with Maven
|
||||
|
||||
For parsing Surefire and Failsafe test resports use the following job in `.gitlab-ci.yml`:
|
||||
|
||||
```yaml
|
||||
java:
|
||||
stage: test
|
||||
script:
|
||||
- mvn verify
|
||||
artifacts:
|
||||
reports:
|
||||
junit:
|
||||
- target/surefire-reports/TEST-*.xml
|
||||
- target/failsafe-reports/TEST-*.xml
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue