Maven
Dependencies
- Ubuntu / Debian
- Arch
- macOS
- Windows
sudo apt install default-jdk maven
sudo pacman -S jdk-openjdk maven
brew install openjdk maven
choco install microsoft-openjdk maven
Version requirements
Initialize a project
Initialize CI Fuzz in the root directory of your Maven project with the following command:
cifuzz init
Add Maven extension
To enable fuzz testing in your project, add the CI Fuzz Maven extension to your projects pom.xml
:
pom.xml
<build>
<extensions>
<extension>
<groupId>com.code-intelligence</groupId>
<artifactId>cifuzz-maven-extension</artifactId>
<version>1.13.2</version>
</extension>
</extensions>
</build>
Multi-project setup
CI Fuzz currently supports multi-project setups with Maven by initializing cifuzz
in the sub-projects instead of the
root project. Additionally the sub-projects need the following property defined in it's pom.xml
:
pom.xml
<properties>
<cifuzz.fuzztests>true</cifuzz.fuzztests>
</properties>
JUnit
JUnit 5 executes the fuzz tests. If it's not already set up, the plugin automatically adds the required dependencies and configuration to your project. If you are using JUnit 4, be aware that CI Fuzz requires the JUnit Vintage engine to run both JUnit 4 and JUnit 5 tests in one project. See the official JUnit documentation for more information.