Commit b1791847 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'docs/kotlin_testcoverage' into 'master'

Docs: Document that the Java examples for Testcoverage visualization also work for Kotlin

See merge request gitlab-org/gitlab!47699
parents 863b2d18 7e25b4dc
...@@ -73,11 +73,11 @@ test: ...@@ -73,11 +73,11 @@ test:
cobertura: coverage/cobertura-coverage.xml cobertura: coverage/cobertura-coverage.xml
``` ```
### Java examples ### Java and Kotlin examples
#### Maven example #### Maven example
The following [`gitlab-ci.yml`](../../../ci/yaml/README.md) example for Java uses [Maven](https://maven.apache.org/) The following [`gitlab-ci.yml`](../../../ci/yaml/README.md) example for Java or Kotlin uses [Maven](https://maven.apache.org/)
to build the project and [Jacoco](https://www.eclemma.org/jacoco/) coverage-tooling to to build the project and [Jacoco](https://www.eclemma.org/jacoco/) coverage-tooling to
generate the coverage artifact. generate the coverage artifact.
You can check the [Docker image configuration and scripts](https://gitlab.com/haynes/jacoco2cobertura) if you want to build your own image. You can check the [Docker image configuration and scripts](https://gitlab.com/haynes/jacoco2cobertura) if you want to build your own image.
...@@ -101,7 +101,7 @@ coverage-jdk11: ...@@ -101,7 +101,7 @@ coverage-jdk11:
# The `visualize` stage does not exist by default. # The `visualize` stage does not exist by default.
# Please define it first, or chose an existing stage like `deploy`. # Please define it first, or chose an existing stage like `deploy`.
stage: visualize stage: visualize
image: haynes/jacoco2cobertura:1.0.3 image: haynes/jacoco2cobertura:1.0.4
script: script:
# convert report from jacoco to cobertura # convert report from jacoco to cobertura
- 'python /opt/cover2cover.py target/site/jacoco/jacoco.xml src/main/java > target/site/cobertura.xml' - 'python /opt/cover2cover.py target/site/jacoco/jacoco.xml src/main/java > target/site/cobertura.xml'
...@@ -117,7 +117,7 @@ coverage-jdk11: ...@@ -117,7 +117,7 @@ coverage-jdk11:
#### Gradle example #### Gradle example
The following [`gitlab-ci.yml`](../../../ci/yaml/README.md) example for Java uses [Gradle](https://gradle.org/) The following [`gitlab-ci.yml`](../../../ci/yaml/README.md) example for Java or Kotlin uses [Gradle](https://gradle.org/)
to build the project and [Jacoco](https://www.eclemma.org/jacoco/) coverage-tooling to to build the project and [Jacoco](https://www.eclemma.org/jacoco/) coverage-tooling to
generate the coverage artifact. generate the coverage artifact.
You can check the [Docker image configuration and scripts](https://gitlab.com/haynes/jacoco2cobertura) if you want to build your own image. You can check the [Docker image configuration and scripts](https://gitlab.com/haynes/jacoco2cobertura) if you want to build your own image.
...@@ -141,7 +141,7 @@ coverage-jdk11: ...@@ -141,7 +141,7 @@ coverage-jdk11:
# The `visualize` stage does not exist by default. # The `visualize` stage does not exist by default.
# Please define it first, or chose an existing stage like `deploy`. # Please define it first, or chose an existing stage like `deploy`.
stage: visualize stage: visualize
image: haynes/jacoco2cobertura:1.0.3 image: haynes/jacoco2cobertura:1.0.4
script: script:
# convert report from jacoco to cobertura # convert report from jacoco to cobertura
- 'python /opt/cover2cover.py build/jacoco/jacoco.xml src/main/java > build/cobertura.xml' - 'python /opt/cover2cover.py build/jacoco/jacoco.xml src/main/java > build/cobertura.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