Wiki 9Minecraft Wiki 9Minecraft

Debug Test Failures and View Detailed Output

Java EditionModGuides 4FAQ 10Related mods 48
DownloadSwift Adventure Lab Mod

Get the files on 9Minecraft

Contents (4)
  1. Read the Chat Output
  2. Re-run Failed Tests Only
  3. Use Fail Messages for Clarity
  4. Test Nearby Tests

Read the Chat Output

When you run /test runall, the mod displays results in chat. Each test shows either a checkmark (pass) or an X (fail). Click on failed tests to see detailed error messages explaining what assertion failed.

Re-run Failed Tests Only

After a test run, use /test runfailed to quickly re-execute only the tests that failed. This speeds up debugging without re-running passing tests.

Use Fail Messages for Clarity

Instead of relying on silent failures, use the /fail command with a descriptive message:

`

/assert entity @e[type=zombie]

/fail No zombies found in the test area

`

When this assertion fails, your custom message appears in the output.

Test Nearby Tests

If you're working on multiple tests in one area, use /test runthese to run all tests within 200 blocks of your position. This helps isolate which tests are affected by your changes.

More guides for this mod