Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khmarbaise/example-jacoco
Example Project to setup JaCoCo
https://github.com/khmarbaise/example-jacoco
integrationtesting jacoco-plugin maven maven-4 maven-plugins unittesting
Last synced: 3 months ago
JSON representation
Example Project to setup JaCoCo
- Host: GitHub
- URL: https://github.com/khmarbaise/example-jacoco
- Owner: khmarbaise
- License: apache-2.0
- Created: 2023-10-26T18:11:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-07T19:43:41.000Z (4 months ago)
- Last Synced: 2024-11-01T08:33:33.170Z (3 months ago)
- Topics: integrationtesting, jacoco-plugin, maven, maven-4, maven-plugins, unittesting
- Language: Java
- Homepage: https://blog.soebes.io/posts/2023/10/2023-10-26-maven-jacoco-configuration/
- Size: 85.9 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# JaCoCo Example
This example project is related to a [blog article](https://blog.soebes.io/posts/2023/10/2023-10-26-maven-jacoco-configuration/)
which describes the configuration to use JaCoCo in your [Apache Maven project][apache-maven].Also you can find the article on https://khmarbaise.medium.com/apache-maven-jacoco-configuration-ea3cb592159f
## Requirements
* JDK21+
* Apache Maven 3.8+ (also Maven 4.0.0-alpha-12+ supported).The given code example can easily being changed to work with JDK version less than 17,
because you can simply replace the given `record` in the example with a usual
final class implemented in the classical way.## JaCoCo Report
To create a full JaCoCo coverage report you could start via:
```bash
mvn clean verify
```Creating a report which covers only the unit tests can be achieved by:
```bash
mvn clean verify -DskipITs
```If you like to have the integration test reports only:
```bash
mvn clean verify -DskipUTs
```[apache-maven]: https://maven.apache.org