/gametest Command in Minecraft Bedrock Edition

Run and Manage GameTest Framework Tests

Bedrock EditionDebug & DeveloperPermission: Game DirectorsCheats: Yes

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.

Syntax (10 forms)

  1. /gametest runthis

    Run block test

  2. /gametest run <testName: GameTestName> [rotationSteps: int]

    Run gametest

  3. /gametest run <testName: GameTestName> <stopOnFailure: Boolean> <repeatCount: int> [rotationSteps: int]

    Run gametest with custom stop

  4. /gametest runset [tag: GameTestTag] [rotationSteps: int]

    Run gametest with a tag

  5. /gametest runsetuntilfail [tag: GameTestTag] [rotationSteps: int]

    Run gametest until failure

  6. /gametest clearall

    Clear all tests

  7. /gametest pos

    Show gametest origin

  8. /gametest create <testName: string> [width: int] [height: int] [depth: int]

    Creates a new gametest

  9. /gametest runthese

    Run nearby tests

  10. /gametest stopall

    Stop all tests

Arguments

ArgumentTypeWhat it means
depthintAn integer that defines the depth of a newly created gametest.
repeatCountintAn integer that sets how many times the specified gametest will repeat.
stopOnFailureBooleanA true or false Boolean value that decides whether repeated test runs should halt if a failure happens.
testNameGameTestNameSpecifies the name of the gametest to run (as a GameTestName) or the name of a new test to create (as a text string).
widthintAn integer that defines the width of a newly created gametest.

Examples

Tips

Common mistakes

Bedrock vs Java

Minecraft Java Edition does not have a /gametest command with this name, so these commands can only be used in Bedrock Edition.

FAQ

Why does the /gametest command not show up in my game?

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.

How do I clean up the world after running tests?

You can type /gametest clearall to remove existing gametests and potentially any side effects they created.

What is the difference between runset and runsetuntilfail?

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.

Related commands

/help/project/reloadconfig/script