Skip to main content

Example Configuration

In your build.gradle.kts:

Configuration Options

minecraftVersion
Property<String>
required
The Minecraft version to use for testing. Default is "1.19.4".
runDir
DirectoryProperty
Directory where the test server will be located. Default is project.layout.projectDirectory.dir("run").
testsDir
DirectoryProperty
Directory containing test files. Default is file("src/test/e2e").
acceptEula
Property<Boolean>
Automatically accept Minecraft EULA, if you agree to the Minecraft EULA. Default is true.
cleanExcludePatterns
ListProperty<String>
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 executable
  • cache - Minecraft/Paper cache folder
  • libraries - Server dependencies
Everything else in the run directory will be deleted to ensure a clean test environment.
useExternalPluginsOnly
Property<Boolean>
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.
downloadPlugins
Action<PluginDownloadSpec>
Download external plugins (like dependencies) before starting the server.
jvmArgs
ListProperty<String>
Arguments to pass to the Java virtual machine when starting the test server. Default is listOf("-Xmx2G").
writeFiles
Action<RunDirFileSpec>
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

PLUGWRIGHT_DEBUG
String
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.