diff options
author | Michael Lando <ml636r@att.com> | 2017-10-17 10:50:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-10-17 10:50:34 +0000 |
commit | 24bf0dfd47f0824638ccb17330aa431dc7af8d66 (patch) | |
tree | 90a656c8a5fb7a98205370f9fe136411fa130cd4 | |
parent | 8bb85b089dd4c63523855da414d88eb6f06a3fa2 (diff) | |
parent | 98d09486699512549ae5db73c6895f8a9ddd0582 (diff) |
Merge "Code coverage using JaCoCO" into release-1.1.0
18 files changed, 75 insertions, 18 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml index 8b473a4b7c..77465395e3 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml @@ -125,7 +125,6 @@ <includes> <include>test/core/unittest/offline/**</include> </includes> - <skipTests>true</skipTests> </configuration> </plugin> <!-- Error codes generator plugin --> diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml index b45ee838a3..9808d76a9c 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml @@ -163,7 +163,6 @@ <includes> <include>test/core/unittest/offline/**</include> </includes> - <skipTests>true</skipTests> <systemProperties> <property> <name>buildNumber</name> diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml index 6c217ca718..3efc5f7628 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/validation-rest/validation-rest-services/pom.xml @@ -131,7 +131,6 @@ <includes> <include>test/core/unittest/offline/**</include> </includes> - <skipTests>true</skipTests> </configuration> </plugin> <!-- Error codes generator plugin --> diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/pom.xml index 513c9f5c7d..6f852d8062 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/pom.xml @@ -118,7 +118,6 @@ <includes> <include>test/core/unittest/offline/**</include> </includes> - <skipTests>true</skipTests> </configuration> </plugin> <!-- Error codes generator plugin --> diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml index d65e9e6b27..156135624a 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml @@ -139,7 +139,6 @@ <includes> <include>test/core/unittest/offline/**</include> </includes> - <skipTests>true</skipTests> </configuration> </plugin> <!-- Error codes generator plugin --> diff --git a/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml b/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml index 6872bafcca..6445b2c7f4 100644 --- a/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml +++ b/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml @@ -20,7 +20,6 @@ <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <configuration> - <skipTests>true</skipTests> </configuration> </plugin> </plugins> diff --git a/openecomp-be/backend/openecomp-sdc-application-config-manager/pom.xml b/openecomp-be/backend/openecomp-sdc-application-config-manager/pom.xml index e921dc780a..b333654ee4 100644 --- a/openecomp-be/backend/openecomp-sdc-application-config-manager/pom.xml +++ b/openecomp-be/backend/openecomp-sdc-application-config-manager/pom.xml @@ -21,7 +21,6 @@ <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <configuration> - <skipTests>true</skipTests> </configuration> </plugin> </plugins> diff --git a/openecomp-be/backend/openecomp-sdc-vendor-license-manager/pom.xml b/openecomp-be/backend/openecomp-sdc-vendor-license-manager/pom.xml index 0a5f5b6e6c..0af9038eb6 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-license-manager/pom.xml +++ b/openecomp-be/backend/openecomp-sdc-vendor-license-manager/pom.xml @@ -18,7 +18,6 @@ <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <configuration> - <skipTests>true</skipTests> </configuration> </plugin> </plugins> diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/pom.xml index 995dc6be8b..5537c3bc67 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/pom.xml +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-config-lib/pom.xml @@ -18,7 +18,6 @@ <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <configuration> - <skipTests>true</skipTests> </configuration> </plugin> </plugins> diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/pom.xml index fdbb1ec2a4..fe15aea61c 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/pom.xml +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-nosqldb-lib/openecomp-nosqldb-core/pom.xml @@ -20,7 +20,6 @@ <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <configuration> - <skipTests>true</skipTests> </configuration> </plugin> </plugins> diff --git a/openecomp-be/lib/openecomp-heat-lib/pom.xml b/openecomp-be/lib/openecomp-heat-lib/pom.xml index 0a4e14f417..a085c229d1 100644 --- a/openecomp-be/lib/openecomp-heat-lib/pom.xml +++ b/openecomp-be/lib/openecomp-heat-lib/pom.xml @@ -71,7 +71,6 @@ <artifactId>maven-surefire-plugin</artifactId> <version>${mvn.surefire.version}</version> <configuration> - <skipTests>true</skipTests> <useSystemClassLoader>false</useSystemClassLoader> <redirectTestOutputToFile>true</redirectTestOutputToFile> </configuration> diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml index d187ad5b8f..c13536d4e0 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml @@ -114,7 +114,6 @@ <artifactId>maven-surefire-plugin</artifactId> <version>${mvn.surefire.version}</version> <configuration> - <skipTests>true</skipTests> <useSystemClassLoader>false</useSystemClassLoader> <redirectTestOutputToFile>true</redirectTestOutputToFile> </configuration> diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/pom.xml index 1de854233a..43f9ce204e 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/pom.xml @@ -20,6 +20,11 @@ <artifactId>logback-classic</artifactId> <version>${logback.version}</version> </dependency> + <!-- <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.17</version> + </dependency >--> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> @@ -63,7 +68,6 @@ <version>${mvn.surefire.version}</version> <configuration> <useSystemClassLoader>false</useSystemClassLoader> - <skipTests>true</skipTests> </configuration> </plugin> </plugins> diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml index 6eabdf2ddf..0aa483e940 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml @@ -78,7 +78,6 @@ <configuration> <useSystemClassLoader>false</useSystemClassLoader> <redirectTestOutputToFile>true</redirectTestOutputToFile> - <skipTests>true</skipTests> </configuration> </plugin> </plugins> diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-impl/pom.xml index e8c39065a9..9956dd0016 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-impl/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-impl/pom.xml @@ -59,7 +59,6 @@ <systemPropertyVariables> <config.location>${project.basedir}/configuration</config.location> </systemPropertyVariables> - <skipTests>true</skipTests> </configuration> </plugin> </plugins> diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/pom.xml index 7236f2107c..5819fb02b6 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/pom.xml @@ -84,7 +84,6 @@ <configuration> <useSystemClassLoader>false</useSystemClassLoader> <redirectTestOutputToFile>true</redirectTestOutputToFile> - <skipTests>true</skipTests> </configuration> </plugin> </plugins> diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/pom.xml b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/pom.xml index 380cd1ae0c..f60226ad58 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/pom.xml @@ -128,7 +128,6 @@ <artifactId>maven-surefire-plugin</artifactId> <version>${mvn.surefire.version}</version> <configuration> - <skipTests>true</skipTests> <useSystemClassLoader>false</useSystemClassLoader> <redirectTestOutputToFile>true</redirectTestOutputToFile> </configuration> diff --git a/openecomp-be/pom.xml b/openecomp-be/pom.xml index 6147ea8fe4..c093d6c6d0 100644 --- a/openecomp-be/pom.xml +++ b/openecomp-be/pom.xml @@ -128,9 +128,78 @@ <goal>report</goal> </goals> </execution> + <execution> + <id>post-unit-test</id> + <phase>test</phase> + <goals> + <goal>report</goal> + </goals> + <configuration> + <!-- Sets the path to the file which contains the execution data. --> + + <dataFile>target/jacoco.exec</dataFile> + <!-- Sets the output directory for the code coverage report. --> + <outputDirectory>target/jacoco-ut</outputDirectory> + </configuration> + </execution> </executions> </plugin> - + <!-- Jacoco consolidation Report --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.6</version> + <executions> + <execution> + <phase>post-integration-test</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <!-- Execute an ant task within maven --> + <echo message="Generating JaCoCo Reports"/> + <taskdef name="report" classname="org.jacoco.ant.ReportTask"> + <classpath + path="${basedir}/target/jacoco-jars/org.jacoco.ant.jar"/> + </taskdef> + <mkdir dir="${basedir}/target/coverage-report"/> + <report> + <executiondata> + <fileset dir="${basedir}"> + <include name="**/*jacoco.exec"/> + </fileset> + </executiondata> + <structure name="jacoco-multi Coverage Project"> + <group name="jacoco-multi"> + <classfiles> + <fileset dir="${basedir}"> + <include name="**/target/classes/**"/> + </fileset> + </classfiles> + <sourcefiles encoding="UTF-8"> + <fileset dir="${basedir}"> + <include name="**/target/generated-sources/**"/> + </fileset> + </sourcefiles> + </group> + </structure> + <html destdir="${basedir}/target/coverage-report/html"/> + <xml destfile="${basedir}/target/coverage-report/coverage-report.xml"/> + <csv destfile="${basedir}/target/coverage-report/coverage-report.csv"/> + </report> + </target> + </configuration> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>org.jacoco</groupId> + <artifactId>org.jacoco.ant</artifactId> + <version>${jacoco.version}</version> + </dependency> + </dependencies> + </plugin> </plugins> </build> |