Overview
Add Anvil to a Gradle build and run your first test against a real server.
Anvil runs the Minecraft environment that your test needs: server and proxy processes, installed plugins, and native protocol players. Your test remains ordinary Java using JUnit Jupiter.
Follow these three stages:
- Concepts — explore each part of the environment through focused explanations, examples, and use cases.
- Installation — configure Gradle and install the components for the example.
- First test — start Paper, connect a player, and assert a received message.
After the first test passes, use Building blocks to prepare your own environment and players. Then choose a workflow: automated Testing or a prepared Scenario you join with a real client.
You need a Java 21 or newer build environment, Gradle, network access for the first downloads, and enough memory to run the selected processes. Anvil runs each managed process on the LTS Java release its platform version prefers, separately from the JVM running your build.
Already have a working environment? Choose Testing to automate a journey, or Scenarios to make it available for human testing.