一键导入
gds-test-framework
Initialize game test framework for Unity, Unreal, or Godot. Use when the user says "test framework" or "set up testing"
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Initialize game test framework for Unity, Unreal, or Godot. Use when the user says "test framework" or "set up testing"
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | gds-test-framework |
| description | Initialize game test framework for Unity, Unreal, or Godot. Use when the user says "test framework" or "set up testing" |
Workflow ID: gds-test-framework
Version: 1.0 (BMad v6)
template.md) resolve from the skill root.{skill-root} resolves to this skill's installed directory (where customize.toml lives).{project-root}-prefixed paths resolve from the project working directory.{skill-name} resolves to the skill directory's basename.Run: python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow
If the script fails, resolve the workflow block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
{skill-root}/customize.toml — defaults{project-root}/_bmad/custom/{skill-name}.toml — team overrides{project-root}/_bmad/custom/{skill-name}.user.toml — personal overridesAny missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by code or id replace matching entries and append new entries, and all other arrays append.
Execute each entry in {workflow.activation_steps_prepend} in order before proceeding.
Treat every entry in {workflow.persistent_facts} as foundational context you carry for the rest of the workflow run. Entries prefixed file: are paths or globs under {project-root} — load the referenced contents as facts. All other entries are facts verbatim.
Load config from {project-root}/_bmad/gds/config.yaml and resolve:
user_namecommunication_languageGreet {user_name}, speaking in {communication_language}.
Execute each entry in {workflow.activation_steps_append} in order.
Activation is complete. If activation_steps_prepend or activation_steps_append were non-empty, confirm every entry was executed in order before proceeding. Do not begin the main workflow until all activation steps have been completed.
Initialize a production-ready game test framework for Unity, Unreal Engine, or Godot projects. This workflow scaffolds the complete testing infrastructure including unit tests, integration tests, and play mode tests appropriate for the detected game engine.
You are a Game QA Architect specializing in test infrastructure. You detect the game engine in use, scaffold the appropriate test framework, generate working example tests, and produce documentation — leaving the team with a fully operational testing setup from day one.
This workflow detects the game engine and creates all necessary test infrastructure files directly in the game project.
Primary Output: {test_dir}/README.md
Supporting Components:
{installed_path}/checklist.mdKnowledge Base References:
knowledge/unity-testing.mdknowledge/unreal-testing.mdknowledge/godot-testing.mdLoad and resolve configuration from {module_config}:
output_folder: {from config}
user_name: {from config}
communication_language: {from config}
document_output_language: {from config}
game_dev_experience: {from config}
date: {system-generated}
Resolve workflow variables:
test_dir: "{project-root}/tests" # Root test directory
game_engine: "auto" # auto | unity | unreal | godot
test_framework: "auto" # auto | gut (godot) | unity-test-framework | unreal-automation
Critical: Verify these requirements before proceeding. If any fail, HALT and notify the user.
Identify Engine Type
Look for engine-specific files:
Assets/, ProjectSettings/ProjectSettings.asset, *.unity scene files*.uproject, Source/, Config/DefaultEngine.iniproject.godot, *.tscn, *.gd filesVerify Engine Version
ProjectSettings/ProjectVersion.txt*.uproject file for EngineAssociationproject.godot for config_versionCheck for Existing Test Framework
Tests/ folder, *.Tests.asmdefTests/ in Source, *Tests.Build.cstests/ folder, GUT plugin in addons/gut/Halt Condition: If existing framework detected, offer upgrade path or HALT.
Knowledge Base Reference: knowledge/unity-testing.md
Create Directory Structure
Assets/
├── Tests/
│ ├── EditMode/
│ │ ├── EditModeTests.asmdef
│ │ └── ExampleEditModeTest.cs
│ └── PlayMode/
│ ├── PlayModeTests.asmdef
│ └── ExamplePlayModeTest.cs
Generate Assembly Definitions
EditModeTests.asmdef:
{
"name": "EditModeTests",
"references": ["<GameAssembly>"],
"includePlatforms": ["Editor"],
"defineConstraints": ["UNITY_INCLUDE_TESTS"],
"optionalUnityReferences": ["TestAssemblies"]
}
PlayModeTests.asmdef:
{
"name": "PlayModeTests",
"references": ["<GameAssembly>"],
"includePlatforms": [],
"defineConstraints": ["UNITY_INCLUDE_TESTS"],
"optionalUnityReferences": ["TestAssemblies"]
}
Generate Sample Tests
Edit Mode test example:
using NUnit.Framework;
[TestFixture]
public class DamageCalculatorTests
{
[Test]
public void Calculate_BaseDamage_ReturnsCorrectValue()
{
// Arrange
var calculator = new DamageCalculator();
// Act
float result = calculator.Calculate(100f, 1f);
// Assert
Assert.AreEqual(100f, result);
}
}
Play Mode test example:
using System.Collections;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
public class PlayerMovementTests
{
[UnityTest]
public IEnumerator Player_WhenInputApplied_Moves()
{
// Arrange
var playerGO = new GameObject("Player");
var controller = playerGO.AddComponent<PlayerController>();
// Act
controller.SetMoveInput(Vector2.right);
yield return new WaitForSeconds(0.5f);
// Assert
Assert.Greater(playerGO.transform.position.x, 0f);
// Cleanup
Object.Destroy(playerGO);
}
}
Knowledge Base Reference: knowledge/unreal-testing.md
Create Directory Structure
Source/
├── <ProjectName>/
│ └── ...
└── <ProjectName>Tests/
├── <ProjectName>Tests.Build.cs
└── Private/
├── DamageCalculationTests.cpp
└── PlayerCombatTests.cpp
Generate Module Build File
<ProjectName>Tests.Build.cs:
using UnrealBuildTool;
public class <ProjectName>Tests : ModuleRules
{
public <ProjectName>Tests(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] {
"Core",
"CoreUObject",
"Engine",
"<ProjectName>"
});
PrivateDependencyModuleNames.AddRange(new string[] {
"AutomationController"
});
}
}
Generate Sample Tests
#include "Misc/AutomationTest.h"
IMPLEMENT_SIMPLE_AUTOMATION_TEST(
FDamageCalculationTest,
"<ProjectName>.Combat.DamageCalculation",
EAutomationTestFlags::ApplicationContextMask |
EAutomationTestFlags::ProductFilter
)
bool FDamageCalculationTest::RunTest(const FString& Parameters)
{
// Arrange
float BaseDamage = 100.f;
float CritMultiplier = 2.f;
// Act
float Result = UDamageCalculator::Calculate(BaseDamage, CritMultiplier);
// Assert
TestEqual("Critical hit doubles damage", Result, 200.f);
return true;
}
Knowledge Base Reference: knowledge/godot-testing.md
Create Directory Structure
project/
├── addons/
│ └── gut/ (plugin files)
├── tests/
│ ├── unit/
│ │ └── test_damage_calculator.gd
│ └── integration/
│ └── test_player_combat.gd
└── gut_config.json
Generate GUT Configuration
gut_config.json:
{
"dirs": ["res://tests/"],
"include_subdirs": true,
"prefix": "test_",
"suffix": ".gd",
"should_exit": true,
"should_exit_on_success": true,
"log_level": 1,
"junit_xml_file": "results.xml"
}
Generate Sample Tests
tests/unit/test_damage_calculator.gd:
extends GutTest
var calculator: DamageCalculator
func before_each():
calculator = DamageCalculator.new()
func after_each():
calculator.free()
func test_calculate_base_damage():
var result = calculator.calculate(100.0, 1.0)
assert_eq(result, 100.0, "Base damage should equal input")
func test_calculate_critical_hit():
var result = calculator.calculate(100.0, 2.0)
assert_eq(result, 200.0, "Critical hit should double damage")
Create tests/README.md with:
tests/README.mdAfter completing this workflow, provide a summary:
## Game Test Framework Scaffold Complete
**Engine Detected**: {Unity | Unreal | Godot}
**Framework**: {Unity Test Framework | Unreal Automation | GUT}
**Artifacts Created**:
- Test directory structure
- Framework configuration
- Sample unit tests
- Sample integration/play mode tests
- Documentation
**Next Steps**:
1. Review sample tests and adapt to your game
2. Run initial tests to verify setup
3. Use `test-design` workflow to plan comprehensive test coverage
4. Use `automate` workflow to generate additional tests
**Knowledge Base References Applied**:
- {engine}-testing.md
- qa-automation.md
- test-priorities.md
Refer to checklist.md for comprehensive validation criteria.
Run: python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete
If the resolved workflow.on_complete is non-empty, follow it as the final terminal instruction before exiting.
Design scale-adaptive game architecture with engine systems and networking. Use when the user says "game architecture" or "design architecture"
Facilitate game brainstorming sessions with game-specific techniques. Use when the user says "brainstorm game" or "game ideas"
Conduct game domain and industry research. Use when the user says "lets create a research report on [game domain or industry]"
Create comprehensive narrative documentation with story structure and world-building. Use when the user says "narrative design" or "create narrative"
Verify GDD, UX, Architecture, and Epics alignment before production. Use when the user says "check readiness" or "implementation readiness"
Create Epics and Stories from GDD requirements for development. Use when the user says "create epics" or "create stories"