Run the example test
/test run minecraft:always_passRuns the only test of the base game and reports the result in chat.

/test runs, creates and manages GameTests, automated tests built from a structure and test logic. Mojang uses this framework to check game mechanics, and data pack authors can use it to verify that their contraptions and functions still work.
/test (clearall|clearthat|clearthese|create|locate|pos|resetclosest|resetthat|resetthese|run|runclosest|runfailed|runmultiple|runthat|runthese|stop|verify)/test clearall/test clearall [<radius>]| Argument | Expects | What it does |
|---|---|---|
| radiusoptional | Whole number | Distance in blocks around you within which test structures are removed. |
/test clearthat/test clearthat/test clearthese/test clearthese/test create/test create <id> [<width> [<height> <depth>]]| Argument | Expects | What it does |
|---|---|---|
| id | Resource ID | ID of the new test, such as blockaria:door_test, in your own namespace. |
| widthoptional | Whole number | Width of the test area, in blocks. |
| heightoptional | Whole number | Height of the test area, in blocks, given together with depth. |
| depthoptional | Whole number | Depth of the test area, in blocks, given together with height. |
/test locate/test locate <tests>| Argument | Expects | What it does |
|---|---|---|
| tests | IDs (wildcards) · test_instance | Tests to target: an ID like minecraft:always_pass, or a pattern matching several tests. |
/test pos/test pos [<var>]| Argument | Expects | What it does |
|---|---|---|
| varoptional | Textone word | Optional name used for the position in the result printed in chat. |
/test resetclosest/test resetclosest/test resetthat/test resetthat/test resetthese/test resetthese/test run/test run <tests> [<numberOfTimes> [<untilFailed> [<rotationSteps> [<testsPerRow>]]]]| Argument | Expects | What it does |
|---|---|---|
| tests | IDs (wildcards) · test_instance | Tests to target: an ID like minecraft:always_pass, or a pattern matching several tests. |
| numberOfTimesoptional | Whole numberat least 0 | How many times each test runs, 0 or more. |
| untilFailedoptional | true / false | true stops the repetitions as soon as a test fails. |
| rotationStepsoptional | Whole number | Number of quarter turns applied to the test structure before it runs. |
| testsPerRowoptional | Whole number | How many tests are placed side by side in each row. |
/test runclosest/test runclosest [<numberOfTimes> [<untilFailed>]]| Argument | Expects | What it does |
|---|---|---|
| numberOfTimesoptional | Whole numberat least 0 | How many times each test runs, 0 or more. |
| untilFailedoptional | true / false | true stops the repetitions as soon as a test fails. |
/test runfailed/test runfailed [<numberOfTimes>|<onlyRequiredTests>]| Argument | Expects | What it does |
|---|---|---|
| numberOfTimesoptional | Whole numberat least 0 | How many times each test runs, 0 or more. |
| untilFailedoptional | true / false | true stops the repetitions as soon as a test fails. |
| rotationStepsoptional | Whole number | Number of quarter turns applied to the test structure before it runs. |
| testsPerRowoptional | Whole number | How many tests are placed side by side in each row. |
| onlyRequiredTestsoptional | true / false | true runs again only the failed tests that are marked as required. |
/test runmultiple/test runmultiple <tests> [<amount>]| Argument | Expects | What it does |
|---|---|---|
| tests | IDs (wildcards) · test_instance | Tests to target: an ID like minecraft:always_pass, or a pattern matching several tests. |
| amountoptional | Whole number | Number of copies of the selected tests to run in this batch. |
/test runthat/test runthat [<numberOfTimes> [<untilFailed>]]| Argument | Expects | What it does |
|---|---|---|
| numberOfTimesoptional | Whole numberat least 0 | How many times each test runs, 0 or more. |
| untilFailedoptional | true / false | true stops the repetitions as soon as a test fails. |
/test runthese/test runthese [<numberOfTimes> [<untilFailed>]]| Argument | Expects | What it does |
|---|---|---|
| numberOfTimesoptional | Whole numberat least 0 | How many times each test runs, 0 or more. |
| untilFailedoptional | true / false | true stops the repetitions as soon as a test fails. |
/test stop/test stop/test verify/test verify <tests>| Argument | Expects | What it does |
|---|---|---|
| tests | IDs (wildcards) · test_instance | Tests to target: an ID like minecraft:always_pass, or a pattern matching several tests. |
/test run minecraft:always_passRuns the only test of the base game and reports the result in chat.
/test runclosestRuns the test closest to you, handy while building one.
/test create blockaria:door_test 5Sets up a new test named blockaria:door_test with a size of 5.
Fill in the fields, then copy the command.
Command generatorA test is a test_instance entry in a data pack: it names a structure, an environment and a type, function or block_based. The game ships a single example, minecraft:always_pass. In the world, each test is handled by a Test Instance Block. Install your test packs with /datapack.
test run takes one or more tests, runclosest runs the nearest one and runfailed repeats failures. The chat ends with Game Test complete! and the number of tests run. clearall removes test structures around you, and locate finds where tests are placed.
✓ Checked in Java Edition 26.3 · updated 2 November 2026
Only minecraft:always_pass, an example that passes right away. Other tests come from data packs or mods.
Run /test runfailed. With true as the first value, only failed tests marked as required are run again.
Type it in the chat with cheats on: /test clearall [<radius>].
Cheats on, or operator level 2.
It is in the official command tree since Java Edition 1.21.5.