Skip to content

Spike: plugwright in-game E2E tests (validates #329 on 1.8.0)#422

Merged
tastybento merged 3 commits into
developfrom
spike/plugwright-e2e
Jul 11, 2026
Merged

Spike: plugwright in-game E2E tests (validates #329 on 1.8.0)#422
tastybento merged 3 commits into
developfrom
spike/plugwright-e2e

Conversation

@tastybento

Copy link
Copy Markdown
Member

A working spike of plugwright for in-game / end-to-end testing — the layer our 517 MockBukkit unit tests can't reach. It boots a real Paper 1.21.11 server with BentoBox 3.14.0 + BSkyBlock 1.20.0 + the built Challenges jar, and drives a headless Mineflayer bot that runs commands and clicks GUIs.

It works — and it validated a 1.8.0 feature in-game

Two green tests (e2e/src/test/e2e/challenges.spec.ts):

That's a real end-to-end validation of the staged 1.8.0 release, in-game, on the exact target MC version.

How it's wired

  • A separate Gradle sidecar under e2e/ — does not touch the Maven build. Deploys prebuilt jars (useExternalPluginsOnly + writeFiles); BentoBox + BSkyBlock are downloaded (cached in .deps/), Challenges comes from ../target/.
  • Key gotcha (documented in e2e/README.md + build.gradle.kts): BentoBox addons must be staged into plugins/BentoBox/addons/, not plugins/ — otherwise they load as bare Paper plugins, no bskyblock_world is created, and every gamemode command returns "Unknown". This is the BentoBox bootstrap subtlety the spike was meant to surface.
  • CI: .github/workflows/e2e.yml runs on demand (workflow_dispatch) — advisory/opt-in, deliberately not on every PR yet (a run boots a server + generates worlds, ~1–2 min).

Findings / limits

  • 1.21.11 bot support, multi-plugin load, GUI clicks, Maven integration: all fine. Runs are ~30–40s locally.
  • Tests needing an island (block/biome/completion flows) still need island bootstrap (bot-driven /island create, or a pre-staged world via writeFiles) — a sensible next step if we want deeper coverage.

Opening as a spike for review — happy to expand coverage or drop it if the maintenance/runtime cost isn't worth it.

🤖 Generated with Claude Code

tastybento and others added 2 commits July 11, 2026 11:28
Boots a real Paper 1.21.11 server with BentoBox 3.14.0 + BSkyBlock 1.20.0
+ the Maven-built Challenges jar, and drives a headless Mineflayer bot to
verify in-game behaviour the MockBukkit unit tests can't.

A separate Gradle sidecar under e2e/ (does not touch the Maven build).
Uses useExternalPluginsOnly + writeFiles to deploy prebuilt jars; BentoBox
addons are staged into plugins/BentoBox/addons/ so they register as
gamemodes (the non-obvious part — dropping them in plugins/ leaves the
gamemode world uncreated and every gamemode command "Unknown").

Tests (src/test/e2e/challenges.spec.ts):
- smoke: bot joins 1.21.11, ops, runs a command, receives the reply.
- #329: opens the Challenges admin GUI, clicks Challenge Wipe, and asserts
  the confirmation instruction line added in #415 ("Type 'confirm' ... or
  'cancel' ...") — an end-to-end validation of a 1.8.0 feature in-game.

CI: .github/workflows/e2e.yml runs it on demand (workflow_dispatch) —
advisory/opt-in, not wired to every PR yet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
- workflow_dispatch input to filter by test name (-PtestNames)
- 25-min job timeout
- cache Paper jar + libraries + BentoBox/BSkyBlock deps + npm modules
- always upload server log + plugwright report as an artifact (so a
  regression failure is debuggable)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Comment thread .github/workflows/e2e.yml Fixed
Comment thread .github/workflows/e2e.yml Fixed
Comment thread .github/workflows/e2e.yml Fixed
- S7630 (BLOCKER, script injection): bind inputs.test_names to a
  TEST_NAMES env var and reference it as a quoted shell variable instead
  of interpolating ${{ inputs.* }} directly into the run block.
- S7637 (MAJOR, unpinned action): pin gradle/actions/setup-gradle to the
  v4.4.4 commit SHA.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
@sonarqubecloud

Copy link
Copy Markdown

@tastybento tastybento merged commit a2248a1 into develop Jul 11, 2026
3 checks passed
@tastybento tastybento deleted the spike/plugwright-e2e branch July 11, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants