From 12d1a241e53b67c85b113cfd476d3f79cf513b52 Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Sat, 9 Dec 2017 16:44:51 +0100 Subject: [PATCH] #106 (2) - Added unit tests coverage report (Cobertura in addition to Jacoco) --- documentation/en/30_Contributor_doc/README.md | 31 ++++++++++++++++++- pom.xml | 25 +++++++++++++-- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/documentation/en/30_Contributor_doc/README.md b/documentation/en/30_Contributor_doc/README.md index 5c8344a1..07cdf369 100644 --- a/documentation/en/30_Contributor_doc/README.md +++ b/documentation/en/30_Contributor_doc/README.md @@ -6,10 +6,10 @@ ----- * Checking for new dependency / plugin updates * OWASP Dependency-Check +* Code coverage * Checkstyle * JavaDoc - ## Checking for new dependency / plugin updates ```bash # Checking for new dependency updates @@ -59,6 +59,35 @@ mvn dependency-check:help -Ddetail=true -Dgoal=aggregate * http://jeremylong.github.io/DependencyCheck/ * http://jeremylong.github.io/DependencyCheck/dependency-check-maven/ +## Code coverage + +no aggregate report (if you know how to do it…) + +### Jacoco + +#### Documentation +* http://www.jacoco.org/jacoco/ +* https://github.com/jacoco/jacoco/ + +#### Usage +```bash +mvn clean install + # report: engine/*/target/site/jacoco +``` + +### Cobertura + +#### Documentation +* http://www.mojohaus.org/cobertura-maven-plugin/ +* https://github.com/cobertura/cobertura + +#### Usage +```bash +mvn cobertura:cobertura + # report: engine/*/target/site/cobertura +``` + + ## Checkstyle Scan Contrast-Finder to check the violations of a coding standard. diff --git a/pom.xml b/pom.xml index b3cdad0a..5d774407 100644 --- a/pom.xml +++ b/pom.xml @@ -233,8 +233,9 @@ + usage: mvn clean install + report: engine/*/target/site/jacoco + no aggregate report (if you know how to do it…) --> org.jacoco jacoco-maven-plugin @@ -255,6 +256,24 @@ + + + org.codehaus.mojo + cobertura-maven-plugin + 2.7 + + + html + + + + + @@ -268,6 +287,8 @@ ${maven-project-info-reports-plugin.version} + +