Example Configuration
In yourbuild.gradle.kts:
Configuration Options
The Minecraft version to use for testing. Default is
"1.19.4".Directory where the test server will be located. Default is
project.layout.projectDirectory.dir("run").Directory containing test files. Default is
file("src/test/e2e").Automatically accept Minecraft EULA, if you agree to the Minecraft EULA. Default is
true.Configures which files or folders in the
runDir should not be deleted when the plugwrightClean task runs. This is useful for preserving the server JAR, dependency caches, or other persistent data between test runs. Default is listOf("server.jar", "cache", "libraries").By default, the cleanup preserves:server.jar- The Paper server executablecache- Minecraft/Paper cache folderlibraries- Server dependencies
Whether to use only externally downloaded plugins instead of building the project plugin. When true, the
plugwrightTest task will not depend on jar/shadowJar/reobfJar tasks. Useful when running E2E tests with plugins downloaded from external sources only. Default is false.Download external plugins (like dependencies) before starting the server.
Arguments to pass to the Java virtual machine when starting the test server. Default is
listOf("-Xmx2G").Stage files into the run directory before the server starts. You can provide inline text content or copy from an existing local file. Paths are relative to the run directory.
Environment Variables
Set
PLUGWRIGHT_DEBUG=1 in your environment to enable verbose debug logging during test execution. This is particularly useful for troubleshooting GUI flows and inspecting window open/close events from the bot.