Skip to content
Snippets Groups Projects
Commit 2f4cc093 authored by Bernhard Johannes Berger's avatar Bernhard Johannes Berger
Browse files

[WIP] Towards code coverage

parent ecf24458
No related branches found
No related tags found
No related merge requests found
Pipeline #269903 passed
......@@ -109,13 +109,15 @@ evoal:unit:
- mvn $MAVEN_CLI_OPTS -f $MAIN_POM -DskipTests=true install
- mvn $MAVEN_CLI_OPTS -f $PLUGIN_POM -DskipTests=true install
- mvn $MAVEN_CLI_OPTS -f $EVOAL_POM -Pjacoco verify
- cat src/core/de.evoal.releng.jacoco/target/site/jacoco-aggregate/index.html | grep -o '<tfoot>.*</tfoot>'
coverage: /Total.*?([0-9]{1,3})%/
artifacts:
when: always
reports:
junit: src/core/*/target/surefire-reports/TEST-*.xml
paths:
- src/core/de.evoal.releng.jacoco/target/site/jacoco-aggregate/jacoco.xml
- src/core/*/target/surefire-reports/*
- src/core/*/target/surefire-reports/TEST-*.xml
evoal:coverage:
stage: EvoAl
......@@ -132,7 +134,7 @@ evoal:coverage:
reports:
coverage_report:
coverage_format: cobertura
path: src/core/de.evoal.releng.jacoco/target/site/coverage.xml
path: src/core/de.evoal.releng.jacoco/target/site/coverage.xmlx
#############################################################
......
......@@ -282,106 +282,6 @@
</goals>
</execution>
</executions>
<!--
<executions>
<execution>
<id>before-unit-test-execution</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/jacoco-output/jacoco-unit-tests.exec</destFile>
<propertyName>surefire.jacoco.args</propertyName>
</configuration>
</execution>
<execution>
<id>after-unit-test-execution</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/jacoco-output/jacoco-unit-tests.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-unit-test-coverage-report</outputDirectory>
</configuration>
</execution>
<execution>
<id>before-integration-test-execution</id>
<phase>pre-integration-test</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/jacoco-output/jacoco-integration-tests.exec</destFile>
<propertyName>failsafe.jacoco.args</propertyName>
</configuration>
</execution>
<execution>
<id>after-integration-test-execution</id>
<phase>post-integration-test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/jacoco-output/jacoco-integration-tests.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-integration-test-coverage-report</outputDirectory>
</configuration>
</execution>
<execution>
<id>merge-unit-and-integration</id>
<phase>post-integration-test</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<directory>${project.build.directory}/jacoco-output/</directory>
<includes>
<include>*.exec</include>
</includes>
</fileSet>
</fileSets>
<destFile>${project.build.directory}/jacoco-output/merged.exec</destFile>
</configuration>
</execution>
<execution>
<id>create-merged-report</id>
<phase>post-integration-test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/jacoco-output/merged.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-merged-test-coverage-report</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<argLine>${surefire.jacoco.args}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<argLine>${failsafe.jacoco.args}</argLine>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
-->
</plugin>
</plugins>
</build>
......
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