Skip to main content
1

Prerequisites

Before you begin, you need:
  • Java 17 or higher
  • Gradle 7 or higher
  • Node.js (for running the test runner, can be downloaded automatically by using downloadNode setting)
  • A Paper/Spigot plugin project
2

Installation

Add Plugwright to your build.gradle.kts file:
If you already have Node.js installed on your system, you can comment out downloadNode.set(true) to speed up initialization. Otherwise, leave it uncommented.
If npm at your company goes through a private registry, add an npm { } block now — the next step installs packages, and it will need it:
Plugwright writes that to a gitignored .npmrc in the workspace before each install. See Configuration.
3

Initialization

Run the init command to set up your test folder. It asks where to put it, then writes an npm project with a package.json, a TypeScript config, a .gitignore, an example spec and an example runner plugin:
Everything a run generates — the compiled specs, the server the local environment starts — stays inside that directory, under dist and generated. See Project Layout.
4

Your First Test

Run your tests:
Plugwright hooks into your build process and tests against your compiled plugin jar. Ensure your plugin compiles successfully (e.g. jar or shadowJar task) before running tests!