Skip to content

Repository files navigation

Ward

CI   Modrinth   PyPI   Discord

Ward lets you write automated tests for your datapacks as plain .mcfunction files in a test/ folder.

demo

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

Acknowledgements

Ward is heavily inspired by packtest by misode, and implements its full command set.

About

A testing framework for Minecraft datapacks using mcfunction.

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages