bmad-method 6.0.0-alpha.17 → 6.0.0-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/package.json +1 -1
  3. package/src/modules/bmgd/_module-installer/installer.js +160 -0
  4. package/src/modules/bmgd/_module-installer/platform-specifics/claude-code.js +23 -0
  5. package/src/modules/bmgd/_module-installer/platform-specifics/windsurf.js +18 -0
  6. package/src/modules/bmgd/agents/game-architect.agent.yaml +23 -8
  7. package/src/modules/bmgd/agents/game-designer.agent.yaml +38 -18
  8. package/src/modules/bmgd/agents/game-dev.agent.yaml +30 -14
  9. package/src/modules/bmgd/agents/game-qa.agent.yaml +64 -0
  10. package/src/modules/bmgd/agents/game-scrum-master.agent.yaml +27 -39
  11. package/src/modules/bmgd/agents/game-solo-dev.agent.yaml +56 -0
  12. package/src/modules/bmgd/docs/README.md +180 -0
  13. package/src/modules/bmgd/docs/agents-guide.md +407 -0
  14. package/src/modules/bmgd/docs/game-types-guide.md +503 -0
  15. package/src/modules/bmgd/docs/glossary.md +294 -0
  16. package/src/modules/bmgd/docs/quick-flow-guide.md +288 -0
  17. package/src/modules/bmgd/docs/quick-start.md +250 -0
  18. package/src/modules/bmgd/docs/troubleshooting.md +259 -0
  19. package/src/modules/bmgd/docs/workflow-overview.jpg +0 -0
  20. package/src/modules/bmgd/docs/workflows-guide.md +463 -0
  21. package/src/modules/bmgd/gametest/knowledge/balance-testing.md +220 -0
  22. package/src/modules/bmgd/gametest/knowledge/certification-testing.md +319 -0
  23. package/src/modules/bmgd/gametest/knowledge/compatibility-testing.md +228 -0
  24. package/src/modules/bmgd/gametest/knowledge/godot-testing.md +376 -0
  25. package/src/modules/bmgd/gametest/knowledge/input-testing.md +315 -0
  26. package/src/modules/bmgd/gametest/knowledge/localization-testing.md +304 -0
  27. package/src/modules/bmgd/gametest/knowledge/multiplayer-testing.md +322 -0
  28. package/src/modules/bmgd/gametest/knowledge/performance-testing.md +204 -0
  29. package/src/modules/bmgd/gametest/knowledge/playtesting.md +384 -0
  30. package/src/modules/bmgd/gametest/knowledge/qa-automation.md +190 -0
  31. package/src/modules/bmgd/gametest/knowledge/regression-testing.md +280 -0
  32. package/src/modules/bmgd/gametest/knowledge/save-testing.md +280 -0
  33. package/src/modules/bmgd/gametest/knowledge/smoke-testing.md +404 -0
  34. package/src/modules/bmgd/gametest/knowledge/test-priorities.md +271 -0
  35. package/src/modules/bmgd/gametest/knowledge/unity-testing.md +383 -0
  36. package/src/modules/bmgd/gametest/knowledge/unreal-testing.md +388 -0
  37. package/src/modules/bmgd/gametest/qa-index.csv +17 -0
  38. package/src/modules/bmgd/module.yaml +25 -9
  39. package/src/modules/bmgd/teams/default-party.csv +2 -0
  40. package/src/modules/bmgd/teams/team-gamedev.yaml +12 -1
  41. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-01-init.md +164 -0
  42. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-02-context.md +210 -0
  43. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-03-ideation.md +289 -0
  44. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/steps/step-04-complete.md +275 -0
  45. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.md +49 -0
  46. package/src/modules/bmgd/workflows/1-preproduction/brainstorm-game/workflow.yaml +29 -8
  47. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-01-init.md +223 -0
  48. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-01b-continue.md +151 -0
  49. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-02-vision.md +218 -0
  50. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-03-market.md +218 -0
  51. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-04-fundamentals.md +231 -0
  52. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-05-scope.md +242 -0
  53. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-06-references.md +224 -0
  54. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-07-content.md +282 -0
  55. package/src/modules/bmgd/workflows/1-preproduction/game-brief/steps/step-08-complete.md +296 -0
  56. package/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.md +62 -0
  57. package/src/modules/bmgd/workflows/1-preproduction/game-brief/workflow.yaml +40 -9
  58. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-01-init.md +248 -0
  59. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-01b-continue.md +173 -0
  60. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-02-context.md +332 -0
  61. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-03-platforms.md +245 -0
  62. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-04-vision.md +229 -0
  63. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-05-core-gameplay.md +258 -0
  64. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-06-mechanics.md +249 -0
  65. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-07-game-type.md +266 -0
  66. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-08-progression.md +272 -0
  67. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-09-levels.md +264 -0
  68. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-10-art-audio.md +255 -0
  69. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-11-technical.md +275 -0
  70. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-12-epics.md +284 -0
  71. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-13-metrics.md +250 -0
  72. package/src/modules/bmgd/workflows/2-design/gdd/steps/step-14-complete.md +335 -0
  73. package/src/modules/bmgd/workflows/2-design/gdd/workflow.md +61 -0
  74. package/src/modules/bmgd/workflows/2-design/gdd/workflow.yaml +27 -7
  75. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-01-init.md +228 -0
  76. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-01b-continue.md +163 -0
  77. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-02-foundation.md +262 -0
  78. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-03-story.md +238 -0
  79. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-04-characters.md +297 -0
  80. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-05-world.md +262 -0
  81. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-06-dialogue.md +250 -0
  82. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-07-environmental.md +244 -0
  83. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-08-delivery.md +264 -0
  84. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-09-integration.md +254 -0
  85. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-10-production.md +262 -0
  86. package/src/modules/bmgd/workflows/2-design/narrative/steps/step-11-complete.md +331 -0
  87. package/src/modules/bmgd/workflows/2-design/narrative/workflow.md +57 -0
  88. package/src/modules/bmgd/workflows/2-design/narrative/workflow.yaml +53 -8
  89. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-01-init.md +223 -0
  90. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-01b-continue.md +153 -0
  91. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-02-context.md +262 -0
  92. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-03-starter.md +290 -0
  93. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-04-decisions.md +300 -0
  94. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-05-crosscutting.md +319 -0
  95. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-06-structure.md +304 -0
  96. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-07-patterns.md +349 -0
  97. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-08-validation.md +293 -0
  98. package/src/modules/bmgd/workflows/3-technical/game-architecture/steps/step-09-complete.md +302 -0
  99. package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.md +55 -0
  100. package/src/modules/bmgd/workflows/3-technical/game-architecture/workflow.yaml +50 -21
  101. package/src/modules/bmgd/workflows/4-production/code-review/checklist.md +23 -0
  102. package/src/modules/bmgd/workflows/4-production/code-review/instructions.xml +225 -0
  103. package/src/modules/bmgd/workflows/4-production/code-review/workflow.yaml +18 -15
  104. package/src/modules/bmgd/workflows/4-production/correct-course/checklist.md +1 -1
  105. package/src/modules/bmgd/workflows/4-production/correct-course/instructions.md +1 -1
  106. package/src/modules/bmgd/workflows/4-production/correct-course/workflow.yaml +11 -6
  107. package/src/modules/bmgd/workflows/4-production/create-story/checklist.md +332 -214
  108. package/src/modules/bmgd/workflows/4-production/create-story/instructions.xml +298 -0
  109. package/src/modules/bmgd/workflows/4-production/create-story/template.md +3 -5
  110. package/src/modules/bmgd/workflows/4-production/create-story/workflow.yaml +12 -7
  111. package/src/modules/bmgd/workflows/4-production/dev-story/checklist.md +65 -23
  112. package/src/modules/bmgd/workflows/4-production/dev-story/instructions.xml +409 -0
  113. package/src/modules/bmgd/workflows/4-production/dev-story/workflow.yaml +13 -3
  114. package/src/modules/bmgd/workflows/4-production/retrospective/instructions.md +4 -4
  115. package/src/modules/bmgd/workflows/4-production/retrospective/workflow.yaml +12 -7
  116. package/src/modules/bmgd/workflows/4-production/sprint-planning/instructions.md +32 -41
  117. package/src/modules/bmgd/workflows/4-production/sprint-planning/sprint-status-template.yaml +13 -13
  118. package/src/modules/bmgd/workflows/4-production/sprint-planning/workflow.yaml +6 -1
  119. package/src/modules/bmgd/workflows/4-production/sprint-status/instructions.md +229 -0
  120. package/src/modules/bmgd/workflows/4-production/sprint-status/workflow.yaml +35 -0
  121. package/src/modules/bmgd/workflows/bmgd-quick-flow/create-tech-spec/instructions.md +140 -0
  122. package/src/modules/bmgd/workflows/bmgd-quick-flow/create-tech-spec/workflow.yaml +27 -0
  123. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/checklist.md +37 -0
  124. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/instructions.md +220 -0
  125. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-dev/workflow.yaml +45 -0
  126. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/checklist.md +26 -0
  127. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/instructions.md +156 -0
  128. package/src/modules/bmgd/workflows/bmgd-quick-flow/quick-prototype/workflow.yaml +36 -0
  129. package/src/modules/bmgd/workflows/gametest/automate/checklist.md +93 -0
  130. package/src/modules/bmgd/workflows/gametest/automate/instructions.md +317 -0
  131. package/src/modules/bmgd/workflows/gametest/automate/workflow.yaml +50 -0
  132. package/src/modules/bmgd/workflows/gametest/performance/checklist.md +96 -0
  133. package/src/modules/bmgd/workflows/gametest/performance/instructions.md +323 -0
  134. package/src/modules/bmgd/workflows/gametest/performance/performance-template.md +256 -0
  135. package/src/modules/bmgd/workflows/gametest/performance/workflow.yaml +48 -0
  136. package/src/modules/bmgd/workflows/gametest/playtest-plan/checklist.md +93 -0
  137. package/src/modules/bmgd/workflows/gametest/playtest-plan/instructions.md +297 -0
  138. package/src/modules/bmgd/workflows/gametest/playtest-plan/playtest-template.md +208 -0
  139. package/src/modules/bmgd/workflows/gametest/playtest-plan/workflow.yaml +59 -0
  140. package/src/modules/bmgd/workflows/gametest/test-design/checklist.md +98 -0
  141. package/src/modules/bmgd/workflows/gametest/test-design/instructions.md +280 -0
  142. package/src/modules/bmgd/workflows/gametest/test-design/test-design-template.md +205 -0
  143. package/src/modules/bmgd/workflows/gametest/test-design/workflow.yaml +47 -0
  144. package/src/modules/bmgd/workflows/gametest/test-framework/checklist.md +103 -0
  145. package/src/modules/bmgd/workflows/gametest/test-framework/instructions.md +348 -0
  146. package/src/modules/bmgd/workflows/gametest/test-framework/workflow.yaml +48 -0
  147. package/src/modules/bmgd/workflows/gametest/test-review/checklist.md +87 -0
  148. package/src/modules/bmgd/workflows/gametest/test-review/instructions.md +272 -0
  149. package/src/modules/bmgd/workflows/gametest/test-review/test-review-template.md +203 -0
  150. package/src/modules/bmgd/workflows/gametest/test-review/workflow.yaml +48 -0
  151. package/src/modules/bmgd/workflows/workflow-status/init/instructions.md +299 -0
  152. package/src/modules/bmgd/workflows/workflow-status/init/workflow.yaml +29 -0
  153. package/src/modules/bmgd/workflows/workflow-status/instructions.md +395 -0
  154. package/src/modules/bmgd/workflows/workflow-status/paths/gamedev-brownfield.yaml +65 -0
  155. package/src/modules/bmgd/workflows/workflow-status/paths/gamedev-greenfield.yaml +71 -0
  156. package/src/modules/bmgd/workflows/workflow-status/paths/quickflow-brownfield.yaml +29 -0
  157. package/src/modules/bmgd/workflows/workflow-status/paths/quickflow-greenfield.yaml +39 -0
  158. package/src/modules/bmgd/workflows/workflow-status/project-levels.yaml +63 -0
  159. package/src/modules/bmgd/workflows/workflow-status/workflow-status-template.yaml +24 -0
  160. package/src/modules/bmgd/workflows/workflow-status/workflow.yaml +30 -0
  161. package/tools/cli/commands/install.js +9 -0
  162. package/tools/cli/installers/lib/core/installer.js +109 -109
  163. package/tools/cli/installers/lib/core/installer.js.bak +3204 -0
  164. package/tools/cli/installers/lib/modules/manager.js +16 -4
  165. package/tools/cli/lib/agent/compiler.js +99 -0
  166. package/tools/cli/lib/ui.js +78 -27
  167. package/src/modules/bmgd/workflows/2-design/gdd/instructions-gdd.md +0 -502
  168. package/src/modules/bmgd/workflows/4-production/code-review/instructions.md +0 -398
  169. package/src/modules/bmgd/workflows/4-production/create-story/instructions.md +0 -256
  170. package/src/modules/bmgd/workflows/4-production/dev-story/instructions.md +0 -267
  171. package/src/modules/bmgd/workflows/4-production/epic-tech-context/checklist.md +0 -17
  172. package/src/modules/bmgd/workflows/4-production/epic-tech-context/instructions.md +0 -164
  173. package/src/modules/bmgd/workflows/4-production/epic-tech-context/template.md +0 -76
  174. package/src/modules/bmgd/workflows/4-production/epic-tech-context/workflow.yaml +0 -58
  175. package/src/modules/bmgd/workflows/4-production/story-context/checklist.md +0 -16
  176. package/src/modules/bmgd/workflows/4-production/story-context/context-template.xml +0 -34
  177. package/src/modules/bmgd/workflows/4-production/story-context/instructions.md +0 -209
  178. package/src/modules/bmgd/workflows/4-production/story-context/workflow.yaml +0 -63
  179. package/src/modules/bmgd/workflows/4-production/story-done/instructions.md +0 -111
  180. package/src/modules/bmgd/workflows/4-production/story-done/workflow.yaml +0 -28
  181. package/src/modules/bmgd/workflows/4-production/story-ready/instructions.md +0 -117
  182. package/src/modules/bmgd/workflows/4-production/story-ready/workflow.yaml +0 -25
  183. /package/src/modules/bmgd/workflows/1-preproduction/game-brief/{template.md → templates/game-brief-template.md} +0 -0
  184. /package/src/modules/bmgd/workflows/2-design/gdd/{gdd-template.md → templates/gdd-template.md} +0 -0
  185. /package/src/modules/bmgd/workflows/2-design/narrative/{narrative-template.md → templates/narrative-template.md} +0 -0
  186. /package/src/modules/bmgd/workflows/3-technical/game-architecture/{architecture-template.md → templates/architecture-template.md} +0 -0
@@ -0,0 +1,190 @@
1
+ # QA Automation for Games
2
+
3
+ ## Overview
4
+
5
+ Automated testing in games requires different approaches than traditional software. Games have complex state, real-time interactions, and subjective quality measures that challenge automation.
6
+
7
+ ## Testing Pyramid for Games
8
+
9
+ ```
10
+ /\
11
+ / \ Manual Playtesting
12
+ /----\ (Experience, Feel, Fun)
13
+ / \
14
+ /--------\ Integration Tests
15
+ / \ (Systems, Workflows)
16
+ /------------\
17
+ / \ Unit Tests
18
+ /________________\ (Pure Logic, Math, Data)
19
+ ```
20
+
21
+ ### Unit Tests (Foundation)
22
+
23
+ Test pure logic that doesn't depend on engine runtime:
24
+
25
+ - Math utilities (vectors, transforms, curves)
26
+ - Data validation (save files, configs)
27
+ - State machines (isolated logic)
28
+ - Algorithm correctness
29
+
30
+ ### Integration Tests (Middle Layer)
31
+
32
+ Test system interactions:
33
+
34
+ - Combat system + inventory
35
+ - Save/load round-trips
36
+ - Scene transitions
37
+ - Network message handling
38
+
39
+ ### Manual Testing (Top)
40
+
41
+ What can't be automated:
42
+
43
+ - "Does this feel good?"
44
+ - "Is this fun?"
45
+ - "Is the difficulty right?"
46
+
47
+ ## Automation Strategies by Engine
48
+
49
+ ### Unity
50
+
51
+ ```csharp
52
+ // Unity Test Framework
53
+ [Test]
54
+ public void DamageCalculation_CriticalHit_DoublesDamage()
55
+ {
56
+ var baseDamage = 100;
57
+ var result = DamageCalculator.Calculate(baseDamage, isCritical: true);
58
+ Assert.AreEqual(200, result);
59
+ }
60
+
61
+ // Play Mode Tests (runtime)
62
+ [UnityTest]
63
+ public IEnumerator PlayerJump_WhenGrounded_BecomesAirborne()
64
+ {
65
+ var player = CreateTestPlayer();
66
+ player.Jump();
67
+ yield return new WaitForFixedUpdate();
68
+ Assert.IsFalse(player.IsGrounded);
69
+ }
70
+ ```
71
+
72
+ ### Unreal Engine
73
+
74
+ ```cpp
75
+ // Automation Framework
76
+ IMPLEMENT_SIMPLE_AUTOMATION_TEST(FDamageTest, "Game.Combat.Damage",
77
+ EAutomationTestFlags::ApplicationContextMask | EAutomationTestFlags::ProductFilter)
78
+
79
+ bool FDamageTest::RunTest(const FString& Parameters)
80
+ {
81
+ float BaseDamage = 100.f;
82
+ float Result = UDamageCalculator::Calculate(BaseDamage, true);
83
+ TestEqual("Critical hit doubles damage", Result, 200.f);
84
+ return true;
85
+ }
86
+ ```
87
+
88
+ ### Godot
89
+
90
+ ```gdscript
91
+ # GUT Testing Framework
92
+ func test_damage_critical_hit():
93
+ var base_damage = 100
94
+ var result = DamageCalculator.calculate(base_damage, true)
95
+ assert_eq(result, 200, "Critical hit should double damage")
96
+ ```
97
+
98
+ ## What to Automate
99
+
100
+ ### High Value Targets
101
+
102
+ - **Save/Load** - Data integrity is critical
103
+ - **Economy** - Currency, items, progression math
104
+ - **Combat Math** - Damage, stats, modifiers
105
+ - **Localization** - String loading, formatting
106
+ - **Network Serialization** - Message encoding/decoding
107
+
108
+ ### Medium Value Targets
109
+
110
+ - **State Machines** - Character states, game states
111
+ - **Pathfinding** - Known scenarios
112
+ - **Spawning** - Wave generation, loot tables
113
+ - **UI Data Binding** - Correct values displayed
114
+
115
+ ### Low Value / Avoid
116
+
117
+ - **Visual Quality** - Screenshots drift, hard to maintain
118
+ - **Input Feel** - Timing-sensitive, needs human judgment
119
+ - **Audio** - Subjective, context-dependent
120
+ - **Fun** - Cannot be automated
121
+
122
+ ## Continuous Integration for Games
123
+
124
+ ### Build Pipeline
125
+
126
+ 1. **Compile** - Build game executable
127
+ 2. **Unit Tests** - Fast, isolated tests
128
+ 3. **Integration Tests** - Longer, system tests
129
+ 4. **Smoke Test** - Can the game launch and reach main menu?
130
+ 5. **Nightly** - Extended test suites, performance benchmarks
131
+
132
+ ### CI Gotchas for Games
133
+
134
+ - **Long build times** - Games take longer than web apps
135
+ - **GPU requirements** - Some tests need graphics hardware
136
+ - **Asset dependencies** - Large files, binary formats
137
+ - **Platform builds** - Multiple targets to maintain
138
+
139
+ ## Regression Testing
140
+
141
+ ### Automated Regression
142
+
143
+ - Run full test suite on every commit
144
+ - Flag performance regressions (frame time, memory)
145
+ - Track test stability (flaky tests)
146
+
147
+ ### Save File Regression
148
+
149
+ - Maintain library of save files from previous versions
150
+ - Test that new builds can load old saves
151
+ - Alert on schema changes
152
+
153
+ ## Test Data Management
154
+
155
+ ### Test Fixtures
156
+
157
+ ```
158
+ tests/
159
+ ├── fixtures/
160
+ │ ├── save_files/
161
+ │ │ ├── new_game.sav
162
+ │ │ ├── mid_game.sav
163
+ │ │ └── endgame.sav
164
+ │ ├── configs/
165
+ │ │ └── test_balance.json
166
+ │ └── scenarios/
167
+ │ └── boss_fight_setup.scene
168
+ ```
169
+
170
+ ### Deterministic Testing
171
+
172
+ - Seed random number generators
173
+ - Control time/delta time
174
+ - Mock external services
175
+
176
+ ## Metrics and Reporting
177
+
178
+ ### Track Over Time
179
+
180
+ - Test count (growing is good)
181
+ - Pass rate (should be ~100%)
182
+ - Execution time (catch slow tests)
183
+ - Code coverage (where applicable)
184
+ - Flaky test rate (should be ~0%)
185
+
186
+ ### Alerts
187
+
188
+ - Immediate: Any test failure on main branch
189
+ - Daily: Coverage drops, new flaky tests
190
+ - Weekly: Trend analysis, slow test growth
@@ -0,0 +1,280 @@
1
+ # Regression Testing for Games
2
+
3
+ ## Overview
4
+
5
+ Regression testing catches bugs introduced by new changes. In games, this includes functional regressions, performance regressions, and design regressions.
6
+
7
+ ## Types of Regression
8
+
9
+ ### Functional Regression
10
+
11
+ - Features that worked before now break
12
+ - New bugs introduced by unrelated changes
13
+ - Broken integrations between systems
14
+
15
+ ### Performance Regression
16
+
17
+ - Frame rate drops
18
+ - Memory usage increases
19
+ - Load time increases
20
+ - Battery drain (mobile)
21
+
22
+ ### Design Regression
23
+
24
+ - Balance changes with unintended side effects
25
+ - UX changes that hurt usability
26
+ - Art changes that break visual consistency
27
+
28
+ ### Save Data Regression
29
+
30
+ - Old save files no longer load
31
+ - Progression lost or corrupted
32
+ - Achievements/unlocks reset
33
+
34
+ ## Regression Testing Strategy
35
+
36
+ ### Test Suite Layers
37
+
38
+ ```
39
+ High-Frequency (Every Commit)
40
+ ├── Unit Tests - Fast, isolated
41
+ ├── Smoke Tests - Can game launch and run?
42
+ └── Critical Path - Core gameplay works
43
+
44
+ Medium-Frequency (Nightly)
45
+ ├── Integration Tests - System interactions
46
+ ├── Full Playthrough - Automated or manual
47
+ └── Performance Benchmarks - Frame time, memory
48
+
49
+ Low-Frequency (Release)
50
+ ├── Full Matrix - All platforms/configs
51
+ ├── Certification Tests - Platform requirements
52
+ └── Localization - All languages
53
+ ```
54
+
55
+ ### What to Test
56
+
57
+ #### Critical Path (Must Not Break)
58
+
59
+ - Game launches
60
+ - New game starts
61
+ - Save/load works
62
+ - Core gameplay loop completes
63
+ - Main menu navigation
64
+
65
+ #### High Priority
66
+
67
+ - All game systems function
68
+ - Progression works end-to-end
69
+ - Multiplayer connects and syncs
70
+ - In-app purchases process
71
+ - Achievements trigger
72
+
73
+ #### Medium Priority
74
+
75
+ - Edge cases in systems
76
+ - Optional content accessible
77
+ - Settings persist correctly
78
+ - Localization displays
79
+
80
+ ## Automated Regression Tests
81
+
82
+ ### Smoke Tests
83
+
84
+ ```python
85
+ # Run on every commit
86
+ def test_game_launches():
87
+ process = launch_game()
88
+ assert wait_for_main_menu(timeout=30)
89
+ process.terminate()
90
+
91
+ def test_new_game_starts():
92
+ launch_game()
93
+ click_new_game()
94
+ assert wait_for_gameplay(timeout=60)
95
+
96
+ def test_save_load_roundtrip():
97
+ launch_game()
98
+ start_new_game()
99
+ perform_actions()
100
+ save_game()
101
+ load_game()
102
+ assert verify_state_matches()
103
+ ```
104
+
105
+ ### Playthrough Bots
106
+
107
+ ```python
108
+ # Automated player that plays through content
109
+ class PlaythroughBot:
110
+ def run_level(self, level):
111
+ self.load_level(level)
112
+ while not self.level_complete:
113
+ self.perform_action()
114
+ self.check_for_softlocks()
115
+ self.record_metrics()
116
+ ```
117
+
118
+ ### Visual Regression
119
+
120
+ ```python
121
+ # Compare screenshots against baselines
122
+ def test_main_menu_visual():
123
+ launch_game()
124
+ screenshot = capture_screen()
125
+ assert compare_to_baseline(screenshot, 'main_menu', threshold=0.01)
126
+ ```
127
+
128
+ ## Performance Regression Detection
129
+
130
+ ### Metrics to Track
131
+
132
+ - Average frame time
133
+ - 1% low frame time
134
+ - Memory usage (peak, average)
135
+ - Load times
136
+ - Draw calls
137
+ - Texture memory
138
+
139
+ ### Automated Benchmarks
140
+
141
+ ```yaml
142
+ performance_benchmark:
143
+ script:
144
+ - run_benchmark_scene --duration 60s
145
+ - collect_metrics
146
+ - compare_to_baseline
147
+ fail_conditions:
148
+ - frame_time_avg > baseline * 1.1 # 10% tolerance
149
+ - memory_peak > baseline * 1.05 # 5% tolerance
150
+ ```
151
+
152
+ ### Trend Tracking
153
+
154
+ - Graph metrics over time
155
+ - Alert on upward trends
156
+ - Identify problematic commits
157
+
158
+ ## Save Compatibility Testing
159
+
160
+ ### Version Matrix
161
+
162
+ Maintain save files from:
163
+
164
+ - Previous major version
165
+ - Previous minor version
166
+ - Current development build
167
+
168
+ ### Automated Validation
169
+
170
+ ```python
171
+ def test_save_compatibility():
172
+ for save_file in LEGACY_SAVES:
173
+ load_save(save_file)
174
+ assert no_errors()
175
+ assert progress_preserved()
176
+ assert inventory_intact()
177
+ ```
178
+
179
+ ### Schema Versioning
180
+
181
+ - Version your save format
182
+ - Implement upgrade paths
183
+ - Log migration issues
184
+
185
+ ## Regression Bug Workflow
186
+
187
+ ### 1. Detection
188
+
189
+ - Automated test fails
190
+ - Manual tester finds issue
191
+ - Player report comes in
192
+
193
+ ### 2. Verification
194
+
195
+ - Confirm it worked before
196
+ - Identify when it broke
197
+ - Find the breaking commit
198
+
199
+ ### 3. Triage
200
+
201
+ - Assess severity
202
+ - Determine fix urgency
203
+ - Assign to appropriate developer
204
+
205
+ ### 4. Fix and Verify
206
+
207
+ - Implement fix
208
+ - Add regression test
209
+ - Verify fix doesn't break other things
210
+
211
+ ### 5. Post-Mortem
212
+
213
+ - Why wasn't this caught?
214
+ - How can we prevent similar issues?
215
+ - Do we need new tests?
216
+
217
+ ## Bisecting Regressions
218
+
219
+ When a regression is found, identify the breaking commit:
220
+
221
+ ### Git Bisect
222
+
223
+ ```bash
224
+ git bisect start
225
+ git bisect bad HEAD # Current is broken
226
+ git bisect good v1.2.0 # Known good version
227
+ # Git will checkout commits to test
228
+ # Run test, mark good/bad
229
+ git bisect good/bad
230
+ # Repeat until culprit found
231
+ ```
232
+
233
+ ### Automated Bisect
234
+
235
+ ```bash
236
+ git bisect start HEAD v1.2.0
237
+ git bisect run ./run_regression_test.sh
238
+ ```
239
+
240
+ ## Regression Testing Checklist
241
+
242
+ ### Per Commit
243
+
244
+ - [ ] Unit tests pass
245
+ - [ ] Smoke tests pass
246
+ - [ ] Build succeeds on all platforms
247
+
248
+ ### Per Merge to Main
249
+
250
+ - [ ] Integration tests pass
251
+ - [ ] Performance benchmarks within tolerance
252
+ - [ ] Save compatibility verified
253
+
254
+ ### Per Release
255
+
256
+ - [ ] Full playthrough completed
257
+ - [ ] All platforms tested
258
+ - [ ] Legacy saves load correctly
259
+ - [ ] No new critical regressions
260
+ - [ ] All previous hotfix issues still resolved
261
+
262
+ ## Building a Regression Suite
263
+
264
+ ### Start Small
265
+
266
+ 1. Add tests for bugs as they're fixed
267
+ 2. Cover critical path first
268
+ 3. Expand coverage over time
269
+
270
+ ### Maintain Quality
271
+
272
+ - Delete flaky tests
273
+ - Keep tests fast
274
+ - Update tests with design changes
275
+
276
+ ### Measure Effectiveness
277
+
278
+ - Track bugs caught by tests
279
+ - Track bugs that slipped through
280
+ - Identify coverage gaps