diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2018-09-03 14:08:08 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-09-03 14:08:08 +0300 |
commit | f2999c98c90bafa5e9d7d85ab6e113df1f56fdf8 (patch) | |
tree | c5cd3b08e7c1d3c49231b26666fc338aa113e53a /doc | |
parent | cc34f7402ef4378f84221cd3da052f087d5d00e8 (diff) |
Refactor Java JUnit reports examples
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ci/junit_test_reports.md | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/ci/junit_test_reports.md b/doc/ci/junit_test_reports.md index ff2fdff7a69..6717dd2dad1 100644 --- a/doc/ci/junit_test_reports.md +++ b/doc/ci/junit_test_reports.md @@ -102,9 +102,15 @@ golang: ``` ### Java examples + +There are a few tools that can produce JUnit reports in Java. + #### Gradle -Use the following job in `.gitlab-ci.yml`: +In the following example, `gradle` is used to generate the test reports. +If there are multiple test tasks defined, `gradle` will generate multiple +directories under `build/test-results/`. In that case, you can leverage regex +matching by defining the following path: `build/test-results/test/TEST-*.xml`: ```yaml java: @@ -116,14 +122,11 @@ 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 -path: `build/test-results/test/TEST-*.xml` - -### Java example with Maven +#### Maven -For parsing Surefire and Failsafe test resports use the following job in `.gitlab-ci.yml`: +For parsing [Surefire](https://maven.apache.org/surefire/maven-surefire-plugin/) +and [Failsafe](https://maven.apache.org/surefire/maven-failsafe-plugin/) test +reports, use the following job in `.gitlab-ci.yml`: ```yaml java: |