diff options
-rw-r--r-- | doc/ci/junit_test_reports.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/ci/junit_test_reports.md b/doc/ci/junit_test_reports.md index 5ae8ecaafa6..9b469938f80 100644 --- a/doc/ci/junit_test_reports.md +++ b/doc/ci/junit_test_reports.md @@ -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` |