speccrew 0.1.0

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 (153) hide show
  1. package/.speccrew/agents/speccrew-feature-designer.md +142 -0
  2. package/.speccrew/agents/speccrew-product-manager.md +61 -0
  3. package/.speccrew/agents/speccrew-system-designer.md +200 -0
  4. package/.speccrew/agents/speccrew-system-developer.md +238 -0
  5. package/.speccrew/agents/speccrew-task-worker.md +80 -0
  6. package/.speccrew/agents/speccrew-team-leader.md +92 -0
  7. package/.speccrew/agents/speccrew-test-manager.md +313 -0
  8. package/.speccrew/skills/speccrew-create-agents/SKILL.md +98 -0
  9. package/.speccrew/skills/speccrew-create-agents/templates/agents/designer-agent.md +54 -0
  10. package/.speccrew/skills/speccrew-create-agents/templates/agents/dev-agent.md +79 -0
  11. package/.speccrew/skills/speccrew-create-agents/templates/agents/test-agent.md +80 -0
  12. package/.speccrew/skills/speccrew-dev-backend/SKILL.md +205 -0
  13. package/.speccrew/skills/speccrew-dev-backend/templates/TASK-RECORD-TEMPLATE.md +118 -0
  14. package/.speccrew/skills/speccrew-dev-desktop/SKILL.md +258 -0
  15. package/.speccrew/skills/speccrew-dev-desktop/templates/TASK-RECORD-TEMPLATE.md +161 -0
  16. package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +202 -0
  17. package/.speccrew/skills/speccrew-dev-frontend/templates/TASK-RECORD-TEMPLATE.md +115 -0
  18. package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +200 -0
  19. package/.speccrew/skills/speccrew-dev-mobile/templates/TASK-RECORD-TEMPLATE.md +125 -0
  20. package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +73 -0
  21. package/.speccrew/skills/speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md +96 -0
  22. package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +395 -0
  23. package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +387 -0
  24. package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +80 -0
  25. package/.speccrew/skills/speccrew-get-timestamp/scripts/get-timestamp.js +35 -0
  26. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +1116 -0
  27. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-FASTAPI.md +462 -0
  28. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-JAVA.md +480 -0
  29. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-NET.md +464 -0
  30. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE.md +480 -0
  31. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/MODULE-OVERVIEW-TEMPLATE.md +367 -0
  32. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +667 -0
  33. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +74 -0
  34. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +176 -0
  35. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +150 -0
  36. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +106 -0
  37. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +249 -0
  38. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +848 -0
  39. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +226 -0
  40. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +264 -0
  41. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +34 -0
  42. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +867 -0
  43. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +26 -0
  44. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +165 -0
  45. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/apply-module-mapping.js +208 -0
  46. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/extract-module-summary.js +180 -0
  47. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/reindex-modules.js +358 -0
  48. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +1055 -0
  49. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-DESKTOP.md +303 -0
  50. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-ELECTRON.md +327 -0
  51. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MINIAPP.md +292 -0
  52. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MOBILE.md +281 -0
  53. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI.md +324 -0
  54. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +270 -0
  55. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/COMPONENT-PATTERN-TEMPLATE.md +33 -0
  56. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/LAYOUT-PATTERN-TEMPLATE.md +33 -0
  57. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/PAGE-TYPE-TEMPLATE.md +33 -0
  58. package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +229 -0
  59. package/.speccrew/skills/speccrew-knowledge-graph-query/scripts/graph-query.js +549 -0
  60. package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +181 -0
  61. package/.speccrew/skills/speccrew-knowledge-graph-write/scripts/graph-write.js +651 -0
  62. package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +305 -0
  63. package/.speccrew/skills/speccrew-knowledge-module-summarize/templates/MODULE-OVERVIEW-TEMPLATE.md +400 -0
  64. package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +351 -0
  65. package/.speccrew/skills/speccrew-knowledge-system-summarize/templates/SYSTEM-OVERVIEW-TEMPLATE.md +294 -0
  66. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +683 -0
  67. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +550 -0
  68. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/templates/techs-manifest-EXAMPLE.json +35 -0
  69. package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +1087 -0
  70. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md +240 -0
  71. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COLOR-SYSTEM-TEMPLATE.md +68 -0
  72. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COMPONENT-LIBRARY-TEMPLATE.md +86 -0
  73. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md +466 -0
  74. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md +432 -0
  75. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md +1209 -0
  76. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md +1433 -0
  77. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md +1052 -0
  78. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md +946 -0
  79. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md +29 -0
  80. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-LAYOUTS-TEMPLATE.md +69 -0
  81. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +74 -0
  82. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md +232 -0
  83. package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +628 -0
  84. package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +392 -0
  85. package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +489 -0
  86. package/.speccrew/skills/speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md +243 -0
  87. package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +269 -0
  88. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +562 -0
  89. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/BUSINESS-COMPONENTS-TEMPLATE.md +171 -0
  90. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMMON-COMPONENTS-TEMPLATE.md +177 -0
  91. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-INDIVIDUAL-TEMPLATE.md +80 -0
  92. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-LIBRARY-TEMPLATE.md +118 -0
  93. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-INDIVIDUAL-TEMPLATE.md +97 -0
  94. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-PATTERNS-TEMPLATE.md +208 -0
  95. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/NAVIGATION-PATTERNS-TEMPLATE.md +157 -0
  96. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-INDIVIDUAL-TEMPLATE.md +123 -0
  97. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +58 -0
  98. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/SPACING-TEMPLATE.md +119 -0
  99. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/STYLE-SYSTEM-TEMPLATE.md +117 -0
  100. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/TYPOGRAPHY-TEMPLATE.md +107 -0
  101. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/UI-STYLE-GUIDE-TEMPLATE.md +171 -0
  102. package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +434 -0
  103. package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/BIZS-MODELING-TEMPLATE.md +332 -0
  104. package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +200 -0
  105. package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +195 -0
  106. package/.speccrew/skills/speccrew-project-diagnosis/SKILL.md +208 -0
  107. package/.speccrew/skills/speccrew-project-diagnosis/templates/DIAGNOSIS-REPORT-TEMPLATE.md +202 -0
  108. package/.speccrew/skills/speccrew-sd-backend/SKILL.md +188 -0
  109. package/.speccrew/skills/speccrew-sd-backend/templates/INDEX-TEMPLATE.md +85 -0
  110. package/.speccrew/skills/speccrew-sd-backend/templates/SD-BACKEND-TEMPLATE.md +269 -0
  111. package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +192 -0
  112. package/.speccrew/skills/speccrew-sd-desktop/templates/INDEX-TEMPLATE.md +271 -0
  113. package/.speccrew/skills/speccrew-sd-desktop/templates/SD-DESKTOP-TEMPLATE.md +673 -0
  114. package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +176 -0
  115. package/.speccrew/skills/speccrew-sd-frontend/templates/INDEX-TEMPLATE.md +184 -0
  116. package/.speccrew/skills/speccrew-sd-frontend/templates/SD-FRONTEND-TEMPLATE.md +382 -0
  117. package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +189 -0
  118. package/.speccrew/skills/speccrew-sd-mobile/templates/INDEX-TEMPLATE.md +219 -0
  119. package/.speccrew/skills/speccrew-sd-mobile/templates/SD-MOBILE-TEMPLATE.md +534 -0
  120. package/.speccrew/skills/speccrew-test-case-design/SKILL.md +284 -0
  121. package/.speccrew/skills/speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md +263 -0
  122. package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +313 -0
  123. package/.speccrew/skills/speccrew-test-code-gen/templates/TEST-CODE-PLAN-TEMPLATE.md +180 -0
  124. package/.speccrew/skills/speccrew-test-execute/SKILL.md +283 -0
  125. package/.speccrew/skills/speccrew-test-execute/templates/BUG-REPORT-TEMPLATE.md +50 -0
  126. package/.speccrew/skills/speccrew-test-execute/templates/TEST-REPORT-TEMPLATE.md +57 -0
  127. package/.speccrew/skills/speccrew-workflow-diagnose/SKILL.md +155 -0
  128. package/LICENSE +21 -0
  129. package/README.ar.md +318 -0
  130. package/README.en.md +318 -0
  131. package/README.es.md +318 -0
  132. package/README.md +340 -0
  133. package/bin/cli.js +62 -0
  134. package/lib/commands/doctor.js +138 -0
  135. package/lib/commands/init.js +231 -0
  136. package/lib/commands/list.js +114 -0
  137. package/lib/commands/uninstall.js +117 -0
  138. package/lib/commands/update.js +351 -0
  139. package/lib/ide-adapters.js +73 -0
  140. package/lib/utils.js +104 -0
  141. package/package.json +28 -0
  142. package/workspace-template/docs/configs/document-templates.json +667 -0
  143. package/workspace-template/docs/configs/platform-mapping.json +194 -0
  144. package/workspace-template/docs/configs/tech-stack-mappings.json +313 -0
  145. package/workspace-template/docs/configs/validation-rules.json +87 -0
  146. package/workspace-template/docs/rules/mermaid-rule.md +114 -0
  147. package/workspace-template/docs/solutions/Agent/346/212/200/350/203/275/345/256/232/344/271/211+/351/234/200/346/261/202/346/226/207/346/241/243+UML/344/275/277/347/224/250/346/250/241/346/235/277/357/274/210ISA-95/345/205/255/346/256/265/345/274/217/350/236/215/345/220/210/347/211/210/357/274/211.md +586 -0
  148. package/workspace-template/docs/solutions/agent-knowledge-map.md +238 -0
  149. package/workspace-template/docs/solutions/bizs-knowledge-pipeline.md +678 -0
  150. package/workspace-template/docs/solutions/harness.md +410 -0
  151. package/workspace-template/docs/solutions/knowledge-incremental-sync-spec.md +943 -0
  152. package/workspace-template/docs/solutions/techs-knowledge-pipeline.md +803 -0
  153. package/workspace-template/docs/solutions/workspace-structure.md +318 -0
@@ -0,0 +1,1052 @@
1
+ # {{platform_name}} System Testing Conventions
2
+
3
+ <cite>
4
+ **Files Referenced in This Document**
5
+ {{#each source_files}}
6
+ - [{{name}}]({{path}})
7
+ {{/each}}
8
+ </cite>
9
+
10
+ > **Target Audience**: devcrew-designer-{{platform_id}}, devcrew-dev-{{platform_id}}, devcrew-test-{{platform_id}}
11
+
12
+ ## Table of Contents
13
+
14
+ 1. [Testing Framework & Toolchain](#1-testing-framework--toolchain)
15
+ 2. [Test Organization & Naming (Platform-Specific)](#2-test-organization--naming-platform-specific)
16
+ 3. [Test Layering & Boundaries](#3-test-layering--boundaries)
17
+ 4. [Test Scenario Matrix](#4-test-scenario-matrix)
18
+ 5. [Integration Testing Patterns (Platform-Specific)](#5-integration-testing-patterns-platform-specific)
19
+ 6. [Cross-Service Testing](#6-cross-service-testing)
20
+ 7. [API Contract Testing](#7-api-contract-testing)
21
+ 8. [System-Level Exception Testing](#8-system-level-exception-testing)
22
+ 9. [Mocking Strategy vs Real Dependencies](#9-mocking-strategy-vs-real-dependencies)
23
+ 10. [Test Data Management (Platform-Specific)](#10-test-data-management-platform-specific)
24
+ 11. [Coverage Requirements](#11-coverage-requirements)
25
+ 12. [Test Reuse & Maintenance](#12-test-reuse--maintenance)
26
+ 13. [Security Testing](#13-security-testing)
27
+ 14. [Performance & Load Testing](#14-performance--load-testing)
28
+ 15. [Test Environment & Configuration](#15-test-environment--configuration)
29
+ 16. [CI/CD Integration](#16-cicd-integration)
30
+ 17. [Test Report Conventions](#17-test-report-conventions)
31
+ 18. [Anti-Patterns & Pitfalls](#18-anti-patterns--pitfalls)
32
+ 19. [Appendix](#appendix)
33
+
34
+ ## 1. Testing Framework & Toolchain
35
+
36
+ <!-- AI-TAG: TEST_FRAMEWORK -->
37
+ <!-- List system testing frameworks for THIS platform. API Testing: Postman, REST Assured, Supertest. E2E Testing: Cypress, Playwright, Selenium, Appium. Performance Testing: k6, JMeter, Gatling. Contract Testing: Pact, Spring Cloud Contract. -->
38
+
39
+ ### Primary System Testing Frameworks
40
+
41
+ | Framework | Version | Purpose | Scope |
42
+ |-----------|---------|---------|-------|
43
+ {{#each testing_frameworks}}
44
+ | {{name}} | {{version}} | {{purpose}} | {{scope}} |
45
+ {{/each}}
46
+
47
+ ### Auxiliary Tools
48
+
49
+ <!-- Fill with: test data generators, environment provisioning tools, reporting tools -->
50
+
51
+ | Tool | Category | Purpose | Integration |
52
+ |------|----------|---------|-------------|
53
+ {{#each auxiliary_tools}}
54
+ | {{name}} | {{category}} | {{purpose}} | {{integration}} |
55
+ {{/each}}
56
+
57
+ **Section Source**
58
+ {{#each test_framework_sources}}
59
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
60
+ {{/each}}
61
+
62
+ ## 2. Test Organization & Naming (Platform-Specific)
63
+
64
+ <!-- AI-TAG: TEST_ORGANIZATION -->
65
+ <!-- System tests typically organized in: cases/ (test scenarios), code/ (test scripts), reports/ (test results), data/ (test datasets), fixtures/ (shared test data). Describe the convention used in THIS platform. -->
66
+
67
+ ### Test Directory Structure
68
+
69
+ ```
70
+ {{test_directory_structure}}
71
+ ```
72
+
73
+ ```mermaid
74
+ graph TB
75
+ {{#each test_components}}
76
+ {{id}}["{{name}}"]
77
+ {{/each}}
78
+ {{#each test_relations}}
79
+ {{from}} --> {{to}}
80
+ {{/each}}
81
+ ```
82
+
83
+ **Diagram Source**
84
+ {{#each structure_sources}}
85
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
86
+ {{/each}}
87
+
88
+ ### Test File Naming Conventions
89
+
90
+ | Test Type | Naming Pattern | Example | Scenario Naming Rule |
91
+ |-----------|---------------|---------|---------------------|
92
+ {{#each test_file_naming}}
93
+ | {{type}} | {{pattern}} | {{example}} | {{scenario_rule}} |
94
+ {{/each}}
95
+
96
+ ### Test Case Organization
97
+
98
+ <!-- Fill with: how test cases are organized within the test suite -->
99
+
100
+ | Organization Level | Structure | Naming Convention |
101
+ |-------------------|-----------|--------------------|
102
+ {{#each case_organization}}
103
+ | {{level}} | {{structure}} | {{convention}} |
104
+ {{/each}}
105
+
106
+ ### Test Scenario Naming Template
107
+
108
+ ```
109
+ <Feature>_<Scenario>_<ExpectedResult>
110
+ ```
111
+
112
+ **Examples:**
113
+ - `UserCheckout_WithValidPayment_CompletesOrder`
114
+ - `OrderFulfillment_WhenInventoryLow_TriggersRestock`
115
+ - `PaymentProcessing_WhenGatewayTimeout_RetriesAndSucceeds`
116
+
117
+ **Section Source**
118
+ {{#each test_organization_sources}}
119
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
120
+ {{/each}}
121
+
122
+ ## 3. Test Layering & Boundaries
123
+
124
+ <!-- AI-TAG: TEST_LAYERING -->
125
+ <!-- Fill with: system test layer definitions, scope, dependencies, and granularity standards -->
126
+
127
+ ### System Test Layer Definitions
128
+
129
+ | Layer | Scope | Dependencies Allowed | Forbidden | Granularity |
130
+ |-------|-------|---------------------|-----------|-------------|
131
+ {{#each test_layers}}
132
+ | {{name}} | {{scope}} | {{dependencies}} | {{forbidden}} | {{granularity}} |
133
+ {{/each}}
134
+
135
+ ### Layer Decision Guide
136
+
137
+ <!-- Fill with: guidelines for choosing between API, integration, and E2E tests -->
138
+
139
+ **When to Write API Tests:**
140
+ {{#each api_test_when}}
141
+ - {{this}}
142
+ {{/each}}
143
+
144
+ **When to Write Integration Tests:**
145
+ {{#each integration_test_when}}
146
+ - {{this}}
147
+ {{/each}}
148
+
149
+ **When to Write E2E Tests:**
150
+ {{#each e2e_test_when}}
151
+ - {{this}}
152
+ {{/each}}
153
+
154
+ ### Layer Isolation Rules
155
+
156
+ <!-- Fill with: rules for maintaining proper test isolation between layers -->
157
+
158
+ | Rule | Description | Enforcement |
159
+ |------|-------------|-------------|
160
+ {{#each layer_isolation_rules}}
161
+ | {{name}} | {{description}} | {{enforcement}} |
162
+ {{/each}}
163
+
164
+ **Section Source**
165
+ {{#each test_layering_sources}}
166
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
167
+ {{/each}}
168
+
169
+ ## 4. Test Scenario Matrix
170
+
171
+ <!-- AI-TAG: SCENARIO_MATRIX -->
172
+ <!-- Fill with: end-to-end scenario matrix design, covering happy paths, edge cases, and error scenarios -->
173
+
174
+ ### Scenario Matrix Structure
175
+
176
+ ```mermaid
177
+ graph LR
178
+ A[Test Scenario Matrix] --> B[Happy Path]
179
+ A --> C[Edge Cases]
180
+ A --> D[Error Scenarios]
181
+ B --> B1[Standard Flow]
182
+ B --> B2[Alternative Flow]
183
+ C --> C1[Boundary Values]
184
+ C --> C2[State Transitions]
185
+ D --> D1[System Errors]
186
+ D --> D2[Business Errors]
187
+ ```
188
+
189
+ ### Scenario Categories
190
+
191
+ | Category | Description | Coverage Target | Priority |
192
+ |----------|-------------|-----------------|----------|
193
+ {{#each scenario_categories}}
194
+ | {{category}} | {{description}} | {{coverage}} | {{priority}} |
195
+ {{/each}}
196
+
197
+ ### Scenario Design Template
198
+
199
+ <!-- Fill with: standardized template for designing test scenarios -->
200
+
201
+ | Field | Description | Example |
202
+ |-------|-------------|---------|
203
+ {{#each scenario_template_fields}}
204
+ | {{field}} | {{description}} | {{example}} |
205
+ {{/each}}
206
+
207
+ ### Scenario Coverage Matrix
208
+
209
+ <!-- Fill with: matrix mapping scenarios to features and requirements -->
210
+
211
+ | Feature | Happy Path | Edge Cases | Error Scenarios | Total |
212
+ |---------|-----------|------------|-----------------|-------|
213
+ {{#each scenario_coverage_matrix}}
214
+ | {{feature}} | {{happy}} | {{edge}} | {{error}} | {{total}} |
215
+ {{/each}}
216
+
217
+ **Section Source**
218
+ {{#each scenario_matrix_sources}}
219
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
220
+ {{/each}}
221
+
222
+ ## 5. Integration Testing Patterns (Platform-Specific)
223
+
224
+ <!-- AI-TAG: INTEGRATION_TESTING -->
225
+ <!-- Fill with: database, API, message queue, and external service integration testing patterns -->
226
+
227
+ ### Database Integration Testing
228
+
229
+ <!-- Fill with: database integration testing patterns -->
230
+
231
+ **Pattern:**
232
+ {{database_integration_pattern}}
233
+
234
+ **Test Setup:**
235
+ ```{{language}}
236
+ {{database_test_example}}
237
+ ```
238
+
239
+ ### API Integration Testing
240
+
241
+ <!-- Fill with: API integration testing patterns -->
242
+
243
+ **Pattern:**
244
+ {{api_integration_pattern}}
245
+
246
+ **Test Setup:**
247
+ ```{{language}}
248
+ {{api_test_example}}
249
+ ```
250
+
251
+ ### Message Queue Integration Testing
252
+
253
+ <!-- Fill with: message queue testing patterns (if applicable) -->
254
+
255
+ **Pattern:**
256
+ {{message_queue_pattern}}
257
+
258
+ **Test Setup:**
259
+ ```{{language}}
260
+ {{message_queue_test_example}}
261
+ ```
262
+
263
+ ### External Service Integration Testing
264
+
265
+ <!-- Fill with: third-party service integration testing patterns -->
266
+
267
+ **Pattern:**
268
+ {{external_service_pattern}}
269
+
270
+ **Test Setup:**
271
+ ```{{language}}
272
+ {{external_service_test_example}}
273
+ ```
274
+
275
+ ### Integration Test Data Management
276
+
277
+ | Strategy | When to Use | Implementation |
278
+ |----------|------------|----------------|
279
+ {{#each integration_data_strategies}}
280
+ | {{name}} | {{when_to_use}} | {{implementation}} |
281
+ {{/each}}
282
+
283
+ **Section Source**
284
+ {{#each integration_testing_sources}}
285
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
286
+ {{/each}}
287
+
288
+ ## 6. Cross-Service Testing
289
+
290
+ <!-- AI-TAG: CROSS_SERVICE_TESTING -->
291
+ <!-- Fill with: cross-service/cross-module interaction testing patterns -->
292
+
293
+ ### Cross-Service Test Patterns
294
+
295
+ ```mermaid
296
+ graph TB
297
+ subgraph ServiceA["Service A"]
298
+ A1[API Endpoint]
299
+ A2[Business Logic]
300
+ end
301
+ subgraph ServiceB["Service B"]
302
+ B1[API Endpoint]
303
+ B2[Business Logic]
304
+ end
305
+ subgraph ServiceC["Service C"]
306
+ C1[Message Consumer]
307
+ C2[Data Store]
308
+ end
309
+ A1 -->|HTTP| B1
310
+ B2 -->|Event| C1
311
+ ```
312
+
313
+ ### Service Interaction Testing
314
+
315
+ | Interaction Type | Test Approach | Verification Strategy |
316
+ |------------------|---------------|----------------------|
317
+ {{#each service_interactions}}
318
+ | {{type}} | {{approach}} | {{verification}} |
319
+ {{/each}}
320
+
321
+ ### Service Dependency Testing
322
+
323
+ <!-- Fill with: testing service dependencies and fallback scenarios -->
324
+
325
+ **Pattern:**
326
+ {{service_dependency_pattern}}
327
+
328
+ **Test Setup:**
329
+ ```{{language}}
330
+ {{service_dependency_example}}
331
+ ```
332
+
333
+ ### Saga/Distributed Transaction Testing
334
+
335
+ <!-- Fill with: distributed transaction testing patterns (if applicable) -->
336
+
337
+ | Saga Pattern | Test Focus | Verification Points |
338
+ |--------------|-----------|---------------------|
339
+ {{#each saga_patterns}}
340
+ | {{pattern}} | {{focus}} | {{verification}} |
341
+ {{/each}}
342
+
343
+ **Section Source**
344
+ {{#each cross_service_sources}}
345
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
346
+ {{/each}}
347
+
348
+ ## 7. API Contract Testing
349
+
350
+ <!-- AI-TAG: CONTRACT_TESTING -->
351
+ <!-- Fill with: API contract validation testing patterns using Pact, OpenAPI, or similar tools -->
352
+
353
+ ### Contract Testing Overview
354
+
355
+ ```mermaid
356
+ graph LR
357
+ Consumer["Consumer<br/>(Client)"] -->|Contract| Broker["Contract Broker"]
358
+ Provider["Provider<br/>(API)"] -->|Verify| Broker
359
+ Broker -->|Validate| Compatibility["Compatibility Check"]
360
+ ```
361
+
362
+ ### Contract Types
363
+
364
+ | Contract Type | Tool | Purpose | Scope |
365
+ |---------------|------|---------|-------|
366
+ {{#each contract_types}}
367
+ | {{type}} | {{tool}} | {{purpose}} | {{scope}} |
368
+ {{/each}}
369
+
370
+ ### Consumer-Driven Contract Testing
371
+
372
+ <!-- Fill with: consumer-side contract testing patterns -->
373
+
374
+ **Pattern:**
375
+ {{consumer_contract_pattern}}
376
+
377
+ **Test Setup:**
378
+ ```{{language}}
379
+ {{consumer_contract_example}}
380
+ ```
381
+
382
+ ### Provider Contract Verification
383
+
384
+ <!-- Fill with: provider-side contract verification patterns -->
385
+
386
+ **Pattern:**
387
+ {{provider_contract_pattern}}
388
+
389
+ **Test Setup:**
390
+ ```{{language}}
391
+ {{provider_contract_example}}
392
+ ```
393
+
394
+ ### Contract Versioning Strategy
395
+
396
+ | Strategy | When to Use | Migration Approach |
397
+ |----------|-------------|-------------------|
398
+ {{#each contract_versioning}}
399
+ | {{strategy}} | {{when_to_use}} | {{migration}} |
400
+ {{/each}}
401
+
402
+ **Section Source**
403
+ {{#each contract_testing_sources}}
404
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
405
+ {{/each}}
406
+
407
+ ## 8. System-Level Exception Testing
408
+
409
+ <!-- AI-TAG: EXCEPTION_TESTING -->
410
+ <!-- Fill with: system-level exception scenarios, failure injection, and recovery testing -->
411
+
412
+ ### Exception Categories and Coverage
413
+
414
+ | Exception Category | Examples | Must Test | Assertion Standard |
415
+ |-------------------|----------|-----------|-------------------|
416
+ {{#each exception_categories}}
417
+ | {{category}} | {{examples}} | {{must_test}} | {{assertion_standard}} |
418
+ {{/each}}
419
+
420
+ ### Failure Injection Testing
421
+
422
+ <!-- Fill with: chaos engineering and failure injection patterns -->
423
+
424
+ | Failure Type | Injection Method | Expected Behavior |
425
+ |--------------|-----------------|-------------------|
426
+ {{#each failure_injection_types}}
427
+ | {{type}} | {{method}} | {{expected}} |
428
+ {{/each}}
429
+
430
+ ### System Recovery Testing
431
+
432
+ <!-- Fill with: system recovery and resilience testing patterns -->
433
+
434
+ | Recovery Scenario | Test Approach | Success Criteria |
435
+ |-------------------|---------------|------------------|
436
+ {{#each recovery_scenarios}}
437
+ | {{scenario}} | {{approach}} | {{criteria}} |
438
+ {{/each}}
439
+
440
+ ### Exception Testing Code Examples
441
+
442
+ **Good Example:**
443
+ ```{{language}}
444
+ {{exception_test_good_example}}
445
+ ```
446
+
447
+ **Bad Example:**
448
+ ```{{language}}
449
+ {{exception_test_bad_example}}
450
+ ```
451
+
452
+ **Section Source**
453
+ {{#each exception_testing_sources}}
454
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
455
+ {{/each}}
456
+
457
+ ## 9. Mocking Strategy vs Real Dependencies
458
+
459
+ <!-- AI-TAG: MOCKING_STRATEGY -->
460
+ <!-- Fill with: when to use mocks vs real dependencies in system tests, stub services, test containers -->
461
+
462
+ ### Mock vs Real Decision Matrix
463
+
464
+ | Dependency Type | Use Mock | Use Real | Hybrid Approach |
465
+ |-----------------|----------|----------|-----------------|
466
+ {{#each mock_vs_real}}
467
+ | {{type}} | {{mock}} | {{real}} | {{hybrid}} |
468
+ {{/each}}
469
+
470
+ ### Test Container Strategy
471
+
472
+ <!-- Fill with: Docker test containers and service virtualization patterns -->
473
+
474
+ | Service | Strategy | Configuration |
475
+ |---------|----------|---------------|
476
+ {{#each test_containers}}
477
+ | {{service}} | {{strategy}} | {{configuration}} |
478
+ {{/each}}
479
+
480
+ ### Service Virtualization
481
+
482
+ <!-- Fill with: service virtualization and stub service patterns -->
483
+
484
+ **Pattern:**
485
+ {{service_virtualization_pattern}}
486
+
487
+ **Test Setup:**
488
+ ```{{language}}
489
+ {{service_virtualization_example}}
490
+ ```
491
+
492
+ ### Mock Verification Rules
493
+
494
+ <!-- Fill with: rules for verifying mock interactions in system tests -->
495
+
496
+ | Rule | Description | Example |
497
+ |------|-------------|---------|
498
+ {{#each mock_verification_rules}}
499
+ | {{name}} | {{description}} | {{example}} |
500
+ {{/each}}
501
+
502
+ **Section Source**
503
+ {{#each mocking_strategy_sources}}
504
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
505
+ {{/each}}
506
+
507
+ ## 10. Test Data Management (Platform-Specific)
508
+
509
+ <!-- AI-TAG: TEST_DATA -->
510
+ <!-- Fill with: comprehensive test dataset management, data provisioning, state management -->
511
+
512
+ ### Test Data Lifecycle
513
+
514
+ ```mermaid
515
+ graph LR
516
+ A[Data Design] --> B[Data Generation]
517
+ B --> C[Data Provisioning]
518
+ C --> D[Data Usage]
519
+ D --> E[Data Cleanup]
520
+ E -->|Reset| A
521
+ ```
522
+
523
+ ### Test Data Strategies
524
+
525
+ | Strategy | When to Use | Example | Pros/Cons |
526
+ |----------|------------|---------|-----------|
527
+ {{#each test_data_strategies}}
528
+ | {{name}} | {{when_to_use}} | {{example}} | {{pros_cons}} |
529
+ {{/each}}
530
+
531
+ ### Data Provisioning Patterns
532
+
533
+ <!-- Fill with: test data provisioning and state setup patterns -->
534
+
535
+ | Provisioning Method | Scope | Speed | Isolation |
536
+ |--------------------|-------|-------|-----------|
537
+ {{#each data_provisioning}}
538
+ | {{method}} | {{scope}} | {{speed}} | {{isolation}} |
539
+ {{/each}}
540
+
541
+ ### Test Data Sets
542
+
543
+ <!-- Fill with: predefined test data sets for different scenarios -->
544
+
545
+ | Dataset | Purpose | Size | Refresh Frequency |
546
+ |---------|---------|------|-------------------|
547
+ {{#each test_datasets}}
548
+ | {{name}} | {{purpose}} | {{size}} | {{refresh}} |
549
+ {{/each}}
550
+
551
+ ### Data State Management
552
+
553
+ <!-- Fill with: managing test data state across test executions -->
554
+
555
+ | State Type | Management Approach | Cleanup Strategy |
556
+ |------------|--------------------|------------------|
557
+ {{#each data_state_types}}
558
+ | {{type}} | {{approach}} | {{cleanup}} |
559
+ {{/each}}
560
+
561
+ **Section Source**
562
+ {{#each test_data_sources}}
563
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
564
+ {{/each}}
565
+
566
+ ## 11. Coverage Requirements
567
+
568
+ <!-- AI-TAG: COVERAGE -->
569
+ <!-- Fill with: system-level coverage metrics (functional, API, scenario coverage) -->
570
+
571
+ ### Coverage Metrics
572
+
573
+ | Metric | Minimum | Target | Scope |
574
+ |--------|---------|--------|-------|
575
+ {{#each coverage_metrics}}
576
+ | {{metric}} | {{minimum}} | {{target}} | {{scope}} |
577
+ {{/each}}
578
+
579
+ ### Functional Coverage
580
+
581
+ <!-- Fill with: functional coverage requirements -->
582
+
583
+ | Feature Category | Coverage Requirement | Measurement Method |
584
+ |------------------|---------------------|--------------------|
585
+ {{#each functional_coverage}}
586
+ | {{category}} | {{requirement}} | {{method}} |
587
+ {{/each}}
588
+
589
+ ### API Coverage
590
+
591
+ <!-- Fill with: API endpoint coverage requirements -->
592
+
593
+ | API Coverage Type | Target | Measurement |
594
+ |-------------------|--------|-------------|
595
+ {{#each api_coverage}}
596
+ | {{type}} | {{target}} | {{measurement}} |
597
+ {{/each}}
598
+
599
+ ### Scenario Coverage
600
+
601
+ <!-- Fill with: end-to-end scenario coverage requirements -->
602
+
603
+ | Scenario Type | Minimum Coverage | Priority |
604
+ |---------------|-----------------|----------|
605
+ {{#each scenario_coverage}}
606
+ | {{type}} | {{minimum}} | {{priority}} |
607
+ {{/each}}
608
+
609
+ ### Coverage Scope Rules
610
+
611
+ <!-- Fill with: inclusion and exclusion rules for coverage calculation -->
612
+
613
+ **Include:**
614
+ {{#each coverage_include}}
615
+ - {{this}}
616
+ {{/each}}
617
+
618
+ **Exclude:**
619
+ {{#each coverage_exclude}}
620
+ - {{this}}
621
+ {{/each}}
622
+
623
+ **Section Source**
624
+ {{#each coverage_sources}}
625
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
626
+ {{/each}}
627
+
628
+ ## 12. Test Reuse & Maintenance
629
+
630
+ <!-- AI-TAG: TEST_MAINTENANCE -->
631
+ <!-- Fill with: utility classes, base classes, shared steps, cleanup mechanisms -->
632
+
633
+ ### Test Utility Classes
634
+
635
+ <!-- Fill with: standardized test utility classes -->
636
+
637
+ | Utility Class | Purpose | Location |
638
+ |--------------|---------|----------|
639
+ {{#each test_utilities}}
640
+ | {{name}} | {{purpose}} | {{location}} |
641
+ {{/each}}
642
+
643
+ ### Test Base Classes and Shared Configuration
644
+
645
+ <!-- Fill with: base test classes and shared setup -->
646
+
647
+ | Base Class | Purpose | Common Setup |
648
+ |-----------|---------|--------------|
649
+ {{#each test_base_classes}}
650
+ | {{name}} | {{purpose}} | {{common_setup}} |
651
+ {{/each}}
652
+
653
+ ### Shared Test Steps
654
+
655
+ <!-- Fill with: reusable test steps and step definitions -->
656
+
657
+ | Step Category | Steps | Usage |
658
+ |---------------|-------|-------|
659
+ {{#each shared_steps}}
660
+ | {{category}} | {{steps}} | {{usage}} |
661
+ {{/each}}
662
+
663
+ ### Outdated Test Cleanup
664
+
665
+ <!-- Fill with: process for identifying and removing obsolete tests -->
666
+
667
+ | Trigger | Action | Responsible |
668
+ |---------|--------|-------------|
669
+ {{#each cleanup_triggers}}
670
+ | {{trigger}} | {{action}} | {{responsible}} |
671
+ {{/each}}
672
+
673
+ ### Test Code Refactoring Guidelines
674
+
675
+ <!-- Fill with: when and how to refactor test code -->
676
+
677
+ | Scenario | Refactoring Action | Verification |
678
+ |----------|-------------------|--------------|
679
+ {{#each refactoring_guidelines}}
680
+ | {{scenario}} | {{action}} | {{verification}} |
681
+ {{/each}}
682
+
683
+ **Section Source**
684
+ {{#each test_maintenance_sources}}
685
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
686
+ {{/each}}
687
+
688
+ ## 13. Security Testing
689
+
690
+ <!-- AI-TAG: SECURITY_TESTING -->
691
+ <!-- Fill with: security test checklist, authentication/authorization testing patterns -->
692
+
693
+ ### Security Testing Checklist
694
+
695
+ | Security Concern | Test Approach | Priority | Verification |
696
+ |-----------------|---------------|----------|--------------|
697
+ {{#each security_concerns}}
698
+ | {{concern}} | {{test_approach}} | {{priority}} | {{verification}} |
699
+ {{/each}}
700
+
701
+ ### Authentication Testing
702
+
703
+ <!-- Fill with: authentication flow testing patterns -->
704
+
705
+ | Auth Type | Test Scenarios | Verification |
706
+ |-----------|----------------|--------------|
707
+ {{#each auth_tests}}
708
+ | {{type}} | {{scenarios}} | {{verification}} |
709
+ {{/each}}
710
+
711
+ ### Authorization Testing
712
+
713
+ <!-- Fill with: role-based access control testing patterns -->
714
+
715
+ | Pattern | Use Case | Example |
716
+ |---------|----------|---------|
717
+ {{#each permission_patterns}}
718
+ | {{name}} | {{use_case}} | {{example}} |
719
+ {{/each}}
720
+
721
+ **Example:**
722
+ ```{{language}}
723
+ {{permission_test_example}}
724
+ ```
725
+
726
+ ### Input Validation Testing
727
+
728
+ <!-- Fill with: input validation and sanitization testing -->
729
+
730
+ | Validation Type | Test Cases | Expected Behavior |
731
+ |----------------|-----------|-------------------|
732
+ {{#each validation_tests}}
733
+ | {{type}} | {{test_cases}} | {{expected}} |
734
+ {{/each}}
735
+
736
+ **Section Source**
737
+ {{#each security_testing_sources}}
738
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
739
+ {{/each}}
740
+
741
+ ## 14. Performance & Load Testing
742
+
743
+ <!-- AI-TAG: PERFORMANCE_TESTING -->
744
+ <!-- Fill with: system-level performance baselines, load testing scenarios, stress testing -->
745
+
746
+ ### Performance Baselines
747
+
748
+ | Metric | Threshold | Measurement Method | Test Environment |
749
+ |--------|-----------|-------------------|------------------|
750
+ {{#each performance_baselines}}
751
+ | {{metric}} | {{threshold}} | {{measurement}} | {{environment}} |
752
+ {{/each}}
753
+
754
+ ### Load Testing Scenarios
755
+
756
+ <!-- Fill with: load testing scenarios and thresholds -->
757
+
758
+ | Scenario | Load Pattern | Duration | Success Criteria |
759
+ |----------|-------------|----------|-----------------|
760
+ {{#each load_test_scenarios}}
761
+ | {{scenario}} | {{load_pattern}} | {{duration}} | {{success_criteria}} |
762
+ {{/each}}
763
+
764
+ ### Stress Testing
765
+
766
+ <!-- Fill with: stress testing patterns and breaking point identification -->
767
+
768
+ | Stress Test Type | Approach | Target Metric |
769
+ |------------------|----------|---------------|
770
+ {{#each stress_tests}}
771
+ | {{type}} | {{approach}} | {{target}} |
772
+ {{/each}}
773
+
774
+ ### Soak/Endurance Testing
775
+
776
+ <!-- Fill with: long-running stability testing patterns -->
777
+
778
+ | Test Type | Duration | Monitoring Focus |
779
+ |-----------|----------|------------------|
780
+ {{#each soak_tests}}
781
+ | {{type}} | {{duration}} | {{focus}} |
782
+ {{/each}}
783
+
784
+ ### Performance Test Execution
785
+
786
+ **Good Example:**
787
+ ```{{language}}
788
+ {{good_perf_test_example}}
789
+ ```
790
+
791
+ **Bad Example:**
792
+ ```{{language}}
793
+ {{bad_perf_test_example}}
794
+ ```
795
+
796
+ **Section Source**
797
+ {{#each performance_testing_sources}}
798
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
799
+ {{/each}}
800
+
801
+ ## 15. Test Environment & Configuration
802
+
803
+ <!-- AI-TAG: TEST_ENVIRONMENT -->
804
+ <!-- Fill with: multi-environment configurations, environment provisioning, isolation strategies -->
805
+
806
+ ### Test Environment Configurations
807
+
808
+ | Environment | Purpose | Configuration | Data Strategy |
809
+ |-------------|---------|---------------|---------------|
810
+ {{#each environment_configs}}
811
+ | {{environment}} | {{purpose}} | {{configuration}} | {{data_strategy}} |
812
+ {{/each}}
813
+
814
+ ### Environment Provisioning
815
+
816
+ <!-- Fill with: automated environment provisioning patterns -->
817
+
818
+ | Provisioning Method | Speed | Cost | Use Case |
819
+ |--------------------|-------|------|----------|
820
+ {{#each provisioning_methods}}
821
+ | {{method}} | {{speed}} | {{cost}} | {{use_case}} |
822
+ {{/each}}
823
+
824
+ ### Configuration Isolation
825
+
826
+ <!-- Fill with: rules for isolating test configurations -->
827
+
828
+ | Isolation Level | Implementation | Scope |
829
+ |----------------|---------------|-------|
830
+ {{#each config_isolation}}
831
+ | {{level}} | {{implementation}} | {{scope}} |
832
+ {{/each}}
833
+
834
+ ### Environment Variable Management
835
+
836
+ <!-- Fill with: handling of environment variables in system tests -->
837
+
838
+ | Variable Type | Source | Override Strategy |
839
+ |--------------|--------|-------------------|
840
+ {{#each env_variables}}
841
+ | {{type}} | {{source}} | {{override}} |
842
+ {{/each}}
843
+
844
+ ### Multi-Environment Switching
845
+
846
+ <!-- Fill with: strategies for running tests across environments -->
847
+
848
+ | Strategy | Use Case | Command/Config |
849
+ |----------|----------|----------------|
850
+ {{#each env_switching}}
851
+ | {{strategy}} | {{use_case}} | {{command}} |
852
+ {{/each}}
853
+
854
+ **Section Source**
855
+ {{#each test_environment_sources}}
856
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
857
+ {{/each}}
858
+
859
+ ## 16. CI/CD Integration
860
+
861
+ <!-- AI-TAG: CICD_INTEGRATION -->
862
+ <!-- Fill with: pipeline stages, test execution strategies, coverage gates for system tests -->
863
+
864
+ ### CI/CD Test Execution Strategy
865
+
866
+ | Pipeline Stage | Test Types | Failure Action | Timeout | Parallelism |
867
+ |---------------|------------|---------------|---------|-------------|
868
+ {{#each cicd_stages}}
869
+ | {{stage}} | {{test_types}} | {{failure_action}} | {{timeout}} | {{parallelism}} |
870
+ {{/each}}
871
+
872
+ ### Coverage Gate Rules
873
+
874
+ <!-- Fill with: coverage thresholds that block pipeline progression -->
875
+
876
+ | Gate | Metric | Threshold | Block Action |
877
+ |------|--------|-----------|--------------|
878
+ {{#each coverage_gates}}
879
+ | {{gate}} | {{metric}} | {{threshold}} | {{block_action}} |
880
+ {{/each}}
881
+
882
+ ### Test Report Archival
883
+
884
+ <!-- Fill with: requirements for test report storage -->
885
+
886
+ | Report Type | Format | Retention | Location |
887
+ |------------|--------|-----------|----------|
888
+ {{#each report_archival}}
889
+ | {{type}} | {{format}} | {{retention}} | {{location}} |
890
+ {{/each}}
891
+
892
+ ### Flaky Test Handling
893
+
894
+ <!-- Fill with: process for handling flaky tests in CI/CD -->
895
+
896
+ | Scenario | Detection | Action | Follow-up |
897
+ |----------|-----------|--------|-----------|
898
+ {{#each flaky_test_handling}}
899
+ | {{scenario}} | {{detection}} | {{action}} | {{followup}} |
900
+ {{/each}}
901
+
902
+ **Section Source**
903
+ {{#each cicd_integration_sources}}
904
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
905
+ {{/each}}
906
+
907
+ ## 17. Test Report Conventions
908
+
909
+ <!-- AI-TAG: TEST_REPORT -->
910
+ <!-- Fill with: test report format, content standards, and distribution -->
911
+
912
+ ### Report Types
913
+
914
+ | Report Type | Audience | Content | Format |
915
+ |-------------|----------|---------|--------|
916
+ {{#each report_types}}
917
+ | {{type}} | {{audience}} | {{content}} | {{format}} |
918
+ {{/each}}
919
+
920
+ ### Report Structure
921
+
922
+ <!-- Fill with: standardized test report structure -->
923
+
924
+ ```
925
+ {{report_structure}}
926
+ ```
927
+
928
+ ### Report Content Standards
929
+
930
+ <!-- Fill with: required content for each report type -->
931
+
932
+ | Content Element | Description | Required |
933
+ |-----------------|-------------|----------|
934
+ {{#each report_content}}
935
+ | {{element}} | {{description}} | {{required}} |
936
+ {{/each}}
937
+
938
+ ### Report Distribution
939
+
940
+ <!-- Fill with: report distribution channels and schedules -->
941
+
942
+ | Distribution Channel | Frequency | Recipients |
943
+ |---------------------|-----------|------------|
944
+ {{#each report_distribution}}
945
+ | {{channel}} | {{frequency}} | {{recipients}} |
946
+ {{/each}}
947
+
948
+ ### Historical Trend Analysis
949
+
950
+ <!-- Fill with: tracking test metrics over time -->
951
+
952
+ | Metric | Trend Direction | Alert Threshold |
953
+ |--------|-----------------|-----------------|
954
+ {{#each trend_metrics}}
955
+ | {{metric}} | {{direction}} | {{threshold}} |
956
+ {{/each}}
957
+
958
+ **Section Source**
959
+ {{#each test_report_sources}}
960
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
961
+ {{/each}}
962
+
963
+ ## 18. Anti-Patterns & Pitfalls
964
+
965
+ <!-- AI-TAG: TEST_ANTIPATTERNS -->
966
+ <!-- Fill with: system testing anti-patterns and their better approaches -->
967
+
968
+ ### System Test Anti-Patterns
969
+
970
+ | Anti-Pattern | Description | Impact | Better Approach |
971
+ |-------------|-------------|--------|----------------|
972
+ {{#each anti_patterns}}
973
+ | {{name}} | {{description}} | {{impact}} | {{better_approach}} |
974
+ {{/each}}
975
+
976
+ ### Common Failure Scenarios and Solutions
977
+
978
+ <!-- Fill with: frequent test failures and resolution strategies -->
979
+
980
+ | Failure Scenario | Root Cause | Quick Fix | Prevention |
981
+ |-----------------|------------|-----------|------------|
982
+ {{#each failure_scenarios}}
983
+ | {{scenario}} | {{root_cause}} | {{quick_fix}} | {{prevention}} |
984
+ {{/each}}
985
+
986
+ ### Test Smell Detection
987
+
988
+ <!-- Fill with: indicators of poorly written system tests -->
989
+
990
+ | Smell | Indicator | Refactoring |
991
+ |-------|-----------|-------------|
992
+ {{#each test_smells}}
993
+ | {{name}} | {{indicator}} | {{refactoring}} |
994
+ {{/each}}
995
+
996
+ **Section Source**
997
+ {{#each antipattern_sources}}
998
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
999
+ {{/each}}
1000
+
1001
+ ## Appendix
1002
+
1003
+ ### Testing Best Practices Summary
1004
+
1005
+ <!-- Fill with: concise summary of key system testing best practices -->
1006
+
1007
+ {{#each testing_best_practices}}
1008
+ - **{{title}}**: {{description}}
1009
+ {{/each}}
1010
+
1011
+ ### Common Test Scenarios
1012
+
1013
+ <!-- Fill with: examples of common system testing scenarios -->
1014
+
1015
+ {{#each common_test_scenarios}}
1016
+ #### {{name}}
1017
+
1018
+ {{description}}
1019
+
1020
+ ```{{language}}
1021
+ {{example}}
1022
+ ```
1023
+
1024
+ {{/each}}
1025
+
1026
+ ### Test Commands Quick Reference
1027
+
1028
+ <!-- Fill with: common test execution commands -->
1029
+
1030
+ {{#each test_commands}}
1031
+ #### {{name}}
1032
+
1033
+ ```bash
1034
+ {{command}}
1035
+ ```
1036
+
1037
+ {{description}}
1038
+
1039
+ {{/each}}
1040
+
1041
+ ### Version History
1042
+
1043
+ | Version | Date | Author | Changes |
1044
+ |---------|------|--------|---------|
1045
+ {{#each version_history}}
1046
+ | {{version}} | {{date}} | {{author}} | {{changes}} |
1047
+ {{/each}}
1048
+
1049
+ **Section Source**
1050
+ {{#each appendix_sources}}
1051
+ - [{{name}}]({{path}}#L{{start}}-L{{end}})
1052
+ {{/each}}