Gradle
Dependencies
- Ubuntu / Debian
- Arch
- macOS
- Windows
sudo apt install default-jdk gradle
sudo pacman -S jdk-openjdk gradle
brew install openjdk gradle
choco install microsoft-openjdk gradle
Version requirements
Android limitations
Android fuzz tests running in an emulator or on a device aren't supported, but it's still possible to run local tests. This requires the following prerequisites:
- Gradle >= 7.5
- Android Gradle Plugin >= 7.4.2
Initialize a project
Initialize CI Fuzz in the root directory of your Gradle project with the following command:
cifuzz init
Add Gradle plugin
Add the CI Fuzz Gradle plugin to your projects build file to enable fuzz testing:
- Groovy
- Kotlin
plugins {
id "com.code-intelligence.cifuzz" version "1.23.2"
}
plugins {
id("com.code-intelligence.cifuzz") version "1.23.2"
}
JUnit
Fuzz tests are executed with JUnit 5. 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.
Depending on your specific setup, you might need to add the following dependency:
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.4")