Skip to content

golemTest your plugin the way players use it

One command boots a real PocketMine-MP server, loads your plugin from source and fills it with simulated players. Run it in your terminal, in CI, or from a dashboard in your browser. No mocks, no client, no more testing by hand.

The Golem pixel-art head

Twenty seconds of Golem โ€‹

A test spawns Steve, he joins a real server, gets greeted, and the test checks it. Then the same thing for every behaviour of your plugin, in one command.

php
public function testGreetsPlayersByName(): Generator
{
    $steve = yield $this->golem('Steve');

    $this->assertReceivedMessage($steve, 'Welcome, Steve!');
    $this->assertHasItem($steve, VanillaItems::BREAD(), 3);
}

Three steps โ€‹

From a plugin with no tests to a green run in about five minutes.

Install โ€‹

Golem is a dev dependency. The CLI itself needs nothing else.

bash
composer require --dev achedon12/golem

Scaffold โ€‹

A first test and a GitHub Actions workflow.

bash
vendor/bin/golem init

Run โ€‹

Boots a server, runs every test, stops it. Or open the dashboard.

bash
vendor/bin/golem
vendor/bin/golem ui

Results as they happen โ€‹

Each test reports as soon as it finishes, with how long it took in milliseconds and server ticks. This is the real output of the example plugin shipped with Golem.

Golem output: every test of the example plugin passing

And when it breaks โ€‹

You see what was expected, what the server actually sent, and the exact line of your test.

A failing test with expected and actual values and the failing line

Or click through it all โ€‹

vendor/bin/golem ui opens a dashboard on your machine: pick tests, watch them pass live, open a failure next to the line that broke, see which lines of your plugin your tests never ran. Fuzz, benchmark, and build tests without writing PHP, from the same page.

The Golem dashboard: the tests of a plugin, a failure with the expected and actual values and the line that failedOpen the live demo โ†’

Every pull request, tested โ€‹

Add one step to your workflow. PocketMine is cached between runs, a JUnit report is written, and failures are annotated right on the diff.

yaml
jobs:
  golem:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: achedon12/golem@v0

Stop testing your plugin by hand โ€‹

Golem is open source (MIT) and young: feedback shapes what comes next.

Released under the MIT License.