Ward lets you write automated tests for your datapacks as plain .mcfunction files in a test/ folder.
A test run with ward, results stream in live.
Ward comes in two parts:
| 🧩 Mod - Modrinth | Adds the test commands (/assert, /await, /fail, /succeed, /dummy) and a headless test server that streams results live. |
| 🐍 CLI - PyPI | Installs test servers (Java and the mod are fetched for you) and runs your packs on one or several Minecraft versions. Also ships a beet plugin that adds beet test. |
Install the CLI:
uv tool install mcward[cli] # or: pip install mcward[cli]Write a test in your datapack under data/<namespace>/test/:
# @max_ticks 100
summon minecraft:armor_stand ~ ~ ~ {Tags: ["target"]}
assert entity @e[tag=target]Run it:
ward # discovers your packs, picks compatible versions, runs the testsComment lines starting with @ are directives that
configure the test, and assert is one of the test commands.
- CLI — the
mcwardCLI andbeet test - Dummies — fake players and the
/dummycommand - Directives —
@max_ticks,@environment, ... - Test commands —
/assert,/await,/fail,/succeed - Test environments — world setup/teardown around tests
Ward is heavily inspired by packtest by misode, and implements its full command set.
