Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
add support for integration test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Huang committed Nov 5, 2012
1 parent 7365311 commit eccb944
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 4 deletions.
11 changes: 11 additions & 0 deletions pom.xml
Expand Up @@ -327,6 +327,17 @@
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>

<pluginRepository>
<id>cobertura-it-maven-plugin-maven2-release</id>
<url>http://cobertura-it-maven-plugin.googlecode.com/svn/maven2/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>


Expand Down
117 changes: 113 additions & 4 deletions zanata-war/pom.xml
Expand Up @@ -327,8 +327,8 @@
</additionalClasspathElements>
<childDelegation>true</childDelegation>
<useSystemClassLoader>true</useSystemClassLoader>
<argLine xml:space="preserve">-Xmx1024m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError
<argLine xml:space="preserve">-Xmx1024m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=${project.build.directory} -Dsun.lang.ClassLoader.allowArraySyntax=true</argLine>
<classpathDependencyExcludes>
<classpathDependencyExclude>
Expand Down Expand Up @@ -797,6 +797,115 @@
</build>
</profile>

<profile>
<id>it-coverage</id>
<!-- In order to combine unit test and integration test coverage together, it requires below two commands:
mvn clean verify -Pit-coverage,nogwt
mvn cobertura:cobertura
Adding -Dcobertura.report.format=html to the second command will output report as html.
Jenkins requires xml format.
-->
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-it-maven-plugin</artifactId>
<version>2.5</version>
<configuration>
<instrumentation>
<excludes>
<!--WebTran exclusion-->
<!--TODO move all gwt wrapper class under specific package. i.e boundary-->
<!--<exclude>**/boundary/**/*</exclude>-->
<exclude>**/test/**/*</exclude>
<!--<exclude>**/supersource/**/*</exclude>-->
<exclude>**/client/**/*View</exclude>
<exclude>**/client/Application*</exclude>
<exclude>**/client/auth/**</exclude>
<exclude>**/client/events/**</exclude>
<exclude>**/client/gin/**</exclude>
<exclude>**/client/rpc/**</exclude>
<exclude>**/client/ui/**</exclude>
<exclude>**/client/view/**</exclude>
<exclude>**/EventWrapperImpl*</exclude>
<exclude>**/*DataProvider*</exclude>
<exclude>**/*SelectionModel*</exclude>
<!--below are some trivial classes(java bean) at the moment-->
<exclude>**/shared/auth/**</exclude>
<exclude>**/shared/model/**</exclude>
<exclude>**/shared/rpc/**</exclude>

<!--Server exclusion-->
<exclude>**/job/**</exclude>
<exclude>**/liquibase/**</exclude>
<exclude>**/log4j/**</exclude>
<exclude>**/seam/**</exclude>
<exclude>**/rest/files/*</exclude>
<exclude>**/rest/*Mapper</exclude>
<exclude>**/openid/*</exclude>
<exclude>**/servlet/*</exclude>

<!--General exclusion-->
<exclude>**/*Exception*</exclude>
</excludes>
</instrumentation>
<formats>
<format>xml</format>
</formats>
<check>
<haltOnFailure>false</haltOnFailure>
</check>
</configuration>
<executions>
<execution>
<id>cobertura-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
<execution>
<id>cobertura-instrument</id>
<phase>process-classes</phase>
<goals>
<goal>instrument</goal>
</goals>
</execution>
<execution>
<id>cobertura-check-only</id>
<phase>verify</phase>
<goals>
<goal>check-only</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-it-maven-plugin</artifactId>
<configuration>
<formats>
<format>html</format>
<!--<format>xml</format>-->
</formats>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</profile>

</profiles>

<dependencies>
Expand Down Expand Up @@ -1402,7 +1511,7 @@
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<scope>runtime</scope>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down Expand Up @@ -1443,7 +1552,7 @@
<dependency>
<groupId>com.allen-sauer.gwt.log</groupId>
<artifactId>gwt-log</artifactId>
<version>3.1.7</version>
<version>3.1.8</version>
</dependency>

<dependency>
Expand Down

0 comments on commit eccb944

Please sign in to comment.