Repository navigation
Releases: achedon12/golem
Release list
Golem 0.7.0
Golem 0.7.0 tells you how good your tests are, not only whether they pass.
Mutation testing. golem mutate changes your code one small mutation at a time (=== into !==, < into <=, true into false…) and runs the tests that cover each line. The mutants nobody notices are the bugs your tests would let through:
✗ survived src/HelloWorld.php:110 < → <=
- if ($event->getFrom()->x < $arenaStart && $event->getTo()->x >= $arenaStart) {
+ if ($event->getFrom()->x <= $arenaStart && $event->getTo()->x >= $arenaStart) {
Mutation score: 52.9% (9 of 17 mutants caught by the tests)
Flaky tests. --repeat=10 --random-order runs every test several times, shuffled, and lists those that pass in some runs and fail in others. The seed is printed to replay the order.
Plugins side by side. golem compat EssentialsMP libs/Economy.phar runs your tests alone, then with other plugins next to yours (phars, folders or Poggit names), and shows the tests that break and the commands another plugin takes. Every run now warns about command conflicts.
Reports. --report-html writes a self-contained HTML report. In GitHub Actions, comment: true posts a summary on the pull request and keeps it up to date.
Dashboard. Watch mode runs your picked tests again on every save, and the Mutation tab shows the mutants as they are tried.
Everything is in the changelog and the documentation.
Golem 0.6.0
Pick exactly the tests you want. In the dashboard (vendor/bin/golem ui), every class and test has a checkbox: run a handful of tests, a few classes, or only those that failed last time (Failed). Your choice is kept in the browser for next time.
Several filters. --filter takes patterns separated by | and runs the tests matching any of them:
vendor/bin/golem --filter='KitMenuTest|HealCommandTest::testRegular'The live demo has it too, and now says which test fails on purpose.
Everything is in the changelog.
Golem 0.5.1
A dashboard link to a tab (#scenario, #bench…) opened the Tests tab instead: fixed.
The home page, the README, Getting started and golem init now point to the dashboard. Try the live demo.
Everything is in the changelog.
Golem 0.5.0
Golem 0.5.0 brings a dashboard: run, fuzz, benchmark and build the tests of your PocketMine-MP plugin from your browser.
vendor/bin/golem uiTry it without installing anything: the live demo replays real runs on Golem's example plugin.
Tests, live. Pick all the tests, a class or one test, the server version or fork, servers in parallel, coverage. Results arrive as they run; a failure shows the expected and actual values next to the line that failed, and coverage colours the lines of your plugin that ran.
Fuzz and benchmark. Start golem fuzz and golem bench in a click: crashes and the tests that replay them, TPS and tick usage drawn as golems join, the slowest listeners.
Tests without PHP. The scenario editor builds a test from golems, actions and checks ("Steve runs /kits, clicks slot 2, has a diamond sword"), writes it in your tests folder and runs it.
History. Your last runs stay in the browser: run one again in a click, pin the settings you use often, follow your benchmarks over time.
The dashboard only runs on your machine (127.0.0.1, a token per session): nothing is uploaded anywhere.
Also: --log-events writes a run as JSON lines, $this->item('diamond_sword') in tests, and the documentation now keeps every version with a switcher.
Everything is in the changelog.
Golem 0.4.0
Golem 0.4.0 finds the bugs you did not write tests for, tells you when your plugin slows the server down, and turns both into tests.
Fuzzing. Golems do random things to your plugin for a minute (commands with odd arguments, invalid form answers, clicks, disconnections) and every exception is reported with the actions that led to it. --write-tests turns each crash into a test that replays it.
vendor/bin/golem fuzz --write-testsBenchmarks. Golems join a few at a time while Golem measures TPS, tick usage and memory, then lists your slowest listeners. Save a baseline and fail a pull request that makes things slower; assertTpsAbove() does the same inside a test.
vendor/bin/golem bench --players=50 --baseline=bench.jsonRecording. On your development server, /golem record, play the scenario once, /golem record stop: you get a test that replays it.
Faster, better reported runs.
--parallel=4splits the tests between servers: the example suite runs in 20 s instead of 43 s.golems(20)brings 20 golems in at once.--coveragenow measures lines too, with the Xdebug build shipped with PocketMine's PHP;--coverage-cloverwrites a report for Codecov.assertMatchesSnapshot(),--compareto see what changes on another server or fork,--teamcityoutput.
Note for the GitHub Action: v0 is now a branch instead of a tag. achedon12/golem@v0 keeps working.
Everything is in the changelog and the documentation.
Golem 0.3.0
Golem 0.3.0 adapts to the end of PocketMine-MP: test your plugin on the fork your server runs, and use Golem as a plugin on your development server.
Test on a fork. PocketMine-MP reached its end of support in July 2026. Golem now runs any fork that publishes releases like pmmp did:
vendor/bin/golem --pocketmine=Plutonium-Mcpe/PocketMine-MPGolem on your dev server. Download Golem.phar below, drop it in plugins/, and spawn simulated players by hand:
/golem spawn Rival
/golem Rival chat /duel accept
/golem Rival inbox
Poggit was sunset along with PocketMine-MP, so the plugin is distributed here, with every release.
Added
- Golem is also a PocketMine-MP plugin:
/golemspawns and controls golems on a development
server (#33).Golem.pharis attached to every GitHub release, and built on every push to
main(#37). Poggit was sunset along with PocketMine-MP, so it is not published there. - Golems wear a visible stone-grey skin instead of a transparent one.
--pocketmine=owner/repository[@tag](and the action'spocketmineinput) runs a PocketMine-MP
fork that publishes releases like pmmp, now that PocketMine-MP itself has reached its end of
support (#39).
Fixed
- The GitHub Action keeps a separate cache for each
pocketminevalue and no longer restores
another one's: a fork's code, which runs during the tests, could otherwise alter the cached PHP
build used by other runs. - The scoreboard reader understands newer protocols, where removals are flagged on each score
entry instead of on the whole packet. - Golems never save player data on the server (their
PlayerDataSaveEventis cancelled), so
/golem spawncan refuse every name with saved data or op status, without exceptions. - After a test, golems only lose the op status they did not have before spawning, so a name that
is a real operator keeps its rights.
Changed
- The plugin Golem injects into test servers is now named
GolemTestRunner.
Docs: forks · server plugin
Golem 0.2.0
Golem 0.2.0 makes golems behave much more like real players, and covers what most PocketMine servers are built from: minigame maps, menus, scoreboards, NPCs and virions.
yield $steve->walk(25, 0); // walls, gravity and fall damage included
$steve->chat('/shop');
yield $steve->waitForWindow();
$steve->clickSlot(0); // works with InvMenu
$this->assertScoreboardContains($steve, 'Online: 2');Upgrade with composer update achedon12/golem; the GitHub Action (achedon12/golem@v0) picks it up automatically.
Added
assertSoundPlayed(),assertPacketSent()andGolem::sounds()(#5).#[FreshWorld]and$this->freshWorld()to run a test in its own throwaway world (#8).--watchre-runs the tests whenever the plugin or its tests change (#24).- Inventory menus:
window(),waitForWindow(),clickSlot(),closeWindow(),assertWindowOpen()
andassertNoWindowOpen(). Works with InvMenu (#23). - Golems answer
NetworkStackLatencyPacketpings and acknowledge re-sent containers like a real
client, which InvMenu and some anti-cheats wait for. #[World('path')]and$this->loadWorld()to run a test in a copy of a world folder (#22).Golem::interactEntity(),Golem::respawn(),assertDead()andassertAlive()(#21).Golem::scoreboard(),Golem::bossBar(),assertScoreboardContains()andassertBossBar()(#20).#[DataProvider]to run a test once per data set (#19).assertKicked()andGolem::disconnectReason()(#18).- Golems move:
walkTo(),walk(),jump(),sneak()andsprint(), with collisions, step-up,
gravity and fall damage (#6). - Virions: the libraries listed in
.poggit.ymlare loaded (and downloaded from Poggit when
needed), plus any listed inextra.golem.virions(#7). - Documentation website at https://achedon12.github.io/golem/ and a wiki, both generated from
docs/.
Fixed
assertBlockAt()loads the chunk it checks, which used to read as air when no golem was nearby.- Virion downloads verify the TLS certificate (PocketMine's
Internethelper does not), only
follow HTTPS redirects, and are rejected unless they are virion phars. .poggit.ymlis only looked up in the plugin folder and its parents inside the same git
repository.- Golems now receive packets broadcast by the world (sounds, particles, entity animations), which
previously bypassed their inbox.
Full documentation: https://achedon12.github.io/golem/
Golem 0.1.1
The GitHub Action gets a unique name for the GitHub Marketplace: Golem PocketMine-MP Tests. Nothing else changes: keep using uses: achedon12/golem@v0.
See 0.1.0 for what Golem does.
Golem 0.1.0
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
Playerobjects: 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@v0Get started
composer require --dev achedon12/golem
vendor/bin/golem init
vendor/bin/golemRead 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.
