From d481172eb4ce193e84156a88339dfdddb2865af9 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Fri, 27 Aug 2021 20:51:27 +0400 Subject: [PATCH] Code: added test coverage reports by JaCoCo lib (generate by command like "mvn install -Djacoco.skip=false"); Code: added test coverage support for Sonar reports; --- .gitignore | 1 + Mage.Tests/pom.xml | 3 --- Mage.Verify/pom.xml | 3 --- pom.xml | 52 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 403ce01bda..fa8fced809 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ Mage.Client/target Mage.Common/target # Mage.Plugins +Mage.Plugins/target Mage.Plugins/Mage.Card.Plugin/target Mage.Plugins/Mage.Counter.Plugin/target Mage.Plugins/Mage.Theme.Plugin/target diff --git a/Mage.Tests/pom.xml b/Mage.Tests/pom.xml index c0f3083998..55f495d765 100644 --- a/Mage.Tests/pom.xml +++ b/Mage.Tests/pom.xml @@ -81,9 +81,6 @@ org.apache.maven.plugins maven-surefire-plugin - - -Dfile.encoding=UTF-8 - org.apache.maven.plugins diff --git a/Mage.Verify/pom.xml b/Mage.Verify/pom.xml index fdab7c4bd9..91263f642d 100644 --- a/Mage.Verify/pom.xml +++ b/Mage.Verify/pom.xml @@ -64,9 +64,6 @@ org.apache.maven.plugins maven-surefire-plugin - - -Dfile.encoding=UTF-8 - org.apache.maven.plugins diff --git a/pom.xml b/pom.xml index 7e1335d59c..91c1340a6c 100644 --- a/pom.xml +++ b/pom.xml @@ -51,16 +51,52 @@ + + + + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + + + + prepare-agent + + + + + generate-code-coverage-report + verify + + report + + + + + report-aggregate + verify + + report-aggregate + + + + + org.apache.maven.plugins maven-surefire-plugin 2.22.2 + @@ -99,8 +135,24 @@ 1.4.49 + -Dfile.encoding=UTF-8 UTF-8 yyyy-MM-dd'T'HH:mm:ss'Z' + + + true + + + Mage.Verify/target/site/jacoco-aggregate/jacoco.xml + ${project.basedir}/../${aggregate.report.dir}