Skip to content

Commit

Permalink
done with pitest
Browse files Browse the repository at this point in the history
  • Loading branch information
omosteven committed Jan 6, 2025
1 parent 5034285 commit edd9df9
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/jacoco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ jobs:
- name: Build with Maven
run: mvn -Drat.skip=true package --errors --show-version --batch-mode --no-transfer-progress

# Add JaCoCo report generation step here
- name: Generate JaCoCo report
run: mvn -Drat.skip=true clean test jacoco:report

# Upload JaCoCo HTML report with unique name
- name: Upload JaCoCo HTML report
uses: actions/upload-artifact@v3
with:
Expand Down
39 changes: 39 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ limitations under the License.
<version>2.18.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand Down Expand Up @@ -117,6 +123,39 @@ limitations under the License.
<defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check javadoc:javadoc</defaultGoal>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.15.3</version> <!-- Use the latest version -->
<configuration>
<targetClasses>
<param>org.apache.commons.codec.*</param>
</targetClasses>
<targetTests>
<param>org.apache.commons.codec.*Test</param>
</targetTests>
<mutators>
<mutator>DEFAULTS</mutator>
</mutators>
<excludedMethods>
<excludedMethod>main</excludedMethod>
</excludedMethods>
<threads>4</threads>
<outputFormats>
<param>HTML</param>
</outputFormats>
</configuration>
<executions>
<execution>
<id>mutation-testing</id>
<phase>test</phase>
<goals>
<goal>mutationCoverage</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down

0 comments on commit edd9df9

Please sign in to comment.