<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3ACommands%2Fgametest</id>
	<title>Minecraft:Commands/gametest - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3ACommands%2Fgametest"/>
	<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Commands/gametest&amp;action=history"/>
	<updated>2026-04-09T09:24:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.sasgaming.net/index.php?title=Minecraft:Commands/gametest&amp;diff=49649&amp;oldid=prev</id>
		<title>imported&gt;MinecraftBedrockPlayer7: /* History */</title>
		<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Commands/gametest&amp;diff=49649&amp;oldid=prev"/>
		<updated>2025-10-07T09:03:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;History&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{exclusive|bedrock}}&lt;br /&gt;
{{Infobox command&lt;br /&gt;
|name=gametest&lt;br /&gt;
|oplevel=1&lt;br /&gt;
|cheat=y&lt;br /&gt;
}}&lt;br /&gt;
Runs a unit test (also called a &amp;#039;&amp;#039;GameTest&amp;#039;&amp;#039;) from an [[Minecraft:add-on]] package containing [[Minecraft:GameTest]] script files.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
A unit test (or GameTest) can be registered in an add-on using the GameTest framework, which is paired with a [[Minecraft:.mcstructure]] file. See {{slink|GameTest|Bedrock Edition}}.&lt;br /&gt;
&lt;br /&gt;
Place a structure block and type the ID (in the format of &amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;lt;testClassName&amp;gt;&amp;#039;&amp;#039;:&amp;#039;&amp;#039;&amp;lt;testName&amp;gt;&amp;#039;&amp;#039;&amp;lt;/code&amp;gt;) in it, then execute &amp;lt;code&amp;gt;gametest runthis&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;gametest runthese&amp;lt;/code&amp;gt; for multiple structure blocks) to run the unit test in the [[Minecraft:world]]. Note that the &amp;quot;structure name&amp;quot; in structure block should be the ID of the unit test instead of structure&amp;#039;s ID.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;gametest run ..&amp;lt;/code&amp;gt; can automatically place the test structure and run the test function from a unit test.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;gametest runset ...&amp;lt;/code&amp;gt; can automatically run all unit tests in the specified class at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;gametest create ..&amp;lt;/code&amp;gt; can place a save mode structure block, a platform made of polished andesite, there-block-thick dirt base, and a command block with a stone button attached on it. It is useful for developers to create a new structure for the unit test.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
:&amp;lt;code&amp;gt;gametest runthis&amp;lt;/code&amp;gt;&lt;br /&gt;
::Finds the nearest structure block within 15 blocks radius, and then tries to run GameTest with the ID specified in the structure block.&lt;br /&gt;
:&amp;lt;code&amp;gt;gametest run &amp;lt;testName: string&amp;gt; &amp;lt;stopOnFailure: Boolean&amp;gt; &amp;lt;repeatCount: int&amp;gt; [rotationSteps: int]&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;gametest run &amp;lt;testName: string&amp;gt; [rotationSteps: int]&amp;lt;/code&amp;gt;&lt;br /&gt;
::Runs a specific GameTest.&lt;br /&gt;
:&amp;lt;code&amp;gt;gametest runthese&amp;lt;/code&amp;gt;&lt;br /&gt;
::Finds all structure blocks within 200 blocks radius, and then tries to run GameTests with the IDs specified in the structure blocks.&lt;br /&gt;
:&amp;lt;code&amp;gt;gametest runset [tag: string] [rotationSteps: int]&amp;lt;/code&amp;gt;&lt;br /&gt;
::Creates and runs all GameTests in this class (&amp;lt;code&amp;gt;tag: GameTestTag&amp;lt;/code&amp;gt;).&lt;br /&gt;
:&amp;lt;code&amp;gt;gametest clearall&amp;lt;/code&amp;gt;&lt;br /&gt;
::Clears all GameTests.&lt;br /&gt;
:&amp;lt;code&amp;gt;gametest create &amp;lt;testName: string&amp;gt; [width: int] [height: int] [depth: int]&amp;lt;/code&amp;gt;&lt;br /&gt;
::Places structure block, command block, and polished andesite platform and dirt base.&lt;br /&gt;
:&amp;lt;code&amp;gt;gametest pos&amp;lt;/code&amp;gt;&lt;br /&gt;
::Finds nearest structure block within 200 blocks radius.&lt;br /&gt;
:&amp;lt;code&amp;gt;gametest stopall&amp;lt;/code&amp;gt;&lt;br /&gt;
::Manually stops all tests while they are running.&lt;br /&gt;
:&amp;lt;code&amp;gt;gametest runsetuntilfail [tag: string] [rotationSteps: int]&amp;lt;/code&amp;gt;&lt;br /&gt;
::Creates and runs all GameTests in the class, but automatically stops if any of the tests fail.&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
{{argument|be=1|testName: string|string}}&lt;br /&gt;
: Specified a string as gametest ID.&lt;br /&gt;
:{{arg desc|be=string}}&lt;br /&gt;
&lt;br /&gt;
{{argument|be=1|repeatCount: int|int}}&lt;br /&gt;
: Specifies the times the gametest repeats.&lt;br /&gt;
:{{arg desc|be=int}} And it must greater than 0.&lt;br /&gt;
&lt;br /&gt;
{{argument|be=1|stopOnFailure: Boolean|enum}}&lt;br /&gt;
: Specifies whether to continue with the next repetition when current test fails.&lt;br /&gt;
:{{arg desc|be=bool}}&lt;br /&gt;
&lt;br /&gt;
{{argument|be=1|rotationSteps: int|int}}&lt;br /&gt;
: Specifies the angle by which the gametest is rotate.&lt;br /&gt;
: 1 means 90° clockwise; 2 means 180°; 3 means 270° clockwise. Otherwise the gametest won&amp;#039;t be rotated.&lt;br /&gt;
:{{arg desc|be=int}}&lt;br /&gt;
&lt;br /&gt;
{{argument|be=1|tag: string|string}}&lt;br /&gt;
: Specifies GameTest class to run.&lt;br /&gt;
: Must be an existing Gametest class ID.&lt;br /&gt;
&lt;br /&gt;
{{argument|be=1|width: int|int}}&lt;br /&gt;
: Specifies x-axis width of the polished andesite platform and of the structure. Defaults to 5.&lt;br /&gt;
:{{arg desc|be=int}} And it should be less than or equal to 48.&lt;br /&gt;
&lt;br /&gt;
{{argument|be=1|height: int|int}}&lt;br /&gt;
: Specifies y-axis height of the polished andesite platform and of the structure. Defaults to 5.&lt;br /&gt;
:{{arg desc|be=int}} And it should be less than or equal to 48.&lt;br /&gt;
&lt;br /&gt;
{{argument|be=1|depth: int|int}}&lt;br /&gt;
: Specifies z-axis width of the polished andesite platform and of the structure. Defaults to 5.&lt;br /&gt;
:{{arg desc|be=int}} And it should be less than or equal to 48.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
{{HistoryTable&lt;br /&gt;
|{{HistoryLine|bedrock}}&lt;br /&gt;
|{{HistoryLine||1.16.210|dev=beta 1.16.210.60|Added {{cd|/gametest}}.}}&lt;br /&gt;
|{{HistoryLine||1.16.220|dev=1.16.220.02|Added {{cd|stopOnFailure: Boolean}} and {{cd|repeatCount: int}} into {{cd|/gametest run ...}}.}}&lt;br /&gt;
|{{HistoryLine||1.17.0|dev=beta 1.16.230.50|Changed {{cd|/gametest runall}} to {{cd|/gametest runset}}.}}&lt;br /&gt;
|{{HistoryLine||1.18.30|dev=beta 1.18.20.27|Removed &amp;lt;code&amp;gt;radius: int&amp;lt;/code&amp;gt; argument in &amp;lt;code&amp;gt;gametest clearall&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
|{{HistoryLine||1.19.80|dev=Preview 1.19.80.22|Added &amp;lt;code&amp;gt;stopall&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;runsetuntilfail&amp;lt;/code&amp;gt; subcommands.}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* {{Cite|url=https://learn.microsoft.com/en-us/minecraft/creator/commands/commands/gametest?view=minecraft-bedrock-stable|title=&amp;lt;code&amp;gt;/gametest&amp;lt;/code&amp;gt; Command|website=Microsoft Learn|date=October 11, 2023}}&lt;br /&gt;
&lt;br /&gt;
== Navigation ==&lt;br /&gt;
{{Navbox commands}}&lt;br /&gt;
&lt;br /&gt;
[[Minecraft:de:Befehl/gametest]]&lt;br /&gt;
[[Minecraft:lzh:令/gametest]]&lt;br /&gt;
[[Minecraft:pt:Comandos/gametest]]&lt;br /&gt;
[[Minecraft:ru:Команды консоли/gametest]]&lt;br /&gt;
[[Minecraft:zh:命令/gametest]]&lt;br /&gt;
[[Minecraft:ja:コマンド/gametest]]&lt;/div&gt;</summary>
		<author><name>imported&gt;MinecraftBedrockPlayer7</name></author>
	</entry>
</feed>