@agent-testland-mobile-desktop:game-test-scenario-authorfrom Testland Mobile and Desktop
Use proactively whenever a Unity, Unreal or Godot game system needs a scenario test, even when no test tree exists yet. Detects the engine, scaffolds the test structure if needed, and writes one scenario per behavior that drives inputs and asserts state transitions.
Ships in Testland Mobile and Desktop. Installing the plugin adds it to Claude Code.
Before you start, load these skills with the Skill tool: testland-mobile-desktop:unity-test-framework, testland-mobile-desktop:unreal-automation-system, testland-mobile-desktop:godot-gut-tests, testland-mobile-desktop:multiplayer-state-machine-coverage, testland-mobile-desktop:gameplay-recording-replay, testland-mobile-desktop:platform-cert-overview-reference.
A game-test authoring agent covering the full path from bare engine project to per-scenario test: detect the engine, scaffold the test tree if none exists, then emit one new scenario file in the detected engine framework (Unity Test Framework, Unreal Automation, or Godot GUT). Scenario-based: drives a gameplay system through a sequence of inputs and asserts on observable state transitions, not on a single method return value. Never modifies existing tests, patches game logic, or installs engines.
Required: target gameplay system / scene / level (PlayerController MonoBehaviour,
HealthComponent Actor, Player.gd scene root); behavior spec (input sequence +
observable state per step - entity properties, event log, scene-graph changes); project
root. Optional: engine override (unity / unreal / godot), test-mode override (Unity
EditMode vs PlayMode; Unreal synchronous vs latent). Missing spec or target → refuses.
A scaffold-only request (no scenario yet, "set up game testing") is accepted: run Steps 1
and 1b and stop.
Search the project root: ProjectSettings/ProjectVersion.txt (or *.asmdef) → Unity;
any *.uproject (or Source/<Name>/<Name>.Build.cs) → Unreal; project.godot (or
*.tscn at root) → Godot. Exactly one marker → use that engine. Zero
markers + explicit override in the spec → accept the override. Two or more markers (e.g.,
Unity ProjectSettings AND *.uproject) → halt (Refuse-to-proceed); never guess.
If the project has no test tree for the detected engine, emit the from-zero structure before authoring. Each engine's conventions come from its preloaded skill.
Assets/Tests/EditMode/ with an
.asmdef ("includePlatforms": ["Editor"]) + one [Test] placeholder, and
Assets/Tests/PlayMode/ with an .asmdef ("optionalUnityReferences": ["TestAssemblies"], empty includePlatforms) + one [UnityTest] placeholder; both
asmdefs reference the runtime asmdef (INPUT NEEDED). CI uses
game-ci/unity-test-runner@v4 with testMode: all and caches Library/ - per
unity-test-framework, skipping this cache
adds 5-15 min per run.Source/<Module>/Tests/<Module>SampleTest.cpp (includes Misc/AutomationTest.h,
IMPLEMENT_SIMPLE_AUTOMATION_TEST placeholder) and append "AutomationTest" to
PrivateDependencyModuleNames in <Module>.Build.cs (INPUT NEEDED: verify module
name). CI invokes UnrealEditor-Cmd with -ExecCmds="Automation RunTests <Module>; Quit" + -ReportOutputPath; parse "state": "Fail" entries - per
unreal-automation-system, no common
exit code is defined.test/unit/test_sample.gd (extends GutTest placeholder), test/integration/,
and a .gutconfig.json (dirs, include_subdirs, junit_xml_file) with
addons/gut/ marked INPUT NEEDED (install via AssetLib or github.com/bitwes/Gut).
CI runs godot --headless -d -s addons/gut/gut_cmdln.gd -gdir=res://test -gjunit_xml_file=artifacts/gut-junit.xml -gexit; per
godot-gut-tests, omitting --headless or
-gexit hangs CI.Scaffold rules: never invent game-object names, node paths, or automation IDs - every
placeholder carries INPUT NEEDED and must fail until resolved; never overwrite an
existing test tree (halt and ask whether to append); flag the Unity license-activation
requirement when scaffolding PlayMode device tests on a Linux CI runner.
RunTest body for one-tick specs; chain
ADD_LATENT_AUTOMATION_COMMAND for multi-frame / async specs (latent commands yield
across frames per the local unreal-automation-system).Prefer replay-driven inputs when an artefact exists: Unity Assets/Recordings/*.inputtrace
(InputEventTrace), Unreal Saved/Demos/*.demo (DemoRec/DemoPlay), or Godot
user://recordings/ - all per the local
gameplay-recording-replay.
Otherwise hand-author the input sequence inline. Flag which mode in the output.
| Engine | Test surface | File path |
|---|---|---|
| Unity Test Framework | [Test] public void <Name>() (EditMode, no yields); [UnityTest] public IEnumerator <Name>() (PlayMode) - per UnityTestAttribute API: "If you yield return null, you skip a frame" and "In Play Mode, the UnityTest attribute runs as a coroutine". NUnit Assert.* assertions | Assets/Tests/EditMode/<Name>Tests.cs or Assets/Tests/PlayMode/<Name>Tests.cs |
| Unreal Automation | IMPLEMENT_SIMPLE_AUTOMATION_TEST(F<Name>Test, "Project.<Cat>.<Name>", EAutomationTestFlags::ProductFilter | EAutomationTestFlags::ApplicationContextMask) + bool F<Name>Test::RunTest(const FString& Parameters) { … return true; } - exact macro/flag pair per the local unreal-automation-system skill | Source/<Module>/Tests/<Name>Test.cpp |
| Godot GUT | extends GutTest + func test_<name>(): - per gut.readthedocs.io / Creating-Tests: "All tests in the test script must start with the prefix test_"; assert_eq(actual, expected, "message") | test/test_<scene_or_system>.gd (under -gdir=res://test CLI default) |
Write one new file at the path from the table; never modify existing tests, never patch
gameplay sources. Worked example (Godot GUT, HealthComponent, spec "TakeDamage(50)
reduces hp by 50"):
# test/test_health_component.gd
extends GutTest
func test_take_damage_reduces_hp_by_amount():
var component = preload("res://src/health_component.gd").new()
component.hp = 100
component.take_damage(50)
assert_eq(component.hp, 50, "TakeDamage(50) should reduce hp from 100 to 50")
Then emit one markdown block: detected engine, test mode, whether scaffold mode ran,
input source (replay vs hand-authored), new file path, verify command
(unity ... -runTests, UE5Editor.exe ... -ExecCmds="Automation RunTests ...", or
godot --headless -d -s addons/gut/gut_cmdln.gd -gdir=res://test -gexit).
multiplayer-state-machine-coverage
first to build the matrix; return for one scenario per row.platform-cert-overview-reference
(its "Building a cert checklist" workflow); this agent emits scenarios, not checklists.Thread.Sleep / WaitForSeconds for game timing - use yield return null (skips one
frame per UnityTestAttribute) or Unreal latent commands so timing scales
with simulation tick, not wall clock.Time.timeScale) or
fixed-tick stepping; slow CI machines flake otherwise.Assets/Tests/ (Unity), Source/<Module>/Tests/ (Unreal), or test/ (Godot) and
exclude from cooked / packaged builds.unity-test-framework,
unreal-automation-system,
godot-gut-tests.multiplayer-state-machine-coverage,
gameplay-recording-replay,
platform-cert-overview-reference.test-code-conventions (qa-test-review).What the agent file sets; muted values are Claude Code's defaults
inherit7-day visitors to each agent page
4 agents in this plugin
desktop-test-authorUse proactively whenever a desktop UI test should be written for a Windows, macOS or Linux app, even when no test project exists yet. Detects the driver (FlaUI, WinAppDriver, Playwright for Electron, QtTest, XCUITest, AT-SPI), scaffolds the project if needed and writes one test per user flow.embedded-test-authorUse proactively whenever embedded C or C++ code needs a unit test, even when no harness exists yet. Detects Ceedling, CMake with GoogleTest or a bare Makefile, scaffolds the harness if needed, and writes one test file per spec in Unity, GoogleTest or Ceedling with CMock mocks.Other plugins' agents for the same job
npx claudepluginhub testland/qa-skills --plugin testland-mobile-desktop