Ward runs automated tests for Minecraft datapacks. Tests are 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 and runs your packs on one or more Minecraft versions. Java and the mod are downloaded for you. Also ships a beet plugin that adds beet test. |
Quickstart
Install the CLI (requires Python 3.14 or newer):
uv tool install mcward[cli] # or: pip install mcward[cli]
Write a test in your datapack under data/<namespace>/test/:
# @max_ticks 20
summon minecraft:zombie ~ ~ ~ {Tags: ["target"]}
kill @e[tag=target]
await not entity @e[tag=target]
Ward finds your packs, picks matching versions, and runs the tests:
ward
Comments starting with @ are directives. They configure the test.
await and assert are the test commands.
Documentation
- Test commands:
/assert,/await,/fail,/succeed - Test environments: world setup/teardown around tests
- Directives:
@max_ticks,@environment, ... - Dummies: fake players and the
/dummycommand - Coverage: which parts of your packs the tests run
- CLI: the
mcwardCLI andbeet test
Acknowledgements
Ward is heavily inspired by packtest by misode, and implements its full command set.
Release files for mcward 1.2.0
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.2.0.tar.gz | 2.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcward-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.4 MB
Release files / mcward-1.2.0.tar.gz
| Download URL | mcward-1.2.0.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c5b6249608592b1e3ad9b470e395bd040f5c52ab8c82c4aca0080ac0f3132ff
|
|
BLAKE2b-256 checksum How to use checksums |
4eb806eeb08fe875dc5b8ee4ed3573000b844911e897a3698287862208e1f058
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","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.2.0-py3-none-any.whl
| Download URL | mcward-1.2.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7aa398e7298bf96101113ac5ee31b9fa4bb1e7a37a227f8f05e41f2d3ebc2908
|
|
BLAKE2b-256 checksum How to use checksums |
ec2af016cb96a4d26e0496f90c21d2c9c136602ddaa11c61e3b1b2ea2f061f5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","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}
|