Get the files on 9Minecraft
Guides
Step-by-step, in-game.
Debug Test Failures and View Detailed OutputRead the Chat Output When you run /test runall , the mod displays results in chat. Each test shows either a checkmark…Set Up Your First Test in a Data PackCreate the Test Structure Inside your data pack's namespace folder, create a new directory path: functions/test/ .…Use Dummy Players to Test InteractionsSpawn a Dummy Player Dummy players are fake players you can control to simulate player actions. Spawn one using: `…Wait for Asynchronous Conditions with AwaitUnderstanding Await The /await command pauses your test and repeatedly checks a condition every game tick until it…
Frequently asked questions
How do I create my first test?
Create a folder named `test` inside your data pack's namespace directory (e.g., `data/mypack/function/test/`), then add an `.mcfunction` file with your test logic. Use `/assert` or `/await` commands to check conditions, and run `/test run ` to execute it.
What's the difference between /assert and /await?
`/assert` checks a condition immediately and fails the test if it's false, while `/await` repeatedly checks a condition each tick until it succeeds or times out, making it useful for testing events that happen over multiple ticks.
How do I test player interactions like mining or attacking?
Use the `/dummy` command to spawn a controllable fake player, then use `/dummy mine ` or `/dummy attack ` to make it perform actions. Clean up with `/dummy leave` when done.
Can I set up a test environment automatically?
Yes, use the `@template` directive at the top of your test file to load a structure, or use `@dummy` to pre-spawn fake players. You can also use `@timeout` to set how long a test can run before failing.
See all 10 Swift Adventure Lab questions ›
Gallery
4 images from the Swift Adventure Lab Mod page.
You May Also Like
Wikis that share the most with this one
More mod wikis on the site
The most downloaded mods that have a wiki here
A few wikis from each of the other kinds



