Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 41263ae8 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

EDELIVERY-14751 Configuration options for controlling exec of the Unit and integration tests

parent efb3255f
No related branches found
No related tags found
No related merge requests found
Pipeline #274213 failed
......@@ -39,9 +39,8 @@ See the Licence for the specific language governing permissions and limitations
</modules>
<properties>
<prerequisites.maven_min_version>3.5</prerequisites.maven_min_version>
<jacocoRemotePort />
<jacocoRemoteAddress />
<!-- the root/main folder of the project used by aggregation plugins (license).
Alternative ${session.executionRootDirectory} -->
......@@ -70,6 +69,7 @@ See the Licence for the specific language governing permissions and limitations
<plugin.maven-resources-plugin.version>3.3.1</plugin.maven-resources-plugin.version>
<plugin.maven-surefire-plugin.version>3.2.5</plugin.maven-surefire-plugin.version>
<plugin.maven-war-plugin.version>3.4.0</plugin.maven-war-plugin.version>
<plugin.frontend-maven-plugin.version>1.15.1</plugin.frontend-maven-plugin.version>
<aspectj.version>1.9.22.1</aspectj.version>
<commons-beanutils.version>1.9.4</commons-beanutils.version>
......@@ -114,17 +114,18 @@ See the Licence for the specific language governing permissions and limitations
<xmlunit.version>2.10.0</xmlunit.version>
<!-- plugins -->
<plugin.frontend-maven-plugin.version>1.15.1</plugin.frontend-maven-plugin.version>
<sonar.jacoco.remotePort>${jacocoRemotePort}</sonar.jacoco.remotePort>
<sonar.jacoco.remoteAddress>${jacocoRemoteAddress}</sonar.jacoco.remoteAddress>
<skipUT>false</skipUT>
<skipIT>false</skipIT>
<maven.test.argLine> -XX:+EnableDynamicAgentLoading </maven.test.argLine>
<sonar.coverage.jacoco.xmlReportPaths>
${maven.multiModuleProjectDirectory}/smp-aggregator/target/site/jacoco/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
<sonar.host.url>http://localhost:9000/sonar/</sonar.host.url>
<sonar.language>java</sonar.language>
<jacoco.append>true</jacoco.append>
<sonar.binaries>target/classes</sonar.binaries>
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/target/site/jacoco/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
<sonar.jacoco.itReportPath>${project.basedir}/../target/jacoco-it.exec</sonar.jacoco.itReportPath>
<sonar.exclusions>
**/target/**,
......@@ -719,35 +720,35 @@ See the Licence for the specific language governing permissions and limitations
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipExec>${skipUT}</skipExec>
<!-- make sure methods are always run in same order -->
<runOrder>alphabetical</runOrder>
<argLine>${maven.test.argLine} @{argLine}</argLine>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
</excludes>
<systemPropertyVariables>
<!-- build directory for test logging -->
<buildDirectory>${project.build.directory}</buildDirectory>
</systemPropertyVariables>
<!-- make sure methods are always run in same order -->
<runOrder>alphabetical</runOrder>
<argLine>-ea ${argLine}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skipExec>${skipIT}</skipExec>
<!-- make sure methods are always run in same order -->
<runOrder>alphabetical</runOrder>
<argLine>${maven.test.argLine} @{argLine}</argLine>
<includes>
<include>**/*IntegrationTest.java</include>
</includes>
<systemPropertyVariables>
<!-- build directory for test logging -->
<buildDirectory>${project.build.directory}</buildDirectory>
</systemPropertyVariables>
<!-- ... fool Sonar to show test success for both unit and integration tests together by
instructing Failsafe to store its test reports to the same directory as Surefire instead of
the default failsafe-reports.
See https://jira.sonarsource.com/browse/SONAR-7526 -->
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<includes>
<include>**/*IT.java</include>
</includes>
<runOrder>alphabetical</runOrder>
</configuration>
<executions>
<execution>
......@@ -762,30 +763,32 @@ See the Licence for the specific language governing permissions and limitations
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<includes>
<include>eu/europa/ec/edelivery/smp/**</include>
</includes>
<formats>
<!-- Eclipse uses exec files, SonarQube uses xml reports -->
<format>XML</format>
<format>HTML</format>
</formats>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>package</phase>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>jacoco-agent-it</id>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
<configuration>
<destFile>${jacoco.report.it}</destFile>
<propertyName>failsafeArgLine</propertyName>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
......
......@@ -37,6 +37,12 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
<includes>
<include>eu/europa/ec/edelivery/smp/**</include>
</includes>
</configuration>
<executions>
<execution>
<id>report-aggregate</id>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment