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. |
Quickstart
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 tests
Comment lines starting with @ are directives that
configure the test, and assert is one of the test commands.
Documentation
- 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
Acknowledgements
Ward is heavily inspired by packtest by misode, and implements its full command set.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcward-1.1.0.tar.gz.
File metadata
- Download URL: mcward-1.1.0.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f7e8e76166e7fc0f086cd9fce3411e562c43d4361074eaf13920dcd134065ae
|
|
| MD5 |
ea4b65f6159dc5d6fe3d2cd8348f317d
|
|
| BLAKE2b-256 |
90469bb379c03cfc6009ce735bf398a4639cc9e73b34bf6e1e32d5711c53b13b
|
File details
Details for the file mcward-1.1.0-py3-none-any.whl.
File metadata
- Download URL: mcward-1.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
368d32382ec86f6ecb75cdb3b8bf452960482a2319ecd921c912ad396e47409c
|
|
| MD5 |
2e8adda07313980717fc4f2b3bac61a2
|
|
| BLAKE2b-256 |
8b482d2409b0e3ed556271d988b5cb0338fa7cc34a2d9a4c6e954c2e46fc069e
|