Run and Manage GameTest Framework Tests
The /gametest command configures parameters for managing built-in or custom GameTest framework tests in Minecraft Bedrock Edition. To use this command, your world must have cheats enabled and the Beta APIs experiment turned on.
Creators and testers use this command to build test structures, run automated checks on game mechanics, and clean up test areas when finished. You need the Game Directors permission level to execute it.
/gametest runthisRun block test
/gametest run <testName: GameTestName> [rotationSteps: int]Run gametest
/gametest run <testName: GameTestName> <stopOnFailure: Boolean> <repeatCount: int> [rotationSteps: int]Run gametest with custom stop
/gametest runset [tag: GameTestTag] [rotationSteps: int]Run gametest with a tag
/gametest runsetuntilfail [tag: GameTestTag] [rotationSteps: int]Run gametest until failure
/gametest clearallClear all tests
/gametest posShow gametest origin
/gametest create <testName: string> [width: int] [height: int] [depth: int]Creates a new gametest
/gametest runtheseRun nearby tests
/gametest stopallStop all tests
| Argument | Type | What it means |
|---|---|---|
depth | int | An integer that defines the depth of a newly created gametest. |
repeatCount | int | An integer that sets how many times the specified gametest will repeat. |
stopOnFailure | Boolean | A true or false Boolean value that decides whether repeated test runs should halt if a failure happens. |
testName | GameTestName | Specifies the name of the gametest to run (as a GameTestName) or the name of a new test to create (as a text string). |
width | int | An integer that defines the width of a newly created gametest. |
/gametest posShows the relative position of the origin of a gametest in the world.
/gametest runtheseExecutes all gametests located near your current position.
/gametest create my_piston_test 5 4 5Creates a new gametest named my_piston_test with a width of 5, height of 4, and depth of 5.
/gametest run custom:redstone_door 1Runs the custom:redstone_door test with 1 rotation step.
/gametest run custom:minecart_track true 3 2Runs the custom:minecart_track test 3 times with 2 rotation steps, stopping early if a failure occurs.
/gametest runset suite:mob_pathfinding 0Runs all gametests tagged with suite:mob_pathfinding using 0 rotation steps.
/gametest runsetuntilfail suite:fluid_flow 3Runs the set of tests tagged suite:fluid_flow with 3 rotation steps until one of the tests fails.
/gametest stopallImmediately stops all gametests that are currently running in the world.
/gametest clearallClears away all existing gametests and cleans up their side effects.
Minecraft Java Edition does not have a /gametest command with this name, so these commands can only be used in Bedrock Edition.
You must turn on both Cheats and the Beta APIs experiment in your world settings, and your player account needs the Game Directors permission level.
You can type /gametest clearall to remove existing gametests and potentially any side effects they created.
The runset mode runs an entire group of tagged gametests, while runsetuntilfail runs a tagged group of tests and stops as soon as a failure is detected.