summaryrefslogtreecommitdiff
path: root/pom.xml
diff options
context:
space:
mode:
authorWillemDalton <willemhdalton@gmail.com>2025-11-05 16:34:03 -0500
committerWillemDalton <willemhdalton@gmail.com>2025-11-05 16:34:03 -0500
commitac4a71e3b43370fe45e39ac4e735b88f2e284a14 (patch)
treebfca90c11d697e6da02f0032453aaa10acb869d6 /pom.xml
parent17aba16fbb3272a73b1a1b6b1c459e3597fc066e (diff)
downloaddesignproject-design-6-ac4a71e3b43370fe45e39ac4e735b88f2e284a14.tar.gz
designproject-design-6-ac4a71e3b43370fe45e39ac4e735b88f2e284a14.tar.bz2
designproject-design-6-ac4a71e3b43370fe45e39ac4e735b88f2e284a14.zip
working on unit tests, added to pom to support jacoco
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml87
1 files changed, 85 insertions, 2 deletions
diff --git a/pom.xml b/pom.xml
index 1486a8b..6e37b12 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,5 +1,6 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>design</groupId>
<artifactId>design</artifactId>
@@ -61,6 +62,88 @@
<!-- JUnit 5 requires Surefire version 2.22.0 or higher -->
<version>3.0.0-M8</version>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.8.11</version>
+ <configuration>
+ <destfile>/target/coverage-reports/jacoco-unit.exec</destfile>
+ <datafile>/target/coverage-reports/jacoco-unit.exec</datafile>
+ </configuration>
+ <executions>
+ <execution>
+ <id>jacoco-initialize</id>
+ <configuration>
+ <!-- throw away the old data with each test run -->
+ <append>false</append>
+ </configuration>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <!-- attached to Maven test phase -->
+ <execution>
+ <id>report</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>controller</id>
+ <configuration>
+ <footer>Controller Tier</footer>
+ <title>U-Fund API Controller Tier Test Coverage</title>
+ <outputDirectory>target/site/jacoco/controller</outputDirectory>
+ </configuration>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>persistence</id>
+ <configuration>
+ <footer>Persistence Tier</footer>
+ <title>U-Fund API Persistence Tier Test Coverage</title>
+ <outputDirectory>target/site/jacoco/persistence</outputDirectory>
+ </configuration>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>model</id>
+ <configuration>
+ <footer>Model Tier</footer>
+ <title>U-Fund API Model Tier Test Coverage</title>
+ <outputDirectory>target/site/jacoco/model</outputDirectory>
+ </configuration>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>jacoco-check</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <rule>
+ <element>BUNDLE</element>
+ <limits>
+ <limit>
+ <counter>INSTRUCTION</counter>
+ <value>COVEREDRATIO</value>
+ <minimum>0.90</minimum>
+ </limit>
+ </limits>
+ </rule>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project> \ No newline at end of file