Skip to main content

Example Configuration

In your build.gradle.kts:

Configuration Options

Property<String>
required
The Minecraft version to use for testing. Default is "1.19.4".
DirectoryProperty
Directory where the test server will be located. Default is project.layout.projectDirectory.dir("run").
DirectoryProperty
Directory containing test files. Default is file("src/test/e2e").
Property<Boolean>
Automatically accept Minecraft EULA, if you agree to the Minecraft EULA. Default is true.
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.
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.
Action<PluginDownloadSpec>
Download external plugins (like dependencies) before starting the server.
ListProperty<String>
Arguments to pass to the Java virtual machine when starting the test server. Default is listOf("-Xmx2G").
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.
Property<Boolean>
Whether to automatically download Node.js for running tests. Default is false: the system-installed node/npm on your PATH are used, and the build fails with instructions if Node.js is not installed. When true, the plugin downloads a Node.js distribution into a shared per-user cache in the Gradle user home (~/.gradle/caches/plugwright/node), verifies it against the official SHASUMS256.txt checksums from nodejs.org, and uses it for all node/npm invocations. The cache is keyed by version, OS and architecture, shared across all projects, and survives gradle clean.
Property<String>
The Node.js version to download and use when downloadNode is true. Default is "22.14.0".

Environment Variables

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.