Update junit_test_reports.md by providing new example for java, using gradle build tool
This commit is contained in:
parent
990278bed9
commit
5fb044b055
1 changed files with 20 additions and 0 deletions
|
@ -100,3 +100,23 @@ golang:
|
|||
reports:
|
||||
junit: report.xml
|
||||
```
|
||||
|
||||
### Java examples
|
||||
#### Gradle
|
||||
|
||||
Use the following job in `.gitlab-ci.yml`:
|
||||
|
||||
```yaml
|
||||
java:
|
||||
stage: test
|
||||
script:
|
||||
- gradle test
|
||||
artifacts:
|
||||
reports:
|
||||
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
|
||||
path: `build/test-results/test/TEST-*.xml`
|
||||
|
|
Loading…
Reference in a new issue