summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo <leo.osang@gmail.com>2018-08-28 11:48:41 +0000
committerAchilleas Pipinellis <axil@gitlab.com>2018-09-03 12:56:26 +0200
commitcc34f7402ef4378f84221cd3da052f087d5d00e8 (patch)
tree29d78d3f415dc2c2941cea0725bf121c7f89ed9e
parent5fb044b05528338360c8870589be3ca396c71f3f (diff)
downloadgitlab-ce-cc34f7402ef4378f84221cd3da052f087d5d00e8.tar.gz
Add Java Maven example to junit_test_reports.md
-rw-r--r--doc/ci/junit_test_reports.md22
1 files changed, 19 insertions, 3 deletions
diff --git a/doc/ci/junit_test_reports.md b/doc/ci/junit_test_reports.md
index 9b469938f80..ff2fdff7a69 100644
--- a/doc/ci/junit_test_reports.md
+++ b/doc/ci/junit_test_reports.md
@@ -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
+```