diff options
author | Leo <leo.osang@gmail.com> | 2018-08-28 14:48:41 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-09-03 13:56:26 +0300 |
commit | cc34f7402ef4378f84221cd3da052f087d5d00e8 (patch) | |
tree | 29d78d3f415dc2c2941cea0725bf121c7f89ed9e /doc/ci/junit_test_reports.md | |
parent | 5fb044b05528338360c8870589be3ca396c71f3f (diff) |
Add Java Maven example to junit_test_reports.md
Diffstat (limited to 'doc/ci/junit_test_reports.md')
-rw-r--r-- | doc/ci/junit_test_reports.md | 22 |
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 +``` |