Skip to content

Golem 0.4.0

Choose a tag to compare

@achedon12 achedon12 released this 08 Oct 09:03
· 18 commits to main since this release
975cf4a

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-tests

Benchmarks. 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.json

Recording. 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=4 splits the tests between servers: the example suite runs in 20 s instead of 43 s.
  • golems(20) brings 20 golems in at once.
  • --coverage now measures lines too, with the Xdebug build shipped with PocketMine's PHP; --coverage-clover writes a report for Codecov.
  • assertMatchesSnapshot(), --compare to see what changes on another server or fork, --teamcity output.

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.