Skip to content

Golem 0.1.0

Choose a tag to compare

@achedon12 achedon12 released this 07 Oct 13:58
· 65 commits to main since this release

The first public release of Golem, integration tests for PocketMine-MP plugins.

One command boots a real PocketMine-MP server, loads your plugin from source, and runs tests in which simulated players (golems) join, chat, run commands, answer forms and break blocks.

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

    $this->assertReceivedMessage($steve, 'Welcome, Steve!');
}

Highlights

  • Zero setup: the official PocketMine PHP build and server phar are downloaded once and cached.
  • Golems are real Player objects: every join event fires, permissions, inventories and forms behave exactly like in production.
  • Time-aware tests: yield $this->wait(20), yield $this->waitUntil(...).
  • Clear failures: expected vs actual, and the failing line of your test.
  • CI ready: JUnit reports, GitHub annotations, and a one-line action:
- uses: achedon12/golem@v0

Get started

composer require --dev achedon12/golem
vendor/bin/golem init
vendor/bin/golem

Read the getting started guide, and see the changelog for the full list.

Golem is 0.x: feedback shapes what comes next, so please open an issue or start a discussion.