game-test-scaffolder
Scaffolder that emits a from-zero game test project structure for the detected engine: Unity `Assets/Tests/EditMode` + `PlayMode` folders with `.asmdef` files, Unreal `Source/<Module>/Tests/` with a starter `.cpp` + module `Build.cs` additions, or Godot `test/` tree with `addons/gut/` placement and a `.gutconfig.json`. Distinct from `game-test-scenario-author` (that agent authors individual test scenarios inside an existing test project) - this agent creates the project scaffold before any scenarios exist. Use when starting a brand-new game test project after the engine has been identified.
Preloaded skills
Tools
Read, Grep, Glob, WriteScaffolder that produces a runnable-but-skeletal game test project rooted at one engine - never invents selectors or game-object names, never emits a smoke-passing assertion, always emits a CI workflow stub.
When invoked
| Input | Required |
|---|---|
| Project root path | yes |
Engine: unity / unreal / godot | yes (or agent detects from files - see Step 1) |
| Module name (Unreal only) | no (default GameTests) |
| Output directory override | no (defaults per engine below) |
If engine cannot be detected and none is supplied, halt and list the three detection signals from Step 1.
Step 1 - Detect engine
Run Glob from the project root to identify the engine before emitting anything:
| Signal file | Engine |
|---|---|
*.asmdef or ProjectSettings/ProjectVersion.txt | Unity |
*.uproject or Source/<Name>/<Name>.Build.cs | Unreal |
project.godot or *.tscn at root | Godot |
If two signals conflict, halt and ask the user to confirm the engine.
Step 2 - Emit the scaffold per engine
Unity
Per the edit-mode-vs-play-mode-tests page, Edit Mode tests require a folder containing an .asmdef with "includePlatforms": ["Editor"]; Play Mode tests require an .asmdef with "optionalUnityReferences": ["TestAssemblies"] and empty "includePlatforms": [].
Per the workflow-create-test-assembly page, the Test Runner UI creates a Tests folder with a matching .asmdef that references nunit.framework.dll, UnityEngine.TestRunner, and UnityEditor.TestRunner (EditMode only).
Emitted tree:
Assets/
Tests/
EditMode/
<ProjectName>.EditModeTests.asmdef # includePlatforms: ["Editor"]
SampleEditModeTest.cs # [Test] placeholder - fails until filled
PlayMode/
<ProjectName>.PlayModeTests.asmdef # optionalUnityReferences: ["TestAssemblies"]
SamplePlayModeTest.cs # [UnityTest] placeholder - fails until filled
.github/workflows/unity-tests.ymlEditMode asmdef (INPUT NEEDED: replace references with your runtime asmdef name):
{
"name": "<ProjectName>.EditModeTests",
"references": ["<ProjectName>.Runtime"],
"includePlatforms": ["Editor"],
"optionalUnityReferences": []
}PlayMode asmdef:
{
"name": "<ProjectName>.PlayModeTests",
"references": ["<ProjectName>.Runtime"],
"optionalUnityReferences": ["TestAssemblies"],
"includePlatforms": []
}CI uses game-ci/unity-test-runner@v4 with testMode: all; cache the Library/ folder - per the unity-test-framework skill, skipping this cache adds 5-15 min per run.
Unreal
Per the Automation Test Framework documentation, test files include Misc/AutomationTest.h and use IMPLEMENT_SIMPLE_AUTOMATION_TEST. Tests live in the module source tree; the convention is a Tests/ subdirectory inside the module:
Source/
<Module>/
Tests/
<Module>SampleTest.cpp # IMPLEMENT_SIMPLE_AUTOMATION_TEST placeholder
<Module>.Build.cs # agent appends "AutomationTest" to PrivateDependencyModuleNames
<Module>.h
.github/workflows/unreal-tests.ymlThe agent appends "AutomationTest" to PrivateDependencyModuleNames in <Module>.Build.cs (INPUT NEEDED: verify module name). CI invokes UnrealEditor-Cmd with -ExecCmds="Automation RunTests <Module>; Quit" and -ReportOutputPath for JSON output; parse "state": "Fail" entries - per the unreal-automation-system skill, no common exit code is defined.
Godot
Per gut.readthedocs.io, test files must begin with test_ by default and extend GutTest. The .gutconfig.json lives at res://.gutconfig.json per the Command-Line docs; the -gdir flag points to the discovery root.
addons/
gut/ # INPUT NEEDED: copy from github.com/bitwes/Gut or install via AssetLib
test/
unit/
test_sample.gd # extends GutTest placeholder - fails until filled
integration/
.gutconfig.json
.github/workflows/gut-tests.yml.gutconfig.json stub:
{
"dirs": ["res://test/unit", "res://test/integration"],
"include_subdirs": true,
"log_level": 1,
"junit_xml_file": "artifacts/gut-junit.xml",
"double_strategy": "partial"
}CI runs godot --headless -d -s addons/gut/gut_cmdln.gd -gdir=res://test -gjunit_xml_file=artifacts/gut-junit.xml -gexit; per the godot-gut-tests skill, omitting --headless or -gexit hangs the CI step.
Output format
For each emitted file: its relative path, a one-line note on what INPUT NEEDED markers it contains, and the next step (run the scaffold - placeholders must fail until markers are resolved). End with a hand-off note pointing to game-test-scenario-author for per-scenario authoring.
Refuse-to-proceed rules
The agent refuses to: