Skip to content

Live Server Tests

m4bwav edited this page Oct 28, 2026 · 1 revision

minewright-server tests an add-on live on Bedrock Dedicated Server (BDS). Its outcome: the add-on's packs load on a real Bedrock server, its self-test prints [MWTEST] PASS for every check, and the reply quotes the JSON report from bds_run.py, not a belief that it would work.

Files: skills/minewright-server/SKILL.md and scripts/bds_run.py (standard-library Python 3.9+). Tier moderate. The options and real runs are on Checks and the BDS harness.

Getting BDS, once, with your yes

BDS ships for Windows and Linux x64 only. The download is about 89 MB from minecraft.net and comes under the Minecraft EULA. The skill asks before the first download; your yes is the --download flag. The server goes to %LOCALAPPDATA%\minewright\bds\<version> on Windows or ~/.cache/minewright/bds/<version> elsewhere. The default version is 1.26.60.6. Without --download and without a cached copy, the script stops with exit 2 and downloads nothing. --bds-dir uses a BDS folder you already have.

What a run does

  1. Copies BDS to a temporary instance.
  2. Creates worlds/mwtest/ with every folder under the project that holds a manifest.json, listed in world_behavior_packs.json and world_resource_packs.json.
  3. Sets server.properties: the test world, a free port, cheats on, an allow-list with nobody on it, and the content log on the console.
  4. Adds any script module the packs need to config/default/permissions.json.
  5. Starts the server and waits for Server started..
  6. Sends each --cmd (or each line of --cmd-file).
  7. Reads the console until [MWTEST] DONE, every --expect name, or --wait seconds (default 20).
  8. Sends stop, deletes the instance unless --keep, and prints one JSON report.

Build first: the packs are copied as they are on disk.

The self-test contract

The add-on answers a script event with one line per check, printed with console.warn:

[MWTEST] PASS <name>
[MWTEST] FAIL <name> <why>
[MWTEST] DONE

No PASS marker at all usually means the script never loaded. The report's errors then names a module version the server lacks (the error lists the versions it has) or a runtime exception with file and line.

What was verified on BDS 1.26.60.6

From the skill, on Windows on 2026-10-27, and seen again in the runs on Checks and the BDS harness:

  • Startup to Server started. takes a few seconds on a fresh world. The example's run took 7 seconds from start to stop.
  • scriptevent sent from the server console reaches system.afterEvents.scriptEventReceive.
  • console.warn output appears as [... WARN] [Scripting] [MWTEST] PASS <name>.
  • A Custom Command alias [summon] already in use warning is expected when an add-on's command shares a vanilla name, and is not an error.
  • A behavior entity with a component its format_version no longer accepts fails with an [Actor] error; bds_run.py counts it. Only the server catches this.
  • Not testable on BDS: the resource pack (the console's pack stack lists only the behavior pack), JSON UI, textures, sounds and anything a player does.

GameTest, if you insist

@minecraft/server-gametest has never had a stable release: it needs the Beta APIs experiment, and that makes a world experimental for good. If you want it anyway, use a separate throwaway world. The commands are /gametest run <name>, runset, runthese, runthis and similar; there is no /gametest runall. The skill defaults to the scriptevent self-test.

Script debugging

Set allow-outbound-script-debugging, allow-inbound-script-debugging and force-inbound-debug-port (default 19144) in server.properties, then attach Microsoft's Minecraft debugger extension in VS Code.

The module allowlist

The shipped permissions.json already allows @minecraft/server, server-ui, server-admin, server-gametest, server-editor and debug-utilities. @minecraft/server-net (BDS only) must be added; bds_run.py adds it when a pack depends on it.

Playing on a local server from the Windows app needs a loopback exemption: see Platforms and install.

Clone this wiki locally