mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 10:09:35 +01:00
feat(test): Jazzer Fuzz-Tests für Production-Aggregate einführen
Coverage-guided Fuzz-Tests für ProductionOrder, Recipe und Batch. Jeder Test fuzzt create() + zufällige Sequenzen aller Mutations-Methoden, um unbehandelte Exceptions bei beliebigen Inputs aufzudecken. - jazzer-junit 0.24.0 als Test-Dependency - Maven-Profile: -Pfuzz (echtes Fuzzing), -Pfuzz-regression (Crash-Replay) - Surefire: FuzzTests im Default-Lauf ausgeschlossen, reuseForks=false - Makefile: make fuzz, make fuzz/regression, make fuzz/single - .gitignore: .cifuzz-corpus/ ausgeschlossen
This commit is contained in:
parent
74dc9a6981
commit
8a84bf5f25
6 changed files with 312 additions and 1 deletions
|
|
@ -32,6 +32,7 @@
|
|||
<jacoco.version>0.8.12</jacoco.version>
|
||||
<pitest.version>1.17.4</pitest.version>
|
||||
<pitest-junit5.version>1.2.1</pitest-junit5.version>
|
||||
<jazzer.version>0.24.0</jazzer.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -120,6 +121,13 @@
|
|||
<artifactId>h2</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.code-intelligence</groupId>
|
||||
<artifactId>jazzer-junit</artifactId>
|
||||
<version>${jazzer.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
@ -147,6 +155,20 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/*FuzzTest.java</exclude>
|
||||
</excludes>
|
||||
<!-- -noverify: Jazzer's bytecode instrumentation conflicts with JaCoCo
|
||||
on Java 21 pattern matching (VerifyError on stack maps).
|
||||
Safe for test execution. -->
|
||||
<argLine>-XX:+EnableDynamicAgentLoading -noverify</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
|
|
@ -176,6 +198,52 @@
|
|||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>fuzz</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>none</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*FuzzTest.java</include>
|
||||
</includes>
|
||||
<reuseForks>false</reuseForks>
|
||||
<argLine>-XX:+EnableDynamicAgentLoading -noverify</argLine>
|
||||
<environmentVariables>
|
||||
<JAZZER_FUZZ>1</JAZZER_FUZZ>
|
||||
</environmentVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>fuzz-regression</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>none</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*FuzzTest.java</include>
|
||||
</includes>
|
||||
<argLine>-XX:+EnableDynamicAgentLoading -noverify</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>mutation</id>
|
||||
<build>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue