Commit 5fb044b0 authored by Maastiff's avatar Maastiff Committed by Achilleas Pipinellis

Update junit_test_reports.md by providing new example for java, using gradle build tool

parent 990278be
......@@ -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`
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment