agentic-qe 3.7.9 → 3.7.11

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 (401) hide show
  1. package/.claude/skills/.validation/README.md +111 -111
  2. package/.claude/skills/.validation/examples/chaos-engineering-output.example.json +530 -530
  3. package/.claude/skills/.validation/examples/performance-testing-output.example.json +252 -252
  4. package/.claude/skills/.validation/examples/security-testing-output.example.json +413 -413
  5. package/.claude/skills/.validation/examples/testability-scoring-output.example.json +350 -350
  6. package/.claude/skills/.validation/schemas/skill-eval.schema.json +462 -462
  7. package/.claude/skills/.validation/schemas/skill-frontmatter.schema.json +341 -341
  8. package/.claude/skills/.validation/schemas/skill-output-meta.schema.json +199 -199
  9. package/.claude/skills/.validation/schemas/skill-output.template.json +610 -610
  10. package/.claude/skills/.validation/skill-validation-mcp-integration.md +250 -250
  11. package/.claude/skills/.validation/templates/eval.template.yaml +366 -366
  12. package/.claude/skills/.validation/templates/schemas/output.json +145 -145
  13. package/.claude/skills/.validation/templates/security-testing-eval.template.yaml +725 -725
  14. package/.claude/skills/.validation/templates/skill-frontmatter.example.yaml +225 -225
  15. package/.claude/skills/.validation/test-data/invalid-output.json +5 -5
  16. package/.claude/skills/.validation/test-data/minimal-output.json +9 -9
  17. package/.claude/skills/.validation/test-data/sample-output.json +73 -73
  18. package/.claude/skills/a11y-ally/evals/a11y-ally.yaml +376 -376
  19. package/.claude/skills/a11y-ally/schemas/output.json +549 -549
  20. package/.claude/skills/accessibility-testing/evals/accessibility-testing.yaml +719 -719
  21. package/.claude/skills/accessibility-testing/schemas/output.json +776 -776
  22. package/.claude/skills/accessibility-testing/test-data/sample-output.json +191 -191
  23. package/.claude/skills/agentic-quality-engineering/schemas/output.json +577 -577
  24. package/.claude/skills/api-testing-patterns/evals/api-testing-patterns.yaml +696 -696
  25. package/.claude/skills/api-testing-patterns/schemas/output.json +845 -845
  26. package/.claude/skills/aqe-v2-v3-migration/schemas/output.json +513 -513
  27. package/.claude/skills/brutal-honesty-review/schemas/output.json +291 -291
  28. package/.claude/skills/bug-reporting-excellence/schemas/output.json +288 -288
  29. package/.claude/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +761 -761
  30. package/.claude/skills/chaos-engineering-resilience/schemas/output.json +1205 -1205
  31. package/.claude/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +157 -157
  32. package/.claude/skills/cicd-pipeline-qe-orchestrator/schemas/output.json +542 -542
  33. package/.claude/skills/code-review-quality/schemas/output.json +264 -264
  34. package/.claude/skills/compatibility-testing/evals/compatibility-testing.yaml +410 -410
  35. package/.claude/skills/compatibility-testing/schemas/output.json +551 -551
  36. package/.claude/skills/compliance-testing/evals/compliance-testing.yaml +1107 -1107
  37. package/.claude/skills/compliance-testing/schemas/output.json +845 -845
  38. package/.claude/skills/consultancy-practices/schemas/output.json +282 -282
  39. package/.claude/skills/contract-testing/evals/contract-testing.yaml +748 -748
  40. package/.claude/skills/contract-testing/schemas/output.json +638 -638
  41. package/.claude/skills/database-testing/evals/database-testing.yaml +968 -968
  42. package/.claude/skills/database-testing/schemas/output.json +1446 -1446
  43. package/.claude/skills/debug-loop/SKILL.md +61 -61
  44. package/.claude/skills/enterprise-integration-testing/SKILL.md +735 -735
  45. package/.claude/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +158 -158
  46. package/.claude/skills/enterprise-integration-testing/schemas/output.json +74 -74
  47. package/.claude/skills/enterprise-integration-testing/scripts/validate-config.json +25 -25
  48. package/.claude/skills/iterative-loop/SKILL.md +371 -371
  49. package/.claude/skills/localization-testing/evals/localization-testing.yaml +544 -544
  50. package/.claude/skills/localization-testing/schemas/output.json +325 -325
  51. package/.claude/skills/middleware-testing-patterns/SKILL.md +798 -798
  52. package/.claude/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +153 -153
  53. package/.claude/skills/middleware-testing-patterns/schemas/output.json +58 -58
  54. package/.claude/skills/middleware-testing-patterns/scripts/validate-config.json +25 -25
  55. package/.claude/skills/mobile-testing/evals/mobile-testing.yaml +537 -537
  56. package/.claude/skills/mobile-testing/schemas/output.json +318 -318
  57. package/.claude/skills/mutation-testing/evals/mutation-testing.yaml +652 -652
  58. package/.claude/skills/mutation-testing/schemas/output.json +707 -707
  59. package/.claude/skills/mutation-testing/test-data/sample-output.json +295 -295
  60. package/.claude/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +450 -450
  61. package/.claude/skills/n8n-expression-testing/schemas/output.json +369 -369
  62. package/.claude/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +522 -522
  63. package/.claude/skills/n8n-integration-testing-patterns/schemas/output.json +291 -291
  64. package/.claude/skills/n8n-security-testing/evals/n8n-security-testing.yaml +493 -493
  65. package/.claude/skills/n8n-security-testing/schemas/output.json +293 -293
  66. package/.claude/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +500 -500
  67. package/.claude/skills/n8n-trigger-testing-strategies/schemas/output.json +295 -295
  68. package/.claude/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +497 -497
  69. package/.claude/skills/n8n-workflow-testing-fundamentals/schemas/output.json +254 -254
  70. package/.claude/skills/observability-testing-patterns/SKILL.md +930 -930
  71. package/.claude/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +157 -157
  72. package/.claude/skills/observability-testing-patterns/schemas/output.json +58 -58
  73. package/.claude/skills/observability-testing-patterns/scripts/validate-config.json +25 -25
  74. package/.claude/skills/pentest-validation/SKILL.md +268 -268
  75. package/.claude/skills/pentest-validation/evals/pentest-validation.yaml +708 -708
  76. package/.claude/skills/pentest-validation/schemas/output.json +281 -281
  77. package/.claude/skills/performance-analysis/evals/performance-analysis.yaml +144 -144
  78. package/.claude/skills/performance-analysis/schemas/output.json +588 -588
  79. package/.claude/skills/performance-testing/evals/performance-testing.yaml +772 -772
  80. package/.claude/skills/performance-testing/schemas/output.json +1184 -1184
  81. package/.claude/skills/pr-review/SKILL.md +61 -61
  82. package/.claude/skills/qcsd-cicd-swarm/SKILL.md +2206 -2206
  83. package/.claude/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +211 -211
  84. package/.claude/skills/qcsd-cicd-swarm/schemas/output.json +86 -86
  85. package/.claude/skills/qcsd-cicd-swarm/scripts/validate-config.json +30 -30
  86. package/.claude/skills/qcsd-development-swarm/SKILL.md +2154 -2154
  87. package/.claude/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +162 -162
  88. package/.claude/skills/qcsd-development-swarm/schemas/output.json +72 -72
  89. package/.claude/skills/qcsd-development-swarm/scripts/validate-config.json +25 -25
  90. package/.claude/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +138 -138
  91. package/.claude/skills/qcsd-ideation-swarm/schemas/output.json +568 -568
  92. package/.claude/skills/qcsd-production-swarm/SKILL.md +2781 -2781
  93. package/.claude/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +246 -246
  94. package/.claude/skills/qcsd-production-swarm/schemas/output.json +505 -505
  95. package/.claude/skills/qcsd-production-swarm/scripts/validate-config.json +25 -25
  96. package/.claude/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +443 -443
  97. package/.claude/skills/qe-chaos-resilience/schemas/output.json +314 -314
  98. package/.claude/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +459 -459
  99. package/.claude/skills/qe-code-intelligence/schemas/output.json +315 -315
  100. package/.claude/skills/qe-contract-testing/evals/qe-contract-testing.yaml +513 -513
  101. package/.claude/skills/qe-contract-testing/schemas/output.json +295 -295
  102. package/.claude/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +494 -494
  103. package/.claude/skills/qe-coverage-analysis/schemas/output.json +286 -286
  104. package/.claude/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +511 -511
  105. package/.claude/skills/qe-defect-intelligence/schemas/output.json +283 -283
  106. package/.claude/skills/qe-iterative-loop/schemas/output.json +264 -264
  107. package/.claude/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +144 -144
  108. package/.claude/skills/qe-learning-optimization/schemas/output.json +288 -288
  109. package/.claude/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +506 -506
  110. package/.claude/skills/qe-quality-assessment/schemas/output.json +550 -550
  111. package/.claude/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +598 -598
  112. package/.claude/skills/qe-requirements-validation/schemas/output.json +587 -587
  113. package/.claude/skills/qe-security-compliance/evals/qe-security-compliance.yaml +595 -595
  114. package/.claude/skills/qe-security-compliance/schemas/output.json +498 -498
  115. package/.claude/skills/qe-test-execution/evals/qe-test-execution.yaml +607 -607
  116. package/.claude/skills/qe-test-execution/schemas/output.json +529 -529
  117. package/.claude/skills/qe-test-generation/evals/qe-test-generation.yaml +148 -148
  118. package/.claude/skills/qe-test-generation/schemas/output.json +439 -439
  119. package/.claude/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +142 -142
  120. package/.claude/skills/qe-visual-accessibility/schemas/output.json +491 -491
  121. package/.claude/skills/quality-metrics/evals/quality-metrics.yaml +494 -494
  122. package/.claude/skills/quality-metrics/schemas/output.json +403 -403
  123. package/.claude/skills/refactoring-patterns/schemas/output.json +475 -475
  124. package/.claude/skills/regression-testing/evals/regression-testing.yaml +504 -504
  125. package/.claude/skills/regression-testing/schemas/output.json +311 -311
  126. package/.claude/skills/release/SKILL.md +347 -347
  127. package/.claude/skills/risk-based-testing/evals/risk-based-testing.yaml +141 -141
  128. package/.claude/skills/risk-based-testing/schemas/output.json +480 -480
  129. package/.claude/skills/security-testing/evals/security-testing.yaml +789 -789
  130. package/.claude/skills/security-testing/schemas/output.json +879 -879
  131. package/.claude/skills/security-visual-testing/evals/security-visual-testing.yaml +163 -163
  132. package/.claude/skills/security-visual-testing/schemas/output.json +486 -486
  133. package/.claude/skills/sfdipot-product-factors/SKILL.md +239 -239
  134. package/.claude/skills/sherlock-review/schemas/output.json +297 -297
  135. package/.claude/skills/shift-left-testing/evals/shift-left-testing.yaml +145 -145
  136. package/.claude/skills/shift-left-testing/schemas/output.json +459 -459
  137. package/.claude/skills/shift-right-testing/evals/shift-right-testing.yaml +147 -147
  138. package/.claude/skills/shift-right-testing/schemas/output.json +418 -418
  139. package/.claude/skills/skills-manifest.json +1 -1
  140. package/.claude/skills/tdd-london-chicago/schemas/output.json +444 -444
  141. package/.claude/skills/technical-writing/schemas/output.json +268 -268
  142. package/.claude/skills/test-automation-strategy/evals/test-automation-strategy.yaml +148 -148
  143. package/.claude/skills/test-automation-strategy/schemas/output.json +444 -444
  144. package/.claude/skills/test-data-management/evals/test-data-management.yaml +504 -504
  145. package/.claude/skills/test-data-management/schemas/output.json +284 -284
  146. package/.claude/skills/test-design-techniques/evals/test-design-techniques.yaml +142 -142
  147. package/.claude/skills/test-design-techniques/schemas/output.json +295 -295
  148. package/.claude/skills/test-environment-management/schemas/output.json +310 -310
  149. package/.claude/skills/test-idea-rewriting/SKILL.md +229 -229
  150. package/.claude/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +155 -155
  151. package/.claude/skills/test-reporting-analytics/schemas/output.json +329 -329
  152. package/.claude/skills/testability-scoring/evals/testability-scoring.yaml +814 -814
  153. package/.claude/skills/testability-scoring/resources/templates/config.template.js +84 -84
  154. package/.claude/skills/testability-scoring/schemas/output.json +606 -606
  155. package/.claude/skills/testability-scoring/scripts/generate-html-report.js +1007 -1007
  156. package/.claude/skills/verification-quality/evals/verification-quality.yaml +150 -150
  157. package/.claude/skills/verification-quality/schemas/output.json +432 -432
  158. package/.claude/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +154 -154
  159. package/.claude/skills/visual-testing-advanced/schemas/output.json +294 -294
  160. package/.claude/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +165 -165
  161. package/.claude/skills/wms-testing-patterns/schemas/output.json +150 -150
  162. package/.claude/skills/wms-testing-patterns/scripts/validate-config.json +51 -51
  163. package/CHANGELOG.md +36 -0
  164. package/README.md +171 -901
  165. package/assets/agents/v3/helpers/quality-criteria/evidence-classification.md +116 -116
  166. package/assets/agents/v3/helpers/quality-criteria/htsm-categories.md +139 -139
  167. package/assets/governance/constitution.md +202 -202
  168. package/assets/governance/shards/chaos-resilience.shard.md +221 -221
  169. package/assets/governance/shards/code-intelligence.shard.md +178 -178
  170. package/assets/governance/shards/contract-testing.shard.md +206 -206
  171. package/assets/governance/shards/coverage-analysis.shard.md +146 -146
  172. package/assets/governance/shards/defect-intelligence.shard.md +182 -182
  173. package/assets/governance/shards/learning-optimization.shard.md +248 -248
  174. package/assets/governance/shards/quality-assessment.shard.md +165 -165
  175. package/assets/governance/shards/requirements-validation.shard.md +177 -177
  176. package/assets/governance/shards/security-compliance.shard.md +196 -196
  177. package/assets/governance/shards/test-execution.shard.md +156 -156
  178. package/assets/governance/shards/test-generation.shard.md +128 -128
  179. package/assets/governance/shards/visual-accessibility.shard.md +209 -209
  180. package/assets/hooks/cross-phase-memory.yaml +253 -253
  181. package/assets/patterns/adr-051-booster-patterns.json +78 -78
  182. package/assets/patterns/adr-051-embedding-patterns.json +147 -147
  183. package/assets/patterns/adr-051-integration-summary.json +62 -62
  184. package/assets/patterns/adr-051-reasoning-patterns.json +166 -166
  185. package/assets/patterns/adr-051-router-patterns.json +113 -113
  186. package/assets/patterns/index.json +136 -136
  187. package/assets/skills/.validation/README.md +111 -111
  188. package/assets/skills/.validation/examples/chaos-engineering-output.example.json +530 -530
  189. package/assets/skills/.validation/examples/performance-testing-output.example.json +252 -252
  190. package/assets/skills/.validation/examples/security-testing-output.example.json +413 -413
  191. package/assets/skills/.validation/examples/testability-scoring-output.example.json +350 -350
  192. package/assets/skills/.validation/schemas/skill-eval.schema.json +462 -462
  193. package/assets/skills/.validation/schemas/skill-frontmatter.schema.json +341 -341
  194. package/assets/skills/.validation/schemas/skill-output-meta.schema.json +199 -199
  195. package/assets/skills/.validation/schemas/skill-output.template.json +610 -610
  196. package/assets/skills/.validation/skill-validation-mcp-integration.md +250 -250
  197. package/assets/skills/.validation/templates/eval.template.yaml +366 -366
  198. package/assets/skills/.validation/templates/schemas/output.json +145 -145
  199. package/assets/skills/.validation/templates/security-testing-eval.template.yaml +725 -725
  200. package/assets/skills/.validation/templates/skill-frontmatter.example.yaml +225 -225
  201. package/assets/skills/.validation/test-data/invalid-output.json +5 -5
  202. package/assets/skills/.validation/test-data/minimal-output.json +9 -9
  203. package/assets/skills/.validation/test-data/sample-output.json +73 -73
  204. package/assets/skills/a11y-ally/evals/a11y-ally.yaml +376 -376
  205. package/assets/skills/a11y-ally/schemas/output.json +549 -549
  206. package/assets/skills/accessibility-testing/evals/accessibility-testing.yaml +719 -719
  207. package/assets/skills/accessibility-testing/schemas/output.json +776 -776
  208. package/assets/skills/accessibility-testing/test-data/sample-output.json +191 -191
  209. package/assets/skills/agentic-quality-engineering/schemas/output.json +577 -577
  210. package/assets/skills/api-testing-patterns/evals/api-testing-patterns.yaml +696 -696
  211. package/assets/skills/api-testing-patterns/schemas/output.json +845 -845
  212. package/assets/skills/aqe-v2-v3-migration/schemas/output.json +513 -513
  213. package/assets/skills/brutal-honesty-review/schemas/output.json +291 -291
  214. package/assets/skills/bug-reporting-excellence/schemas/output.json +288 -288
  215. package/assets/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +761 -761
  216. package/assets/skills/chaos-engineering-resilience/schemas/output.json +1205 -1205
  217. package/assets/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +157 -157
  218. package/assets/skills/cicd-pipeline-qe-orchestrator/schemas/output.json +542 -542
  219. package/assets/skills/code-review-quality/schemas/output.json +264 -264
  220. package/assets/skills/compatibility-testing/evals/compatibility-testing.yaml +410 -410
  221. package/assets/skills/compatibility-testing/schemas/output.json +551 -551
  222. package/assets/skills/compliance-testing/evals/compliance-testing.yaml +1107 -1107
  223. package/assets/skills/compliance-testing/schemas/output.json +845 -845
  224. package/assets/skills/consultancy-practices/schemas/output.json +282 -282
  225. package/assets/skills/contract-testing/evals/contract-testing.yaml +748 -748
  226. package/assets/skills/contract-testing/schemas/output.json +638 -638
  227. package/assets/skills/database-testing/evals/database-testing.yaml +968 -968
  228. package/assets/skills/database-testing/schemas/output.json +1446 -1446
  229. package/assets/skills/debug-loop/SKILL.md +61 -61
  230. package/assets/skills/enterprise-integration-testing/SKILL.md +735 -735
  231. package/assets/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +158 -158
  232. package/assets/skills/enterprise-integration-testing/schemas/output.json +74 -74
  233. package/assets/skills/enterprise-integration-testing/scripts/validate-config.json +25 -25
  234. package/assets/skills/localization-testing/evals/localization-testing.yaml +544 -544
  235. package/assets/skills/localization-testing/schemas/output.json +325 -325
  236. package/assets/skills/middleware-testing-patterns/SKILL.md +798 -798
  237. package/assets/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +153 -153
  238. package/assets/skills/middleware-testing-patterns/schemas/output.json +58 -58
  239. package/assets/skills/middleware-testing-patterns/scripts/validate-config.json +25 -25
  240. package/assets/skills/mobile-testing/evals/mobile-testing.yaml +537 -537
  241. package/assets/skills/mobile-testing/schemas/output.json +318 -318
  242. package/assets/skills/mutation-testing/evals/mutation-testing.yaml +652 -652
  243. package/assets/skills/mutation-testing/schemas/output.json +707 -707
  244. package/assets/skills/mutation-testing/test-data/sample-output.json +295 -295
  245. package/assets/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +450 -450
  246. package/assets/skills/n8n-expression-testing/schemas/output.json +369 -369
  247. package/assets/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +522 -522
  248. package/assets/skills/n8n-integration-testing-patterns/schemas/output.json +291 -291
  249. package/assets/skills/n8n-security-testing/evals/n8n-security-testing.yaml +493 -493
  250. package/assets/skills/n8n-security-testing/schemas/output.json +293 -293
  251. package/assets/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +500 -500
  252. package/assets/skills/n8n-trigger-testing-strategies/schemas/output.json +295 -295
  253. package/assets/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +497 -497
  254. package/assets/skills/n8n-workflow-testing-fundamentals/schemas/output.json +254 -254
  255. package/assets/skills/observability-testing-patterns/SKILL.md +930 -930
  256. package/assets/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +157 -157
  257. package/assets/skills/observability-testing-patterns/schemas/output.json +58 -58
  258. package/assets/skills/observability-testing-patterns/scripts/validate-config.json +25 -25
  259. package/assets/skills/pentest-validation/SKILL.md +268 -268
  260. package/assets/skills/pentest-validation/evals/pentest-validation.yaml +708 -708
  261. package/assets/skills/pentest-validation/schemas/output.json +281 -281
  262. package/assets/skills/performance-testing/evals/performance-testing.yaml +772 -772
  263. package/assets/skills/performance-testing/schemas/output.json +1184 -1184
  264. package/assets/skills/pr-review/SKILL.md +61 -61
  265. package/assets/skills/qcsd-cicd-swarm/SKILL.md +2206 -2206
  266. package/assets/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +211 -211
  267. package/assets/skills/qcsd-cicd-swarm/schemas/output.json +86 -86
  268. package/assets/skills/qcsd-cicd-swarm/scripts/validate-config.json +30 -30
  269. package/assets/skills/qcsd-development-swarm/SKILL.md +2154 -2154
  270. package/assets/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +162 -162
  271. package/assets/skills/qcsd-development-swarm/schemas/output.json +72 -72
  272. package/assets/skills/qcsd-development-swarm/scripts/validate-config.json +25 -25
  273. package/assets/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +138 -138
  274. package/assets/skills/qcsd-ideation-swarm/schemas/output.json +568 -568
  275. package/assets/skills/qcsd-production-swarm/SKILL.md +2781 -2781
  276. package/assets/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +246 -246
  277. package/assets/skills/qcsd-production-swarm/schemas/output.json +505 -505
  278. package/assets/skills/qcsd-production-swarm/scripts/validate-config.json +25 -25
  279. package/assets/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +443 -443
  280. package/assets/skills/qe-chaos-resilience/schemas/output.json +314 -314
  281. package/assets/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +459 -459
  282. package/assets/skills/qe-code-intelligence/schemas/output.json +315 -315
  283. package/assets/skills/qe-contract-testing/evals/qe-contract-testing.yaml +513 -513
  284. package/assets/skills/qe-contract-testing/schemas/output.json +295 -295
  285. package/assets/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +494 -494
  286. package/assets/skills/qe-coverage-analysis/schemas/output.json +286 -286
  287. package/assets/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +511 -511
  288. package/assets/skills/qe-defect-intelligence/schemas/output.json +283 -283
  289. package/assets/skills/qe-iterative-loop/schemas/output.json +264 -264
  290. package/assets/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +144 -144
  291. package/assets/skills/qe-learning-optimization/schemas/output.json +288 -288
  292. package/assets/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +506 -506
  293. package/assets/skills/qe-quality-assessment/schemas/output.json +550 -550
  294. package/assets/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +598 -598
  295. package/assets/skills/qe-requirements-validation/schemas/output.json +587 -587
  296. package/assets/skills/qe-security-compliance/evals/qe-security-compliance.yaml +595 -595
  297. package/assets/skills/qe-security-compliance/schemas/output.json +498 -498
  298. package/assets/skills/qe-test-execution/evals/qe-test-execution.yaml +607 -607
  299. package/assets/skills/qe-test-execution/schemas/output.json +529 -529
  300. package/assets/skills/qe-test-generation/evals/qe-test-generation.yaml +148 -148
  301. package/assets/skills/qe-test-generation/schemas/output.json +439 -439
  302. package/assets/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +142 -142
  303. package/assets/skills/qe-visual-accessibility/schemas/output.json +491 -491
  304. package/assets/skills/quality-metrics/evals/quality-metrics.yaml +494 -494
  305. package/assets/skills/quality-metrics/schemas/output.json +403 -403
  306. package/assets/skills/refactoring-patterns/schemas/output.json +475 -475
  307. package/assets/skills/regression-testing/evals/regression-testing.yaml +504 -504
  308. package/assets/skills/regression-testing/schemas/output.json +311 -311
  309. package/assets/skills/risk-based-testing/evals/risk-based-testing.yaml +141 -141
  310. package/assets/skills/risk-based-testing/schemas/output.json +480 -480
  311. package/assets/skills/security-testing/evals/security-testing.yaml +789 -789
  312. package/assets/skills/security-testing/schemas/output.json +879 -879
  313. package/assets/skills/security-visual-testing/evals/security-visual-testing.yaml +163 -163
  314. package/assets/skills/security-visual-testing/schemas/output.json +486 -486
  315. package/assets/skills/sfdipot-product-factors/SKILL.md +239 -239
  316. package/assets/skills/sherlock-review/schemas/output.json +297 -297
  317. package/assets/skills/shift-left-testing/evals/shift-left-testing.yaml +145 -145
  318. package/assets/skills/shift-left-testing/schemas/output.json +459 -459
  319. package/assets/skills/shift-right-testing/evals/shift-right-testing.yaml +147 -147
  320. package/assets/skills/shift-right-testing/schemas/output.json +418 -418
  321. package/assets/skills/tdd-london-chicago/schemas/output.json +444 -444
  322. package/assets/skills/technical-writing/schemas/output.json +268 -268
  323. package/assets/skills/test-automation-strategy/evals/test-automation-strategy.yaml +148 -148
  324. package/assets/skills/test-automation-strategy/schemas/output.json +444 -444
  325. package/assets/skills/test-data-management/evals/test-data-management.yaml +504 -504
  326. package/assets/skills/test-data-management/schemas/output.json +284 -284
  327. package/assets/skills/test-design-techniques/evals/test-design-techniques.yaml +142 -142
  328. package/assets/skills/test-design-techniques/schemas/output.json +295 -295
  329. package/assets/skills/test-environment-management/schemas/output.json +310 -310
  330. package/assets/skills/test-idea-rewriting/SKILL.md +229 -229
  331. package/assets/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +155 -155
  332. package/assets/skills/test-reporting-analytics/schemas/output.json +329 -329
  333. package/assets/skills/testability-scoring/evals/testability-scoring.yaml +814 -814
  334. package/assets/skills/testability-scoring/resources/templates/config.template.js +84 -84
  335. package/assets/skills/testability-scoring/schemas/output.json +606 -606
  336. package/assets/skills/testability-scoring/scripts/generate-html-report.js +1007 -1007
  337. package/assets/skills/verification-quality/evals/verification-quality.yaml +150 -150
  338. package/assets/skills/verification-quality/schemas/output.json +432 -432
  339. package/assets/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +154 -154
  340. package/assets/skills/visual-testing-advanced/schemas/output.json +294 -294
  341. package/assets/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +165 -165
  342. package/assets/skills/wms-testing-patterns/schemas/output.json +150 -150
  343. package/assets/skills/wms-testing-patterns/scripts/validate-config.json +51 -51
  344. package/assets/templates/validation-summary.json +56 -56
  345. package/dist/agents/claim-verifier/verifiers/output-verifier.d.ts +1 -0
  346. package/dist/agents/claim-verifier/verifiers/output-verifier.d.ts.map +1 -1
  347. package/dist/agents/claim-verifier/verifiers/output-verifier.js +16 -3
  348. package/dist/agents/claim-verifier/verifiers/output-verifier.js.map +1 -1
  349. package/dist/cli/bundle.js +488 -75
  350. package/dist/cli/commands/mcp.d.ts.map +1 -1
  351. package/dist/cli/commands/mcp.js +11 -9
  352. package/dist/cli/commands/mcp.js.map +1 -1
  353. package/dist/governance/adversarial-defense-integration.d.ts +29 -0
  354. package/dist/governance/adversarial-defense-integration.d.ts.map +1 -1
  355. package/dist/governance/adversarial-defense-integration.js +85 -1
  356. package/dist/governance/adversarial-defense-integration.js.map +1 -1
  357. package/dist/governance/continue-gate-integration.d.ts +7 -5
  358. package/dist/governance/continue-gate-integration.d.ts.map +1 -1
  359. package/dist/governance/continue-gate-integration.js +72 -15
  360. package/dist/governance/continue-gate-integration.js.map +1 -1
  361. package/dist/governance/deterministic-gateway-integration.d.ts +5 -0
  362. package/dist/governance/deterministic-gateway-integration.d.ts.map +1 -1
  363. package/dist/governance/deterministic-gateway-integration.js +35 -1
  364. package/dist/governance/deterministic-gateway-integration.js.map +1 -1
  365. package/dist/governance/evolution-pipeline-integration.d.ts +5 -0
  366. package/dist/governance/evolution-pipeline-integration.d.ts.map +1 -1
  367. package/dist/governance/evolution-pipeline-integration.js +57 -1
  368. package/dist/governance/evolution-pipeline-integration.js.map +1 -1
  369. package/dist/governance/memory-write-gate-integration.d.ts +6 -3
  370. package/dist/governance/memory-write-gate-integration.d.ts.map +1 -1
  371. package/dist/governance/memory-write-gate-integration.js +48 -10
  372. package/dist/governance/memory-write-gate-integration.js.map +1 -1
  373. package/dist/governance/proof-envelope-integration.d.ts +1 -0
  374. package/dist/governance/proof-envelope-integration.d.ts.map +1 -1
  375. package/dist/governance/proof-envelope-integration.js +37 -0
  376. package/dist/governance/proof-envelope-integration.js.map +1 -1
  377. package/dist/governance/shard-retriever-integration.d.ts +10 -0
  378. package/dist/governance/shard-retriever-integration.d.ts.map +1 -1
  379. package/dist/governance/shard-retriever-integration.js +50 -1
  380. package/dist/governance/shard-retriever-integration.js.map +1 -1
  381. package/dist/governance/trust-accumulator-integration.d.ts +5 -0
  382. package/dist/governance/trust-accumulator-integration.d.ts.map +1 -1
  383. package/dist/governance/trust-accumulator-integration.js +35 -2
  384. package/dist/governance/trust-accumulator-integration.js.map +1 -1
  385. package/dist/init/phases/10-workers.js +2 -2
  386. package/dist/init/phases/10-workers.js.map +1 -1
  387. package/dist/mcp/bundle.js +478 -62
  388. package/dist/mcp/protocol-server.js +2 -2
  389. package/dist/mcp/tool-registry.d.ts.map +1 -1
  390. package/dist/mcp/tool-registry.js +1 -0
  391. package/dist/mcp/tool-registry.js.map +1 -1
  392. package/dist/shared/language-detector.js +1 -1
  393. package/dist/shared/language-detector.js.map +1 -1
  394. package/dist/shared/parsers/multi-language-parser.d.ts.map +1 -1
  395. package/dist/shared/parsers/multi-language-parser.js +55 -16
  396. package/dist/shared/parsers/multi-language-parser.js.map +1 -1
  397. package/dist/shared/sql-safety.d.ts.map +1 -1
  398. package/dist/shared/sql-safety.js +7 -1
  399. package/dist/shared/sql-safety.js.map +1 -1
  400. package/package.json +6 -2
  401. package/scripts/prepare-assets.sh +8 -0
@@ -1,1007 +1,1007 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Testability Scorer - HTML Report Generator
4
- *
5
- * Generates professional HTML reports with Chart.js visualizations
6
- * matching the style from https://github.com/fndlalit/testability-scorer
7
- */
8
-
9
- const fs = require('fs');
10
- const path = require('path');
11
-
12
- // Parse command line arguments
13
- const args = process.argv.slice(2);
14
- let reportData = args[0] ? JSON.parse(fs.readFileSync(args[0], 'utf8')) : null;
15
-
16
- if (!reportData) {
17
- console.error('Usage: node generate-html-report.js <results.json>');
18
- process.exit(1);
19
- }
20
-
21
- /**
22
- * Normalize report data format
23
- * Handles both legacy format (overall/principles) and new format (overallScore/categories)
24
- * Also maps generic categories to 10 Testability Principles when needed
25
- */
26
- function normalizeReportData(data) {
27
- const normalized = { ...data };
28
-
29
- // Normalize overall score
30
- if (data.overallScore !== undefined && data.overall === undefined) {
31
- normalized.overall = data.overallScore;
32
- }
33
-
34
- // Map generic categories to 10 Testability Principles if needed
35
- if (data.categories && !data.principles) {
36
- const categories = data.categories;
37
-
38
- // Check if this is generic quality assessment (functionality, usability, etc.)
39
- // vs testability principles (observability, controllability, etc.)
40
- const hasGenericCategories = categories.functionality || categories.usability || categories.performance;
41
-
42
- if (hasGenericCategories) {
43
- // Map to 10 Testability Principles with proper weights
44
- normalized.principles = {
45
- observability: {
46
- score: Math.round((categories.functionality?.score || 75) * 0.9),
47
- weight: 0.15,
48
- description: 'Transparency of product states and behavior'
49
- },
50
- controllability: {
51
- score: Math.round((categories.functionality?.score || 75) * 0.95),
52
- weight: 0.15,
53
- description: 'Capacity to provide any input and invoke any state'
54
- },
55
- algorithmicSimplicity: {
56
- score: Math.round((categories.maintainability?.score || 75) * 0.9),
57
- weight: 0.10,
58
- description: 'Clear relationships between inputs and outputs'
59
- },
60
- algorithmicTransparency: {
61
- score: Math.round((categories.maintainability?.score || 75) * 0.95),
62
- weight: 0.10,
63
- description: 'Understanding how the product produces output'
64
- },
65
- explainability: {
66
- score: Math.round((categories.usability?.score || 75) * 0.9),
67
- weight: 0.10,
68
- description: 'Design understandable to outsiders'
69
- },
70
- similarity: {
71
- score: Math.round((categories.maintainability?.score || 75) * 0.85),
72
- weight: 0.05,
73
- description: 'Resemblance to known technology'
74
- },
75
- algorithmicStability: {
76
- score: Math.round((categories.maintainability?.score || 75) * 0.92),
77
- weight: 0.10,
78
- description: 'Changes do not disturb logic'
79
- },
80
- unbugginess: {
81
- score: Math.round((categories.functionality?.score || 75) * 0.88),
82
- weight: 0.10,
83
- description: 'Minimal defects that slow testing'
84
- },
85
- smallness: {
86
- score: Math.round((categories.performance?.score || 75) * 0.9),
87
- weight: 0.10,
88
- description: 'Less product means less to examine'
89
- },
90
- decomposability: {
91
- score: Math.round((categories.maintainability?.score || 75) * 0.87),
92
- weight: 0.05,
93
- description: 'Parts can be separated for testing'
94
- }
95
- };
96
- } else {
97
- // Already has testability principles, just use them
98
- normalized.principles = categories;
99
- }
100
- }
101
-
102
- // Ensure timestamp exists
103
- if (!normalized.timestamp) {
104
- normalized.timestamp = data.metadata?.assessmentDate || new Date().toISOString();
105
- }
106
-
107
- // Normalize recommendations to ensure all have required fields
108
- if (Array.isArray(normalized.recommendations)) {
109
- normalized.recommendations = normalized.recommendations.map((rec, index) => {
110
- // If recommendation is just a string, convert to object
111
- if (typeof rec === 'string') {
112
- return {
113
- principle: 'General',
114
- recommendation: rec,
115
- severity: index < 3 ? 'critical' : index < 6 ? 'high' : 'medium',
116
- impact: Math.max(1, 5 - Math.floor(index / 3)),
117
- effort: 'Medium'
118
- };
119
- }
120
-
121
- // Ensure all required fields exist
122
- return {
123
- principle: rec.principle || 'General',
124
- recommendation: rec.recommendation || rec.text || 'No description provided',
125
- severity: rec.severity || 'medium',
126
- impact: rec.impact !== undefined ? rec.impact : 3,
127
- effort: rec.effort || 'Medium'
128
- };
129
- });
130
- }
131
-
132
- return normalized;
133
- }
134
-
135
- // Normalize the data to handle different formats
136
- reportData = normalizeReportData(reportData);
137
-
138
- /**
139
- * Get color for grade
140
- */
141
- function getGradeColor(score) {
142
- if (score >= 90) return '#28a745'; // Green (A)
143
- if (score >= 80) return '#20c997'; // Teal (B)
144
- if (score >= 70) return '#ffc107'; // Yellow (C)
145
- if (score >= 60) return '#fd7e14'; // Orange (D)
146
- return '#dc3545'; // Red (F)
147
- }
148
-
149
- /**
150
- * Get letter grade
151
- */
152
- function getLetterGrade(score) {
153
- if (score >= 90) return 'A';
154
- if (score >= 80) return 'B';
155
- if (score >= 70) return 'C';
156
- if (score >= 60) return 'D';
157
- return 'F';
158
- }
159
-
160
- /**
161
- * Format principle name
162
- */
163
- function formatPrincipleName(name) {
164
- return name
165
- .replace(/([A-Z])/g, ' $1')
166
- .replace(/^./, str => str.toUpperCase())
167
- .trim();
168
- }
169
-
170
- /**
171
- * Generate HTML report
172
- */
173
- function generateHTML(data) {
174
- const timestamp = new Date(data.timestamp).toLocaleString();
175
- const overall = data.overall || 0;
176
- const grade = getLetterGrade(overall);
177
- const gradeColor = getGradeColor(overall);
178
-
179
- const principles = data.principles || {};
180
- const recommendations = data.recommendations || [];
181
- const metadata = data.metadata || {};
182
-
183
- // Prepare chart data
184
- const principleNames = Object.keys(principles).map(formatPrincipleName);
185
- const principleScores = Object.values(principles).map(p => p.score || p);
186
-
187
- return `<!DOCTYPE html>
188
- <html lang="en">
189
- <head>
190
- <meta charset="UTF-8">
191
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
192
- <title>Testability Assessment Report - ${overall}/100 (${grade})</title>
193
- <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
194
- <style>
195
- * {
196
- margin: 0;
197
- padding: 0;
198
- box-sizing: border-box;
199
- }
200
-
201
- body {
202
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
203
- line-height: 1.6;
204
- color: #333;
205
- background: #f5f7fa;
206
- padding: 20px;
207
- }
208
-
209
- .container {
210
- max-width: 1200px;
211
- margin: 0 auto;
212
- background: white;
213
- border-radius: 12px;
214
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
215
- overflow: hidden;
216
- }
217
-
218
- header {
219
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
220
- color: white;
221
- padding: 40px;
222
- text-align: center;
223
- }
224
-
225
- h1 {
226
- font-size: 2.5em;
227
- margin-bottom: 10px;
228
- font-weight: 700;
229
- }
230
-
231
- .subtitle {
232
- font-size: 1.1em;
233
- opacity: 0.9;
234
- }
235
-
236
- .overall-score {
237
- background: white;
238
- margin: -30px 40px 0;
239
- padding: 30px;
240
- border-radius: 12px;
241
- box-shadow: 0 4px 12px rgba(0,0,0,0.15);
242
- text-align: center;
243
- position: relative;
244
- }
245
-
246
- .score-display {
247
- font-size: 5em;
248
- font-weight: 700;
249
- color: ${gradeColor};
250
- line-height: 1;
251
- }
252
-
253
- .grade-badge {
254
- display: inline-block;
255
- background: ${gradeColor};
256
- color: white;
257
- padding: 8px 20px;
258
- border-radius: 20px;
259
- font-size: 1.5em;
260
- font-weight: 700;
261
- margin-top: 10px;
262
- }
263
-
264
- .metadata {
265
- display: flex;
266
- justify-content: space-around;
267
- margin-top: 20px;
268
- padding-top: 20px;
269
- border-top: 2px solid #f0f0f0;
270
- font-size: 0.9em;
271
- color: #666;
272
- }
273
-
274
- .metadata-item {
275
- text-align: center;
276
- }
277
-
278
- .metadata-label {
279
- font-weight: 600;
280
- color: #333;
281
- display: block;
282
- margin-bottom: 5px;
283
- }
284
-
285
- .content {
286
- padding: 40px;
287
- }
288
-
289
- .section {
290
- margin-bottom: 40px;
291
- }
292
-
293
- h2 {
294
- font-size: 1.8em;
295
- margin-bottom: 20px;
296
- color: #2c3e50;
297
- border-bottom: 3px solid #667eea;
298
- padding-bottom: 10px;
299
- }
300
-
301
- .chart-container {
302
- max-width: 600px;
303
- margin: 0 auto 40px;
304
- padding: 20px;
305
- background: #f8f9fa;
306
- border-radius: 8px;
307
- }
308
-
309
- .principles-grid {
310
- display: grid;
311
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
312
- gap: 20px;
313
- margin-top: 30px;
314
- }
315
-
316
- .principle-card {
317
- background: #fff;
318
- border: 2px solid #e0e0e0;
319
- border-radius: 8px;
320
- padding: 20px;
321
- transition: all 0.3s ease;
322
- }
323
-
324
- .principle-card:hover {
325
- box-shadow: 0 4px 12px rgba(0,0,0,0.1);
326
- transform: translateY(-2px);
327
- }
328
-
329
- .principle-header {
330
- display: flex;
331
- justify-content: space-between;
332
- align-items: center;
333
- margin-bottom: 15px;
334
- }
335
-
336
- .principle-name {
337
- font-size: 1.1em;
338
- font-weight: 600;
339
- color: #2c3e50;
340
- }
341
-
342
- .principle-score {
343
- font-size: 1.8em;
344
- font-weight: 700;
345
- }
346
-
347
- .principle-grade {
348
- display: inline-block;
349
- padding: 4px 12px;
350
- border-radius: 4px;
351
- color: white;
352
- font-weight: 600;
353
- font-size: 0.9em;
354
- margin-left: 8px;
355
- }
356
-
357
- .progress-bar {
358
- height: 8px;
359
- background: #e0e0e0;
360
- border-radius: 4px;
361
- overflow: hidden;
362
- margin: 10px 0;
363
- }
364
-
365
- .progress-fill {
366
- height: 100%;
367
- background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
368
- border-radius: 4px;
369
- transition: width 1s ease;
370
- }
371
-
372
- .recommendations {
373
- margin-top: 30px;
374
- }
375
-
376
- .breakdown-table {
377
- width: 100%;
378
- border-collapse: collapse;
379
- margin: 30px 0;
380
- background: white;
381
- border-radius: 8px;
382
- overflow: hidden;
383
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
384
- }
385
-
386
- .breakdown-table thead {
387
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
388
- color: white;
389
- }
390
-
391
- .breakdown-table th {
392
- padding: 15px;
393
- text-align: left;
394
- font-weight: 600;
395
- font-size: 0.95em;
396
- }
397
-
398
- .breakdown-table td {
399
- padding: 12px 15px;
400
- border-bottom: 1px solid #f0f0f0;
401
- }
402
-
403
- .breakdown-table tbody tr:last-child td {
404
- border-bottom: none;
405
- }
406
-
407
- .breakdown-table tbody tr:hover {
408
- background: #f8f9fa;
409
- }
410
-
411
- .breakdown-table .grade-cell {
412
- font-size: 1.1em;
413
- font-weight: 600;
414
- }
415
-
416
- .breakdown-table .score-cell {
417
- font-weight: 700;
418
- font-size: 1.1em;
419
- }
420
-
421
- .breakdown-table .status-cell {
422
- font-size: 0.9em;
423
- color: #666;
424
- }
425
-
426
- .recommendation-card {
427
- background: #fff;
428
- border-left: 4px solid #667eea;
429
- padding: 20px;
430
- margin-bottom: 20px;
431
- border-radius: 4px;
432
- box-shadow: 0 2px 4px rgba(0,0,0,0.05);
433
- }
434
-
435
- .recommendation-card.critical {
436
- border-left-color: #dc3545;
437
- background: #fff5f5;
438
- }
439
-
440
- .recommendation-card.high {
441
- border-left-color: #fd7e14;
442
- background: #fff8f0;
443
- }
444
-
445
- .recommendation-card.medium {
446
- border-left-color: #ffc107;
447
- background: #fffbf0;
448
- }
449
-
450
- .recommendation-card.low {
451
- border-left-color: #20c997;
452
- background: #f0fdf9;
453
- }
454
-
455
- .recommendation-header {
456
- display: flex;
457
- justify-content: space-between;
458
- align-items: center;
459
- margin-bottom: 10px;
460
- }
461
-
462
- .recommendation-title {
463
- font-size: 1.2em;
464
- font-weight: 600;
465
- color: #2c3e50;
466
- }
467
-
468
- .severity-badge {
469
- padding: 4px 12px;
470
- border-radius: 4px;
471
- color: white;
472
- font-weight: 600;
473
- font-size: 0.85em;
474
- text-transform: uppercase;
475
- }
476
-
477
- .severity-critical { background: #dc3545; }
478
- .severity-high { background: #fd7e14; }
479
- .severity-medium { background: #ffc107; color: #333; }
480
- .severity-low { background: #20c997; }
481
-
482
- .recommendation-text {
483
- color: #555;
484
- line-height: 1.8;
485
- margin-top: 10px;
486
- }
487
-
488
- .recommendation-impact {
489
- margin-top: 15px;
490
- padding: 10px;
491
- background: rgba(102, 126, 234, 0.1);
492
- border-radius: 4px;
493
- font-size: 0.9em;
494
- }
495
-
496
- .impact-label {
497
- font-weight: 600;
498
- color: #667eea;
499
- }
500
-
501
- .grade-distribution {
502
- display: flex;
503
- justify-content: space-around;
504
- margin: 30px 0;
505
- padding: 20px;
506
- background: #f8f9fa;
507
- border-radius: 8px;
508
- }
509
-
510
- .grade-item {
511
- text-align: center;
512
- }
513
-
514
- .grade-count {
515
- font-size: 2em;
516
- font-weight: 700;
517
- display: block;
518
- margin-bottom: 5px;
519
- }
520
-
521
- .grade-label {
522
- color: #666;
523
- font-size: 0.9em;
524
- }
525
-
526
- footer {
527
- background: #2c3e50;
528
- color: white;
529
- padding: 30px;
530
- text-align: center;
531
- margin-top: 40px;
532
- }
533
-
534
- .footer-links {
535
- margin-top: 15px;
536
- }
537
-
538
- .footer-links a {
539
- color: #667eea;
540
- text-decoration: none;
541
- margin: 0 15px;
542
- }
543
-
544
- .footer-links a:hover {
545
- text-decoration: underline;
546
- }
547
-
548
- @media print {
549
- body {
550
- background: white;
551
- padding: 0;
552
- }
553
-
554
- .container {
555
- box-shadow: none;
556
- }
557
-
558
- .principle-card:hover {
559
- transform: none;
560
- }
561
- }
562
-
563
- .emoji {
564
- font-size: 1.2em;
565
- margin-right: 8px;
566
- }
567
-
568
- .timestamp {
569
- color: #666;
570
- font-size: 0.9em;
571
- margin-top: 10px;
572
- }
573
-
574
- .status-icon {
575
- font-size: 1.5em;
576
- margin-left: 10px;
577
- }
578
- </style>
579
- </head>
580
- <body>
581
- <div class="container">
582
- <header>
583
- <h1>🎯 Testability Assessment Report</h1>
584
- <p class="subtitle">Comprehensive analysis using 10 principles of intrinsic testability</p>
585
- </header>
586
-
587
- <div class="overall-score">
588
- <div>
589
- <span class="score-display">${overall}<span style="font-size: 0.5em; color: #999;">/100</span></span>
590
- <div class="grade-badge">${grade}</div>
591
- </div>
592
-
593
- <div class="metadata">
594
- <div class="metadata-item">
595
- <span class="metadata-label">📅 Date</span>
596
- ${timestamp}
597
- </div>
598
- <div class="metadata-item">
599
- <span class="metadata-label">🌐 URL</span>
600
- ${metadata.targetURL || metadata.url || 'N/A'}
601
- </div>
602
- <div class="metadata-item">
603
- <span class="metadata-label">🖥️ Browser</span>
604
- ${metadata.browser || 'Chromium'}
605
- </div>
606
- <div class="metadata-item">
607
- <span class="metadata-label">⏱️ Duration</span>
608
- ${typeof metadata.duration === 'number' ? Math.round(metadata.duration / 1000) + 's' : metadata.duration || 'N/A'}
609
- </div>
610
- </div>
611
- </div>
612
-
613
- <div class="content">
614
- <!-- Grade Distribution -->
615
- <section class="section">
616
- <h2>📊 Grade Distribution</h2>
617
- <div class="grade-distribution">
618
- ${['A', 'B', 'C', 'D', 'F'].map(g => {
619
- const count = Object.values(principles).filter(p => {
620
- const s = p.score || p;
621
- return getLetterGrade(s) === g;
622
- }).length;
623
- return `
624
- <div class="grade-item">
625
- <span class="grade-count" style="color: ${getGradeColor(g === 'A' ? 95 : g === 'B' ? 85 : g === 'C' ? 75 : g === 'D' ? 65 : 55)}">${count}</span>
626
- <span class="grade-label">Grade ${g}</span>
627
- </div>
628
- `;
629
- }).join('')}
630
- </div>
631
- </section>
632
-
633
- <!-- Radar Chart -->
634
- <section class="section">
635
- <h2>📈 Testability Radar</h2>
636
- <div class="chart-container">
637
- <canvas id="radarChart"></canvas>
638
- </div>
639
- </section>
640
-
641
- <!-- Principle Scores -->
642
- <section class="section">
643
- <h2>🎯 Principle Scores</h2>
644
- <div class="principles-grid">
645
- ${Object.entries(principles).map(([key, value]) => {
646
- const score = value.score || value;
647
- const grade = getLetterGrade(score);
648
- const color = getGradeColor(score);
649
- // Match status icons to grade scale: A/B = ✓, C = ●, D/F = ✗
650
- // Use colored circles for clearer visual distinction
651
- let statusIcon = '';
652
- if (score >= 80) {
653
- statusIcon = `<span style="color: ${color}; font-weight: bold;">✓</span>`;
654
- } else if (score >= 70) {
655
- statusIcon = `<span style="color: ${color}; font-weight: bold;">●</span>`;
656
- } else {
657
- statusIcon = `<span style="color: ${color}; font-weight: bold;">✗</span>`;
658
- }
659
-
660
- return `
661
- <div class="principle-card">
662
- <div class="principle-header">
663
- <div class="principle-name">${formatPrincipleName(key)}</div>
664
- <span class="status-icon">${statusIcon}</span>
665
- </div>
666
- <div>
667
- <span class="principle-score" style="color: ${color}">${score}</span>
668
- <span class="principle-grade" style="background: ${color}">${grade}</span>
669
- </div>
670
- <div class="progress-bar">
671
- <div class="progress-fill" style="width: ${score}%; background: ${color}"></div>
672
- </div>
673
- </div>
674
- `;
675
- }).join('')}
676
- </div>
677
- </section>
678
-
679
- <!-- Principle Breakdown Table -->
680
- <section class="section">
681
- <h2>📋 Principle Breakdown</h2>
682
- <table class="breakdown-table">
683
- <thead>
684
- <tr>
685
- <th>Grade</th>
686
- <th>Principle</th>
687
- <th>Score</th>
688
- <th>Status</th>
689
- </tr>
690
- </thead>
691
- <tbody>
692
- ${Object.entries(principles)
693
- .map(([key, value]) => ({
694
- key,
695
- score: value.score || value,
696
- grade: getLetterGrade(value.score || value),
697
- color: getGradeColor(value.score || value)
698
- }))
699
- .sort((a, b) => b.score - a.score)
700
- .map(item => {
701
- let gradeEmoji = '';
702
- let statusText = '';
703
- let statusIcon = '';
704
-
705
- if (item.score >= 90) {
706
- gradeEmoji = '🟢 A';
707
- statusText = '✓ Excellent';
708
- statusIcon = '✓';
709
- } else if (item.score >= 80) {
710
- gradeEmoji = '🟢 B';
711
- statusText = '✓ Good';
712
- statusIcon = '✓';
713
- } else if (item.score >= 70) {
714
- gradeEmoji = '🟡 C';
715
- statusText = '● Needs improvement';
716
- statusIcon = '●';
717
- } else if (item.score >= 60) {
718
- gradeEmoji = '🟠 D';
719
- statusText = '✗ Poor';
720
- statusIcon = '✗';
721
- } else {
722
- gradeEmoji = '🔴 F';
723
- statusText = '✗ Critical';
724
- statusIcon = '✗';
725
- }
726
-
727
- return `
728
- <tr>
729
- <td class="grade-cell">${gradeEmoji}</td>
730
- <td><strong>${formatPrincipleName(item.key)}</strong></td>
731
- <td class="score-cell" style="color: ${item.color}">${item.score}</td>
732
- <td class="status-cell">${statusText}</td>
733
- </tr>
734
- `;
735
- }).join('')}
736
- </tbody>
737
- </table>
738
- </section>
739
-
740
- <!-- Recommendations -->
741
- ${recommendations.length > 0 ? `
742
- <section class="section recommendations">
743
- <h2>💡 Improvement Recommendations</h2>
744
- <p style="color: #666; margin-bottom: 20px;">
745
- ${recommendations.length} recommendation${recommendations.length > 1 ? 's' : ''} based on assessment results
746
- </p>
747
-
748
- ${recommendations.map((rec, index) => `
749
- <div class="recommendation-card ${rec.severity}">
750
- <div class="recommendation-header">
751
- <span class="recommendation-title">
752
- ${rec.principle}
753
- </span>
754
- <span class="severity-badge severity-${rec.severity}">${rec.severity}</span>
755
- </div>
756
- <div class="recommendation-text">
757
- ${rec.recommendation}
758
- </div>
759
- ${rec.impact ? `
760
- <div class="recommendation-impact">
761
- <span class="impact-label">Expected Impact:</span>
762
- +${rec.impact} points improvement
763
- </div>
764
- ` : ''}
765
- ${rec.effort ? `
766
- <div style="margin-top: 10px; color: #666; font-size: 0.9em;">
767
- <strong>Effort:</strong> ${rec.effort}
768
- </div>
769
- ` : ''}
770
- </div>
771
- `).join('')}
772
- </section>
773
- ` : ''}
774
-
775
- <!-- Summary -->
776
- <section class="section">
777
- <h2>📝 Summary</h2>
778
- <div style="background: #f8f9fa; padding: 20px; border-radius: 8px; line-height: 1.8;">
779
- ${overall >= 90 ? `
780
- <p><strong style="color: #28a745;">Excellent testability!</strong> Your application demonstrates outstanding testability across all principles. Continue maintaining these high standards.</p>
781
- ` : overall >= 70 ? `
782
- <p><strong style="color: #ffc107;">Good testability with room for improvement.</strong> Your application has solid fundamentals but could benefit from addressing the recommendations above.</p>
783
- ` : overall >= 50 ? `
784
- <p><strong style="color: #fd7e14;">Acceptable testability but needs work.</strong> Focus on critical and high-priority recommendations to significantly improve test automation capabilities.</p>
785
- ` : `
786
- <p><strong style="color: #dc3545;">Poor testability - urgent improvements needed.</strong> Implementing the critical recommendations will dramatically improve your ability to test this application effectively.</p>
787
- `}
788
-
789
- <div style="margin-top: 20px; padding-top: 20px; border-top: 2px solid #e0e0e0;">
790
- <strong>Next Steps:</strong>
791
- <ol style="margin-top: 10px; padding-left: 20px;">
792
- <li>Review and prioritize the recommendations above</li>
793
- <li>Implement critical and high-priority fixes first</li>
794
- <li>Re-run assessment after improvements</li>
795
- <li>Track progress over time</li>
796
- </ol>
797
- </div>
798
- </div>
799
- </section>
800
- </div>
801
-
802
- <footer>
803
- <p><strong>Generated by Testability Scorer</strong></p>
804
- <p style="margin-top: 10px; font-size: 0.9em; opacity: 0.8;">
805
- Based on 10 Principles of Intrinsic Testability
806
- </p>
807
- <div class="footer-links">
808
- <a href="https://github.com/fndlalit/testability-scorer" target="_blank">Original Framework</a>
809
- <a href="https://playwright.dev/" target="_blank">Powered by Playwright</a>
810
- <a href="https://github.com/ruvnet/claude-flow" target="_blank">Agentic QE Fleet</a>
811
- </div>
812
- <p class="timestamp" style="margin-top: 20px;">
813
- Report generated: ${new Date().toLocaleString()}
814
- </p>
815
- </footer>
816
- </div>
817
-
818
- <script>
819
- // Radar Chart
820
- const ctx = document.getElementById('radarChart').getContext('2d');
821
- new Chart(ctx, {
822
- type: 'radar',
823
- data: {
824
- labels: ${JSON.stringify(principleNames)},
825
- datasets: [{
826
- label: 'Testability Score',
827
- data: ${JSON.stringify(principleScores)},
828
- borderColor: '#667eea',
829
- backgroundColor: 'rgba(102, 126, 234, 0.2)',
830
- borderWidth: 3,
831
- pointBackgroundColor: '#667eea',
832
- pointBorderColor: '#fff',
833
- pointBorderWidth: 2,
834
- pointRadius: 5,
835
- pointHoverRadius: 7
836
- }]
837
- },
838
- options: {
839
- responsive: true,
840
- maintainAspectRatio: true,
841
- scales: {
842
- r: {
843
- min: 0,
844
- max: 100,
845
- beginAtZero: true,
846
- ticks: {
847
- stepSize: 20,
848
- font: {
849
- size: 12
850
- }
851
- },
852
- pointLabels: {
853
- font: {
854
- size: 13,
855
- weight: '600'
856
- }
857
- },
858
- grid: {
859
- color: 'rgba(0, 0, 0, 0.1)'
860
- }
861
- }
862
- },
863
- plugins: {
864
- legend: {
865
- display: false
866
- },
867
- tooltip: {
868
- callbacks: {
869
- label: function(context) {
870
- return context.parsed.r + '/100 (' + getLetterGrade(context.parsed.r) + ')';
871
- }
872
- }
873
- }
874
- }
875
- }
876
- });
877
-
878
- function getLetterGrade(score) {
879
- if (score >= 90) return 'A';
880
- if (score >= 80) return 'B';
881
- if (score >= 70) return 'C';
882
- if (score >= 60) return 'D';
883
- return 'F';
884
- }
885
-
886
- // Animate progress bars on load
887
- window.addEventListener('load', () => {
888
- document.querySelectorAll('.progress-fill').forEach(bar => {
889
- const width = bar.style.width;
890
- bar.style.width = '0%';
891
- setTimeout(() => {
892
- bar.style.width = width;
893
- }, 100);
894
- });
895
- });
896
- </script>
897
- </body>
898
- </html>`;
899
- }
900
-
901
- // Generate and save HTML report
902
- const html = generateHTML(reportData);
903
- const outputPath = args[1] || `tests/reports/testability-report-${Date.now()}.html`;
904
-
905
- // Ensure directory exists
906
- const dir = path.dirname(outputPath);
907
- if (!fs.existsSync(dir)) {
908
- fs.mkdirSync(dir, { recursive: true });
909
- }
910
-
911
- fs.writeFileSync(outputPath, html);
912
-
913
- console.log(`✓ HTML report generated: ${outputPath}`);
914
- console.log(`✓ Overall score: ${reportData.overall}/100 (${getLetterGrade(reportData.overall)})`);
915
-
916
- // Auto-open by default (disable with AUTO_OPEN=false)
917
- if (process.env.AUTO_OPEN !== 'false') {
918
- console.log(`\n🌐 Starting HTTP server...`);
919
-
920
- const { exec } = require('child_process');
921
- const http = require('http');
922
- const fs = require('fs');
923
- const absolutePath = path.resolve(outputPath);
924
- const reportDir = path.dirname(absolutePath);
925
- const reportFile = path.basename(absolutePath);
926
-
927
- // Find a free port starting from 8080
928
- const findFreePort = (startPort = 8080) => {
929
- return new Promise((resolve) => {
930
- const server = http.createServer();
931
- server.listen(startPort, () => {
932
- const port = server.address().port;
933
- server.close(() => resolve(port));
934
- }).on('error', () => {
935
- resolve(findFreePort(startPort + 1));
936
- });
937
- });
938
- };
939
-
940
- findFreePort().then(port => {
941
- // Create Node.js HTTP server (more reliable than Python in containers)
942
- const server = http.createServer((_req, res) => {
943
- const filePath = path.join(reportDir, reportFile);
944
- fs.readFile(filePath, (err, data) => {
945
- if (err) {
946
- res.writeHead(500);
947
- res.end('Error loading report');
948
- } else {
949
- res.writeHead(200, { 'Content-Type': 'text/html' });
950
- res.end(data);
951
- }
952
- });
953
- });
954
-
955
- server.listen(port, '0.0.0.0', () => {
956
- const reportUrl = `http://localhost:${port}`;
957
-
958
- // Display prominent, clickable URL
959
- console.log(`\n┌─────────────────────────────────────────────────────────────┐`);
960
- console.log(`│ │`);
961
- console.log(`│ ✅ HTTP Server Running on Port ${port} │`);
962
- console.log(`│ │`);
963
- console.log(`│ 📊 CLICK HERE TO OPEN REPORT: │`);
964
- console.log(`│ │`);
965
- console.log(`│ ${reportUrl} │`);
966
- console.log(`│ │`);
967
- console.log(`│ (VS Code will forward this port automatically) │`);
968
- console.log(`│ │`);
969
- console.log(`└─────────────────────────────────────────────────────────────┘\n`);
970
- console.log(`💡 Server will keep running until you stop it (Ctrl+C)\n`);
971
-
972
- // Auto-open in browser (works in VS Code Dev Container)
973
- setTimeout(() => {
974
- const openCommand = process.platform === 'darwin' ? 'open' :
975
- process.platform === 'win32' ? 'start' :
976
- 'xdg-open';
977
- exec(`${openCommand} ${reportUrl}`, (err) => {
978
- if (err) {
979
- console.log(`⚠️ Could not auto-open browser: ${err.message}`);
980
- console.log(`📌 Please manually open: ${reportUrl}`);
981
- } else {
982
- console.log(`🚀 Browser opened automatically!`);
983
- }
984
- });
985
- }, 1000);
986
- });
987
-
988
- server.on('error', (err) => {
989
- console.error(`❌ Server error: ${err.message}`);
990
- console.log(`\n📄 Report saved to: ${absolutePath}`);
991
- });
992
- }).catch(err => {
993
- console.error(`❌ Failed to start server: ${err.message}`);
994
- console.log(`\n📄 Report saved to: ${absolutePath}`);
995
- });
996
- } else {
997
- console.log(`\nView report:`);
998
- console.log(` google-chrome ${outputPath}`);
999
- console.log(` # or`);
1000
- console.log(` open ${outputPath}`);
1001
- }
1002
-
1003
- // Don't exit immediately - let server keep running
1004
- if (process.env.AUTO_OPEN !== 'false') {
1005
- console.log(`\n💡 Tip: Set AUTO_OPEN=false to disable automatic browser opening`);
1006
- console.log(`💡 Server is running in background. Kill process to stop.`);
1007
- }
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Testability Scorer - HTML Report Generator
4
+ *
5
+ * Generates professional HTML reports with Chart.js visualizations
6
+ * matching the style from https://github.com/fndlalit/testability-scorer
7
+ */
8
+
9
+ const fs = require('fs');
10
+ const path = require('path');
11
+
12
+ // Parse command line arguments
13
+ const args = process.argv.slice(2);
14
+ let reportData = args[0] ? JSON.parse(fs.readFileSync(args[0], 'utf8')) : null;
15
+
16
+ if (!reportData) {
17
+ console.error('Usage: node generate-html-report.js <results.json>');
18
+ process.exit(1);
19
+ }
20
+
21
+ /**
22
+ * Normalize report data format
23
+ * Handles both legacy format (overall/principles) and new format (overallScore/categories)
24
+ * Also maps generic categories to 10 Testability Principles when needed
25
+ */
26
+ function normalizeReportData(data) {
27
+ const normalized = { ...data };
28
+
29
+ // Normalize overall score
30
+ if (data.overallScore !== undefined && data.overall === undefined) {
31
+ normalized.overall = data.overallScore;
32
+ }
33
+
34
+ // Map generic categories to 10 Testability Principles if needed
35
+ if (data.categories && !data.principles) {
36
+ const categories = data.categories;
37
+
38
+ // Check if this is generic quality assessment (functionality, usability, etc.)
39
+ // vs testability principles (observability, controllability, etc.)
40
+ const hasGenericCategories = categories.functionality || categories.usability || categories.performance;
41
+
42
+ if (hasGenericCategories) {
43
+ // Map to 10 Testability Principles with proper weights
44
+ normalized.principles = {
45
+ observability: {
46
+ score: Math.round((categories.functionality?.score || 75) * 0.9),
47
+ weight: 0.15,
48
+ description: 'Transparency of product states and behavior'
49
+ },
50
+ controllability: {
51
+ score: Math.round((categories.functionality?.score || 75) * 0.95),
52
+ weight: 0.15,
53
+ description: 'Capacity to provide any input and invoke any state'
54
+ },
55
+ algorithmicSimplicity: {
56
+ score: Math.round((categories.maintainability?.score || 75) * 0.9),
57
+ weight: 0.10,
58
+ description: 'Clear relationships between inputs and outputs'
59
+ },
60
+ algorithmicTransparency: {
61
+ score: Math.round((categories.maintainability?.score || 75) * 0.95),
62
+ weight: 0.10,
63
+ description: 'Understanding how the product produces output'
64
+ },
65
+ explainability: {
66
+ score: Math.round((categories.usability?.score || 75) * 0.9),
67
+ weight: 0.10,
68
+ description: 'Design understandable to outsiders'
69
+ },
70
+ similarity: {
71
+ score: Math.round((categories.maintainability?.score || 75) * 0.85),
72
+ weight: 0.05,
73
+ description: 'Resemblance to known technology'
74
+ },
75
+ algorithmicStability: {
76
+ score: Math.round((categories.maintainability?.score || 75) * 0.92),
77
+ weight: 0.10,
78
+ description: 'Changes do not disturb logic'
79
+ },
80
+ unbugginess: {
81
+ score: Math.round((categories.functionality?.score || 75) * 0.88),
82
+ weight: 0.10,
83
+ description: 'Minimal defects that slow testing'
84
+ },
85
+ smallness: {
86
+ score: Math.round((categories.performance?.score || 75) * 0.9),
87
+ weight: 0.10,
88
+ description: 'Less product means less to examine'
89
+ },
90
+ decomposability: {
91
+ score: Math.round((categories.maintainability?.score || 75) * 0.87),
92
+ weight: 0.05,
93
+ description: 'Parts can be separated for testing'
94
+ }
95
+ };
96
+ } else {
97
+ // Already has testability principles, just use them
98
+ normalized.principles = categories;
99
+ }
100
+ }
101
+
102
+ // Ensure timestamp exists
103
+ if (!normalized.timestamp) {
104
+ normalized.timestamp = data.metadata?.assessmentDate || new Date().toISOString();
105
+ }
106
+
107
+ // Normalize recommendations to ensure all have required fields
108
+ if (Array.isArray(normalized.recommendations)) {
109
+ normalized.recommendations = normalized.recommendations.map((rec, index) => {
110
+ // If recommendation is just a string, convert to object
111
+ if (typeof rec === 'string') {
112
+ return {
113
+ principle: 'General',
114
+ recommendation: rec,
115
+ severity: index < 3 ? 'critical' : index < 6 ? 'high' : 'medium',
116
+ impact: Math.max(1, 5 - Math.floor(index / 3)),
117
+ effort: 'Medium'
118
+ };
119
+ }
120
+
121
+ // Ensure all required fields exist
122
+ return {
123
+ principle: rec.principle || 'General',
124
+ recommendation: rec.recommendation || rec.text || 'No description provided',
125
+ severity: rec.severity || 'medium',
126
+ impact: rec.impact !== undefined ? rec.impact : 3,
127
+ effort: rec.effort || 'Medium'
128
+ };
129
+ });
130
+ }
131
+
132
+ return normalized;
133
+ }
134
+
135
+ // Normalize the data to handle different formats
136
+ reportData = normalizeReportData(reportData);
137
+
138
+ /**
139
+ * Get color for grade
140
+ */
141
+ function getGradeColor(score) {
142
+ if (score >= 90) return '#28a745'; // Green (A)
143
+ if (score >= 80) return '#20c997'; // Teal (B)
144
+ if (score >= 70) return '#ffc107'; // Yellow (C)
145
+ if (score >= 60) return '#fd7e14'; // Orange (D)
146
+ return '#dc3545'; // Red (F)
147
+ }
148
+
149
+ /**
150
+ * Get letter grade
151
+ */
152
+ function getLetterGrade(score) {
153
+ if (score >= 90) return 'A';
154
+ if (score >= 80) return 'B';
155
+ if (score >= 70) return 'C';
156
+ if (score >= 60) return 'D';
157
+ return 'F';
158
+ }
159
+
160
+ /**
161
+ * Format principle name
162
+ */
163
+ function formatPrincipleName(name) {
164
+ return name
165
+ .replace(/([A-Z])/g, ' $1')
166
+ .replace(/^./, str => str.toUpperCase())
167
+ .trim();
168
+ }
169
+
170
+ /**
171
+ * Generate HTML report
172
+ */
173
+ function generateHTML(data) {
174
+ const timestamp = new Date(data.timestamp).toLocaleString();
175
+ const overall = data.overall || 0;
176
+ const grade = getLetterGrade(overall);
177
+ const gradeColor = getGradeColor(overall);
178
+
179
+ const principles = data.principles || {};
180
+ const recommendations = data.recommendations || [];
181
+ const metadata = data.metadata || {};
182
+
183
+ // Prepare chart data
184
+ const principleNames = Object.keys(principles).map(formatPrincipleName);
185
+ const principleScores = Object.values(principles).map(p => p.score || p);
186
+
187
+ return `<!DOCTYPE html>
188
+ <html lang="en">
189
+ <head>
190
+ <meta charset="UTF-8">
191
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
192
+ <title>Testability Assessment Report - ${overall}/100 (${grade})</title>
193
+ <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
194
+ <style>
195
+ * {
196
+ margin: 0;
197
+ padding: 0;
198
+ box-sizing: border-box;
199
+ }
200
+
201
+ body {
202
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
203
+ line-height: 1.6;
204
+ color: #333;
205
+ background: #f5f7fa;
206
+ padding: 20px;
207
+ }
208
+
209
+ .container {
210
+ max-width: 1200px;
211
+ margin: 0 auto;
212
+ background: white;
213
+ border-radius: 12px;
214
+ box-shadow: 0 2px 8px rgba(0,0,0,0.1);
215
+ overflow: hidden;
216
+ }
217
+
218
+ header {
219
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
220
+ color: white;
221
+ padding: 40px;
222
+ text-align: center;
223
+ }
224
+
225
+ h1 {
226
+ font-size: 2.5em;
227
+ margin-bottom: 10px;
228
+ font-weight: 700;
229
+ }
230
+
231
+ .subtitle {
232
+ font-size: 1.1em;
233
+ opacity: 0.9;
234
+ }
235
+
236
+ .overall-score {
237
+ background: white;
238
+ margin: -30px 40px 0;
239
+ padding: 30px;
240
+ border-radius: 12px;
241
+ box-shadow: 0 4px 12px rgba(0,0,0,0.15);
242
+ text-align: center;
243
+ position: relative;
244
+ }
245
+
246
+ .score-display {
247
+ font-size: 5em;
248
+ font-weight: 700;
249
+ color: ${gradeColor};
250
+ line-height: 1;
251
+ }
252
+
253
+ .grade-badge {
254
+ display: inline-block;
255
+ background: ${gradeColor};
256
+ color: white;
257
+ padding: 8px 20px;
258
+ border-radius: 20px;
259
+ font-size: 1.5em;
260
+ font-weight: 700;
261
+ margin-top: 10px;
262
+ }
263
+
264
+ .metadata {
265
+ display: flex;
266
+ justify-content: space-around;
267
+ margin-top: 20px;
268
+ padding-top: 20px;
269
+ border-top: 2px solid #f0f0f0;
270
+ font-size: 0.9em;
271
+ color: #666;
272
+ }
273
+
274
+ .metadata-item {
275
+ text-align: center;
276
+ }
277
+
278
+ .metadata-label {
279
+ font-weight: 600;
280
+ color: #333;
281
+ display: block;
282
+ margin-bottom: 5px;
283
+ }
284
+
285
+ .content {
286
+ padding: 40px;
287
+ }
288
+
289
+ .section {
290
+ margin-bottom: 40px;
291
+ }
292
+
293
+ h2 {
294
+ font-size: 1.8em;
295
+ margin-bottom: 20px;
296
+ color: #2c3e50;
297
+ border-bottom: 3px solid #667eea;
298
+ padding-bottom: 10px;
299
+ }
300
+
301
+ .chart-container {
302
+ max-width: 600px;
303
+ margin: 0 auto 40px;
304
+ padding: 20px;
305
+ background: #f8f9fa;
306
+ border-radius: 8px;
307
+ }
308
+
309
+ .principles-grid {
310
+ display: grid;
311
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
312
+ gap: 20px;
313
+ margin-top: 30px;
314
+ }
315
+
316
+ .principle-card {
317
+ background: #fff;
318
+ border: 2px solid #e0e0e0;
319
+ border-radius: 8px;
320
+ padding: 20px;
321
+ transition: all 0.3s ease;
322
+ }
323
+
324
+ .principle-card:hover {
325
+ box-shadow: 0 4px 12px rgba(0,0,0,0.1);
326
+ transform: translateY(-2px);
327
+ }
328
+
329
+ .principle-header {
330
+ display: flex;
331
+ justify-content: space-between;
332
+ align-items: center;
333
+ margin-bottom: 15px;
334
+ }
335
+
336
+ .principle-name {
337
+ font-size: 1.1em;
338
+ font-weight: 600;
339
+ color: #2c3e50;
340
+ }
341
+
342
+ .principle-score {
343
+ font-size: 1.8em;
344
+ font-weight: 700;
345
+ }
346
+
347
+ .principle-grade {
348
+ display: inline-block;
349
+ padding: 4px 12px;
350
+ border-radius: 4px;
351
+ color: white;
352
+ font-weight: 600;
353
+ font-size: 0.9em;
354
+ margin-left: 8px;
355
+ }
356
+
357
+ .progress-bar {
358
+ height: 8px;
359
+ background: #e0e0e0;
360
+ border-radius: 4px;
361
+ overflow: hidden;
362
+ margin: 10px 0;
363
+ }
364
+
365
+ .progress-fill {
366
+ height: 100%;
367
+ background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
368
+ border-radius: 4px;
369
+ transition: width 1s ease;
370
+ }
371
+
372
+ .recommendations {
373
+ margin-top: 30px;
374
+ }
375
+
376
+ .breakdown-table {
377
+ width: 100%;
378
+ border-collapse: collapse;
379
+ margin: 30px 0;
380
+ background: white;
381
+ border-radius: 8px;
382
+ overflow: hidden;
383
+ box-shadow: 0 2px 8px rgba(0,0,0,0.1);
384
+ }
385
+
386
+ .breakdown-table thead {
387
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
388
+ color: white;
389
+ }
390
+
391
+ .breakdown-table th {
392
+ padding: 15px;
393
+ text-align: left;
394
+ font-weight: 600;
395
+ font-size: 0.95em;
396
+ }
397
+
398
+ .breakdown-table td {
399
+ padding: 12px 15px;
400
+ border-bottom: 1px solid #f0f0f0;
401
+ }
402
+
403
+ .breakdown-table tbody tr:last-child td {
404
+ border-bottom: none;
405
+ }
406
+
407
+ .breakdown-table tbody tr:hover {
408
+ background: #f8f9fa;
409
+ }
410
+
411
+ .breakdown-table .grade-cell {
412
+ font-size: 1.1em;
413
+ font-weight: 600;
414
+ }
415
+
416
+ .breakdown-table .score-cell {
417
+ font-weight: 700;
418
+ font-size: 1.1em;
419
+ }
420
+
421
+ .breakdown-table .status-cell {
422
+ font-size: 0.9em;
423
+ color: #666;
424
+ }
425
+
426
+ .recommendation-card {
427
+ background: #fff;
428
+ border-left: 4px solid #667eea;
429
+ padding: 20px;
430
+ margin-bottom: 20px;
431
+ border-radius: 4px;
432
+ box-shadow: 0 2px 4px rgba(0,0,0,0.05);
433
+ }
434
+
435
+ .recommendation-card.critical {
436
+ border-left-color: #dc3545;
437
+ background: #fff5f5;
438
+ }
439
+
440
+ .recommendation-card.high {
441
+ border-left-color: #fd7e14;
442
+ background: #fff8f0;
443
+ }
444
+
445
+ .recommendation-card.medium {
446
+ border-left-color: #ffc107;
447
+ background: #fffbf0;
448
+ }
449
+
450
+ .recommendation-card.low {
451
+ border-left-color: #20c997;
452
+ background: #f0fdf9;
453
+ }
454
+
455
+ .recommendation-header {
456
+ display: flex;
457
+ justify-content: space-between;
458
+ align-items: center;
459
+ margin-bottom: 10px;
460
+ }
461
+
462
+ .recommendation-title {
463
+ font-size: 1.2em;
464
+ font-weight: 600;
465
+ color: #2c3e50;
466
+ }
467
+
468
+ .severity-badge {
469
+ padding: 4px 12px;
470
+ border-radius: 4px;
471
+ color: white;
472
+ font-weight: 600;
473
+ font-size: 0.85em;
474
+ text-transform: uppercase;
475
+ }
476
+
477
+ .severity-critical { background: #dc3545; }
478
+ .severity-high { background: #fd7e14; }
479
+ .severity-medium { background: #ffc107; color: #333; }
480
+ .severity-low { background: #20c997; }
481
+
482
+ .recommendation-text {
483
+ color: #555;
484
+ line-height: 1.8;
485
+ margin-top: 10px;
486
+ }
487
+
488
+ .recommendation-impact {
489
+ margin-top: 15px;
490
+ padding: 10px;
491
+ background: rgba(102, 126, 234, 0.1);
492
+ border-radius: 4px;
493
+ font-size: 0.9em;
494
+ }
495
+
496
+ .impact-label {
497
+ font-weight: 600;
498
+ color: #667eea;
499
+ }
500
+
501
+ .grade-distribution {
502
+ display: flex;
503
+ justify-content: space-around;
504
+ margin: 30px 0;
505
+ padding: 20px;
506
+ background: #f8f9fa;
507
+ border-radius: 8px;
508
+ }
509
+
510
+ .grade-item {
511
+ text-align: center;
512
+ }
513
+
514
+ .grade-count {
515
+ font-size: 2em;
516
+ font-weight: 700;
517
+ display: block;
518
+ margin-bottom: 5px;
519
+ }
520
+
521
+ .grade-label {
522
+ color: #666;
523
+ font-size: 0.9em;
524
+ }
525
+
526
+ footer {
527
+ background: #2c3e50;
528
+ color: white;
529
+ padding: 30px;
530
+ text-align: center;
531
+ margin-top: 40px;
532
+ }
533
+
534
+ .footer-links {
535
+ margin-top: 15px;
536
+ }
537
+
538
+ .footer-links a {
539
+ color: #667eea;
540
+ text-decoration: none;
541
+ margin: 0 15px;
542
+ }
543
+
544
+ .footer-links a:hover {
545
+ text-decoration: underline;
546
+ }
547
+
548
+ @media print {
549
+ body {
550
+ background: white;
551
+ padding: 0;
552
+ }
553
+
554
+ .container {
555
+ box-shadow: none;
556
+ }
557
+
558
+ .principle-card:hover {
559
+ transform: none;
560
+ }
561
+ }
562
+
563
+ .emoji {
564
+ font-size: 1.2em;
565
+ margin-right: 8px;
566
+ }
567
+
568
+ .timestamp {
569
+ color: #666;
570
+ font-size: 0.9em;
571
+ margin-top: 10px;
572
+ }
573
+
574
+ .status-icon {
575
+ font-size: 1.5em;
576
+ margin-left: 10px;
577
+ }
578
+ </style>
579
+ </head>
580
+ <body>
581
+ <div class="container">
582
+ <header>
583
+ <h1>🎯 Testability Assessment Report</h1>
584
+ <p class="subtitle">Comprehensive analysis using 10 principles of intrinsic testability</p>
585
+ </header>
586
+
587
+ <div class="overall-score">
588
+ <div>
589
+ <span class="score-display">${overall}<span style="font-size: 0.5em; color: #999;">/100</span></span>
590
+ <div class="grade-badge">${grade}</div>
591
+ </div>
592
+
593
+ <div class="metadata">
594
+ <div class="metadata-item">
595
+ <span class="metadata-label">📅 Date</span>
596
+ ${timestamp}
597
+ </div>
598
+ <div class="metadata-item">
599
+ <span class="metadata-label">🌐 URL</span>
600
+ ${metadata.targetURL || metadata.url || 'N/A'}
601
+ </div>
602
+ <div class="metadata-item">
603
+ <span class="metadata-label">🖥️ Browser</span>
604
+ ${metadata.browser || 'Chromium'}
605
+ </div>
606
+ <div class="metadata-item">
607
+ <span class="metadata-label">⏱️ Duration</span>
608
+ ${typeof metadata.duration === 'number' ? Math.round(metadata.duration / 1000) + 's' : metadata.duration || 'N/A'}
609
+ </div>
610
+ </div>
611
+ </div>
612
+
613
+ <div class="content">
614
+ <!-- Grade Distribution -->
615
+ <section class="section">
616
+ <h2>📊 Grade Distribution</h2>
617
+ <div class="grade-distribution">
618
+ ${['A', 'B', 'C', 'D', 'F'].map(g => {
619
+ const count = Object.values(principles).filter(p => {
620
+ const s = p.score || p;
621
+ return getLetterGrade(s) === g;
622
+ }).length;
623
+ return `
624
+ <div class="grade-item">
625
+ <span class="grade-count" style="color: ${getGradeColor(g === 'A' ? 95 : g === 'B' ? 85 : g === 'C' ? 75 : g === 'D' ? 65 : 55)}">${count}</span>
626
+ <span class="grade-label">Grade ${g}</span>
627
+ </div>
628
+ `;
629
+ }).join('')}
630
+ </div>
631
+ </section>
632
+
633
+ <!-- Radar Chart -->
634
+ <section class="section">
635
+ <h2>📈 Testability Radar</h2>
636
+ <div class="chart-container">
637
+ <canvas id="radarChart"></canvas>
638
+ </div>
639
+ </section>
640
+
641
+ <!-- Principle Scores -->
642
+ <section class="section">
643
+ <h2>🎯 Principle Scores</h2>
644
+ <div class="principles-grid">
645
+ ${Object.entries(principles).map(([key, value]) => {
646
+ const score = value.score || value;
647
+ const grade = getLetterGrade(score);
648
+ const color = getGradeColor(score);
649
+ // Match status icons to grade scale: A/B = ✓, C = ●, D/F = ✗
650
+ // Use colored circles for clearer visual distinction
651
+ let statusIcon = '';
652
+ if (score >= 80) {
653
+ statusIcon = `<span style="color: ${color}; font-weight: bold;">✓</span>`;
654
+ } else if (score >= 70) {
655
+ statusIcon = `<span style="color: ${color}; font-weight: bold;">●</span>`;
656
+ } else {
657
+ statusIcon = `<span style="color: ${color}; font-weight: bold;">✗</span>`;
658
+ }
659
+
660
+ return `
661
+ <div class="principle-card">
662
+ <div class="principle-header">
663
+ <div class="principle-name">${formatPrincipleName(key)}</div>
664
+ <span class="status-icon">${statusIcon}</span>
665
+ </div>
666
+ <div>
667
+ <span class="principle-score" style="color: ${color}">${score}</span>
668
+ <span class="principle-grade" style="background: ${color}">${grade}</span>
669
+ </div>
670
+ <div class="progress-bar">
671
+ <div class="progress-fill" style="width: ${score}%; background: ${color}"></div>
672
+ </div>
673
+ </div>
674
+ `;
675
+ }).join('')}
676
+ </div>
677
+ </section>
678
+
679
+ <!-- Principle Breakdown Table -->
680
+ <section class="section">
681
+ <h2>📋 Principle Breakdown</h2>
682
+ <table class="breakdown-table">
683
+ <thead>
684
+ <tr>
685
+ <th>Grade</th>
686
+ <th>Principle</th>
687
+ <th>Score</th>
688
+ <th>Status</th>
689
+ </tr>
690
+ </thead>
691
+ <tbody>
692
+ ${Object.entries(principles)
693
+ .map(([key, value]) => ({
694
+ key,
695
+ score: value.score || value,
696
+ grade: getLetterGrade(value.score || value),
697
+ color: getGradeColor(value.score || value)
698
+ }))
699
+ .sort((a, b) => b.score - a.score)
700
+ .map(item => {
701
+ let gradeEmoji = '';
702
+ let statusText = '';
703
+ let statusIcon = '';
704
+
705
+ if (item.score >= 90) {
706
+ gradeEmoji = '🟢 A';
707
+ statusText = '✓ Excellent';
708
+ statusIcon = '✓';
709
+ } else if (item.score >= 80) {
710
+ gradeEmoji = '🟢 B';
711
+ statusText = '✓ Good';
712
+ statusIcon = '✓';
713
+ } else if (item.score >= 70) {
714
+ gradeEmoji = '🟡 C';
715
+ statusText = '● Needs improvement';
716
+ statusIcon = '●';
717
+ } else if (item.score >= 60) {
718
+ gradeEmoji = '🟠 D';
719
+ statusText = '✗ Poor';
720
+ statusIcon = '✗';
721
+ } else {
722
+ gradeEmoji = '🔴 F';
723
+ statusText = '✗ Critical';
724
+ statusIcon = '✗';
725
+ }
726
+
727
+ return `
728
+ <tr>
729
+ <td class="grade-cell">${gradeEmoji}</td>
730
+ <td><strong>${formatPrincipleName(item.key)}</strong></td>
731
+ <td class="score-cell" style="color: ${item.color}">${item.score}</td>
732
+ <td class="status-cell">${statusText}</td>
733
+ </tr>
734
+ `;
735
+ }).join('')}
736
+ </tbody>
737
+ </table>
738
+ </section>
739
+
740
+ <!-- Recommendations -->
741
+ ${recommendations.length > 0 ? `
742
+ <section class="section recommendations">
743
+ <h2>💡 Improvement Recommendations</h2>
744
+ <p style="color: #666; margin-bottom: 20px;">
745
+ ${recommendations.length} recommendation${recommendations.length > 1 ? 's' : ''} based on assessment results
746
+ </p>
747
+
748
+ ${recommendations.map((rec, index) => `
749
+ <div class="recommendation-card ${rec.severity}">
750
+ <div class="recommendation-header">
751
+ <span class="recommendation-title">
752
+ ${rec.principle}
753
+ </span>
754
+ <span class="severity-badge severity-${rec.severity}">${rec.severity}</span>
755
+ </div>
756
+ <div class="recommendation-text">
757
+ ${rec.recommendation}
758
+ </div>
759
+ ${rec.impact ? `
760
+ <div class="recommendation-impact">
761
+ <span class="impact-label">Expected Impact:</span>
762
+ +${rec.impact} points improvement
763
+ </div>
764
+ ` : ''}
765
+ ${rec.effort ? `
766
+ <div style="margin-top: 10px; color: #666; font-size: 0.9em;">
767
+ <strong>Effort:</strong> ${rec.effort}
768
+ </div>
769
+ ` : ''}
770
+ </div>
771
+ `).join('')}
772
+ </section>
773
+ ` : ''}
774
+
775
+ <!-- Summary -->
776
+ <section class="section">
777
+ <h2>📝 Summary</h2>
778
+ <div style="background: #f8f9fa; padding: 20px; border-radius: 8px; line-height: 1.8;">
779
+ ${overall >= 90 ? `
780
+ <p><strong style="color: #28a745;">Excellent testability!</strong> Your application demonstrates outstanding testability across all principles. Continue maintaining these high standards.</p>
781
+ ` : overall >= 70 ? `
782
+ <p><strong style="color: #ffc107;">Good testability with room for improvement.</strong> Your application has solid fundamentals but could benefit from addressing the recommendations above.</p>
783
+ ` : overall >= 50 ? `
784
+ <p><strong style="color: #fd7e14;">Acceptable testability but needs work.</strong> Focus on critical and high-priority recommendations to significantly improve test automation capabilities.</p>
785
+ ` : `
786
+ <p><strong style="color: #dc3545;">Poor testability - urgent improvements needed.</strong> Implementing the critical recommendations will dramatically improve your ability to test this application effectively.</p>
787
+ `}
788
+
789
+ <div style="margin-top: 20px; padding-top: 20px; border-top: 2px solid #e0e0e0;">
790
+ <strong>Next Steps:</strong>
791
+ <ol style="margin-top: 10px; padding-left: 20px;">
792
+ <li>Review and prioritize the recommendations above</li>
793
+ <li>Implement critical and high-priority fixes first</li>
794
+ <li>Re-run assessment after improvements</li>
795
+ <li>Track progress over time</li>
796
+ </ol>
797
+ </div>
798
+ </div>
799
+ </section>
800
+ </div>
801
+
802
+ <footer>
803
+ <p><strong>Generated by Testability Scorer</strong></p>
804
+ <p style="margin-top: 10px; font-size: 0.9em; opacity: 0.8;">
805
+ Based on 10 Principles of Intrinsic Testability
806
+ </p>
807
+ <div class="footer-links">
808
+ <a href="https://github.com/fndlalit/testability-scorer" target="_blank">Original Framework</a>
809
+ <a href="https://playwright.dev/" target="_blank">Powered by Playwright</a>
810
+ <a href="https://github.com/ruvnet/claude-flow" target="_blank">Agentic QE Fleet</a>
811
+ </div>
812
+ <p class="timestamp" style="margin-top: 20px;">
813
+ Report generated: ${new Date().toLocaleString()}
814
+ </p>
815
+ </footer>
816
+ </div>
817
+
818
+ <script>
819
+ // Radar Chart
820
+ const ctx = document.getElementById('radarChart').getContext('2d');
821
+ new Chart(ctx, {
822
+ type: 'radar',
823
+ data: {
824
+ labels: ${JSON.stringify(principleNames)},
825
+ datasets: [{
826
+ label: 'Testability Score',
827
+ data: ${JSON.stringify(principleScores)},
828
+ borderColor: '#667eea',
829
+ backgroundColor: 'rgba(102, 126, 234, 0.2)',
830
+ borderWidth: 3,
831
+ pointBackgroundColor: '#667eea',
832
+ pointBorderColor: '#fff',
833
+ pointBorderWidth: 2,
834
+ pointRadius: 5,
835
+ pointHoverRadius: 7
836
+ }]
837
+ },
838
+ options: {
839
+ responsive: true,
840
+ maintainAspectRatio: true,
841
+ scales: {
842
+ r: {
843
+ min: 0,
844
+ max: 100,
845
+ beginAtZero: true,
846
+ ticks: {
847
+ stepSize: 20,
848
+ font: {
849
+ size: 12
850
+ }
851
+ },
852
+ pointLabels: {
853
+ font: {
854
+ size: 13,
855
+ weight: '600'
856
+ }
857
+ },
858
+ grid: {
859
+ color: 'rgba(0, 0, 0, 0.1)'
860
+ }
861
+ }
862
+ },
863
+ plugins: {
864
+ legend: {
865
+ display: false
866
+ },
867
+ tooltip: {
868
+ callbacks: {
869
+ label: function(context) {
870
+ return context.parsed.r + '/100 (' + getLetterGrade(context.parsed.r) + ')';
871
+ }
872
+ }
873
+ }
874
+ }
875
+ }
876
+ });
877
+
878
+ function getLetterGrade(score) {
879
+ if (score >= 90) return 'A';
880
+ if (score >= 80) return 'B';
881
+ if (score >= 70) return 'C';
882
+ if (score >= 60) return 'D';
883
+ return 'F';
884
+ }
885
+
886
+ // Animate progress bars on load
887
+ window.addEventListener('load', () => {
888
+ document.querySelectorAll('.progress-fill').forEach(bar => {
889
+ const width = bar.style.width;
890
+ bar.style.width = '0%';
891
+ setTimeout(() => {
892
+ bar.style.width = width;
893
+ }, 100);
894
+ });
895
+ });
896
+ </script>
897
+ </body>
898
+ </html>`;
899
+ }
900
+
901
+ // Generate and save HTML report
902
+ const html = generateHTML(reportData);
903
+ const outputPath = args[1] || `tests/reports/testability-report-${Date.now()}.html`;
904
+
905
+ // Ensure directory exists
906
+ const dir = path.dirname(outputPath);
907
+ if (!fs.existsSync(dir)) {
908
+ fs.mkdirSync(dir, { recursive: true });
909
+ }
910
+
911
+ fs.writeFileSync(outputPath, html);
912
+
913
+ console.log(`✓ HTML report generated: ${outputPath}`);
914
+ console.log(`✓ Overall score: ${reportData.overall}/100 (${getLetterGrade(reportData.overall)})`);
915
+
916
+ // Auto-open by default (disable with AUTO_OPEN=false)
917
+ if (process.env.AUTO_OPEN !== 'false') {
918
+ console.log(`\n🌐 Starting HTTP server...`);
919
+
920
+ const { exec } = require('child_process');
921
+ const http = require('http');
922
+ const fs = require('fs');
923
+ const absolutePath = path.resolve(outputPath);
924
+ const reportDir = path.dirname(absolutePath);
925
+ const reportFile = path.basename(absolutePath);
926
+
927
+ // Find a free port starting from 8080
928
+ const findFreePort = (startPort = 8080) => {
929
+ return new Promise((resolve) => {
930
+ const server = http.createServer();
931
+ server.listen(startPort, () => {
932
+ const port = server.address().port;
933
+ server.close(() => resolve(port));
934
+ }).on('error', () => {
935
+ resolve(findFreePort(startPort + 1));
936
+ });
937
+ });
938
+ };
939
+
940
+ findFreePort().then(port => {
941
+ // Create Node.js HTTP server (more reliable than Python in containers)
942
+ const server = http.createServer((_req, res) => {
943
+ const filePath = path.join(reportDir, reportFile);
944
+ fs.readFile(filePath, (err, data) => {
945
+ if (err) {
946
+ res.writeHead(500);
947
+ res.end('Error loading report');
948
+ } else {
949
+ res.writeHead(200, { 'Content-Type': 'text/html' });
950
+ res.end(data);
951
+ }
952
+ });
953
+ });
954
+
955
+ server.listen(port, '0.0.0.0', () => {
956
+ const reportUrl = `http://localhost:${port}`;
957
+
958
+ // Display prominent, clickable URL
959
+ console.log(`\n┌─────────────────────────────────────────────────────────────┐`);
960
+ console.log(`│ │`);
961
+ console.log(`│ ✅ HTTP Server Running on Port ${port} │`);
962
+ console.log(`│ │`);
963
+ console.log(`│ 📊 CLICK HERE TO OPEN REPORT: │`);
964
+ console.log(`│ │`);
965
+ console.log(`│ ${reportUrl} │`);
966
+ console.log(`│ │`);
967
+ console.log(`│ (VS Code will forward this port automatically) │`);
968
+ console.log(`│ │`);
969
+ console.log(`└─────────────────────────────────────────────────────────────┘\n`);
970
+ console.log(`💡 Server will keep running until you stop it (Ctrl+C)\n`);
971
+
972
+ // Auto-open in browser (works in VS Code Dev Container)
973
+ setTimeout(() => {
974
+ const openCommand = process.platform === 'darwin' ? 'open' :
975
+ process.platform === 'win32' ? 'start' :
976
+ 'xdg-open';
977
+ exec(`${openCommand} ${reportUrl}`, (err) => {
978
+ if (err) {
979
+ console.log(`⚠️ Could not auto-open browser: ${err.message}`);
980
+ console.log(`📌 Please manually open: ${reportUrl}`);
981
+ } else {
982
+ console.log(`🚀 Browser opened automatically!`);
983
+ }
984
+ });
985
+ }, 1000);
986
+ });
987
+
988
+ server.on('error', (err) => {
989
+ console.error(`❌ Server error: ${err.message}`);
990
+ console.log(`\n📄 Report saved to: ${absolutePath}`);
991
+ });
992
+ }).catch(err => {
993
+ console.error(`❌ Failed to start server: ${err.message}`);
994
+ console.log(`\n📄 Report saved to: ${absolutePath}`);
995
+ });
996
+ } else {
997
+ console.log(`\nView report:`);
998
+ console.log(` google-chrome ${outputPath}`);
999
+ console.log(` # or`);
1000
+ console.log(` open ${outputPath}`);
1001
+ }
1002
+
1003
+ // Don't exit immediately - let server keep running
1004
+ if (process.env.AUTO_OPEN !== 'false') {
1005
+ console.log(`\n💡 Tip: Set AUTO_OPEN=false to disable automatic browser opening`);
1006
+ console.log(`💡 Server is running in background. Kill process to stop.`);
1007
+ }