Mod
Ward
No reviews yet
A testing framework for Minecraft datapacks using mcfunction.
Fabric is a mod loader for versions 1.14+ of Minecraft, particularly popular for client side and optimization mods.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
Ward
A testing framework for Minecraft datapacks using mcfunction.
Ward lets you write automated tests for your datapacks as plain .mcfunction
files in a test/ folder, executed through Minecraft's GameTest framework on
a real server — in-game, headless in CI, or live-reloading in daemon mode
while you develop.
Ward is two pieces that work together:
- The mod (Modrinth) — a Fabric mod
adding the test commands (
/assert,/await,/fail,/succeed,/dummy) and a headless test server that streams results live. - The tooling (PyPI) — the
mcwardCLI that installs test servers, runs your packs against one or several Minecraft versions with a live display, plus a beet plugin addingbeet test.
Quick start
Write tests in your datapack under data/<namespace>/test/:
# @timeout 100
summon minecraft:armor_stand ~ ~ ~ {Tags: ["target"]}
assert entity @e[tag=target]
await not entity @e[tag=target]
Test files support directives (# @timeout, # @optional, # @dummy,
# @template, # @environment, # @skyaccess) and the full command set:
| Command | Purpose |
|---|---|
assert [not] block/entity/data/score/chat/biome/predicate/items ... |
Assert immediately |
await [not] ... |
Retry every tick until true or timeout |
await delay <time> |
Pause the test |
fail [message] / succeed |
End the test explicitly |
dummy <player> spawn/leave/jump/use/attack/mine/... |
Control fake players |
Console
uv tool install mcward[cli] # or: pip install mcward[cli]
mcward test # discovers datapacks, picks compatible versions, runs
In-Game
/test run <name>- Run a specific test/test runall [namespace]- Run all tests (optionally filtered by namespace)/test runfailed- Re-run previously failed tests/test runthis- Run the closest test/test runthese- Run all tests within 200 blocks
Documentation
- Test commands —
/assert,/await,/fail,/succeed - Directives —
# @timeout,# @environment, ... - Dummies — fake players and the
/dummycommand - Test environments — world setup/teardown around tests
- Command-line tooling — the
mcwardCLI andbeet test
Commands
mcward test [-v <version>]... [-p <pack>]... [selector] # run tests (default command)
mcward install [version] # install a test server
mcward start / stop / status # manage the test daemon
mcward list [--remote] # installed / available versions
beet test # build the beet project and test it
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers