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.
3

Initialization

Run the init command to set up your test folder. This will automatically generate your package.json, TypeScript configuration, and an example test in a chosen directory.This command is interactive, so simply follow the prompts on your screen:
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!