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.
Release files for mcward 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcward-1.1.1.tar.gz | 2.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcward-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.4 MB
Release files / mcward-1.1.1.tar.gz
| Download URL | mcward-1.1.1.tar.gz |
|---|---|
| Size | 2.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a74aea118c0f3a94727bec65890195be50eb4b3ff096c017b946e567b1b32dab
|
|
BLAKE2b-256 checksum How to use checksums |
8c9f18845d6d5fb559f6b6289d073525d9fdd7b14842b5b291d2b85bd42a71b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","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}
|
Release files / mcward-1.1.1-py3-none-any.whl
| Download URL | mcward-1.1.1-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13593ade655464227ff2d7466748e9049d88679d2f60780c226bf1af61513da7
|
|
BLAKE2b-256 checksum How to use checksums |
d1444ca5c500d51e17b167ae89c84626607c210e1cae38dc0ec03f8a7c2d4e58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","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}
|