@capagents/forgeqe 3.1.2 → 3.1.3

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 (170) hide show
  1. package/HOW_TO_USE.md +5003 -2077
  2. package/README.md +155 -449
  3. package/dist/docs-site/docs/app-theme.css +30 -9
  4. package/dist/docs-site/docs/architecture/index.html +45 -515
  5. package/dist/docs-site/docs/architecture-reference/index.html +1781 -0
  6. package/dist/docs-site/docs/area-api/index.html +257 -116
  7. package/dist/docs-site/docs/area-automated-tests/index.html +1229 -419
  8. package/dist/docs-site/docs/area-browser/index.html +167 -125
  9. package/dist/docs-site/docs/area-data/index.html +178 -188
  10. package/dist/docs-site/docs/area-desktop/index.html +329 -282
  11. package/dist/docs-site/docs/area-mobile/index.html +138 -86
  12. package/dist/docs-site/docs/area-operations/index.html +567 -393
  13. package/dist/docs-site/docs/area-pull-requests/index.html +114 -32
  14. package/dist/docs-site/docs/area-quality/index.html +111 -49
  15. package/dist/docs-site/docs/area-release/index.html +180 -65
  16. package/dist/docs-site/docs/area-setup/index.html +742 -339
  17. package/dist/docs-site/docs/area-systems/index.html +32 -48
  18. package/dist/docs-site/docs/area-test-cases/index.html +387 -154
  19. package/dist/docs-site/docs/containers/index.html +87 -101
  20. package/dist/docs-site/docs/cost-architecture/index.html +4 -3
  21. package/dist/docs-site/docs/custom-agents-first-run/index.html +108 -50
  22. package/dist/docs-site/docs/desktop/index.html +277 -297
  23. package/dist/docs-site/docs/desktop-ci/index.html +15 -5
  24. package/dist/docs-site/docs/docs-tabs.js +56 -0
  25. package/dist/docs-site/docs/evidence/index.html +50 -49
  26. package/dist/docs-site/docs/feature-test-prompts/index.html +34 -24
  27. package/dist/docs-site/docs/get-started/index.html +464 -168
  28. package/dist/docs-site/docs/graphify/index.html +8 -7
  29. package/dist/docs-site/docs/guardrails/index.html +20 -4
  30. package/dist/docs-site/docs/index.html +4 -3
  31. package/dist/docs-site/docs/mobile/index.html +96 -76
  32. package/dist/docs-site/docs/model-routing/index.html +44 -18
  33. package/dist/docs-site/docs/overview/index.html +23 -7
  34. package/dist/docs-site/docs/product-graph/index.html +13 -12
  35. package/dist/docs-site/docs/product-knowledge/index.html +16 -5
  36. package/dist/docs-site/docs/product-views/index.html +7 -6
  37. package/dist/docs-site/docs/reference/index.html +95 -65
  38. package/dist/docs-site/docs/search.js +1 -1
  39. package/dist/docs-site/docs/using/index.html +444 -126
  40. package/dist/docs-site/docs/web-app/index.html +54 -51
  41. package/dist/forgeqe.js +1822 -1822
  42. package/dist/web/assets/Agent-3pV8Rwap.js +8 -0
  43. package/dist/web/assets/AgentWork-DAnmH0My.js +2 -0
  44. package/dist/web/assets/ApiTests-DW4MRFzG.js +10 -0
  45. package/dist/web/assets/Browse-Bd0ZZfc2.js +1 -0
  46. package/dist/web/assets/Chat-DnBUm_97.js +3 -0
  47. package/dist/web/assets/CommandPalette-B1O9aDTk.js +1 -0
  48. package/dist/web/assets/Compare-1v7_ca7z.js +1 -0
  49. package/dist/web/assets/Cost-CWrc4McH.js +1 -0
  50. package/dist/web/assets/Data-rWSiG4Cq.js +6 -0
  51. package/dist/web/assets/Desktop-3x6EQqos.js +1 -0
  52. package/dist/web/assets/DesktopReview-cSA10Rm3.js +1 -0
  53. package/dist/web/assets/Evidence-CKy3o7cw.js +1 -0
  54. package/dist/web/assets/{Explore-ObkEpUyS.js → Explore-CMAxWE_8.js} +2 -2
  55. package/dist/web/assets/Features-haQchkhA.js +1 -0
  56. package/dist/web/assets/{Flags-0-RniPJm.js → Flags-BaQjYi_t.js} +2 -2
  57. package/dist/web/assets/Flaky-DUuC0qTn.js +1 -0
  58. package/dist/web/assets/Impact-CP0H8ygo.js +3 -0
  59. package/dist/web/assets/Jobs-cYxoYd3i.js +5 -0
  60. package/dist/web/assets/KindPage-DWW8gN5_.js +6 -0
  61. package/dist/web/assets/Migration-Bsm7WU1d.js +2 -0
  62. package/dist/web/assets/PageAgent-c95zT2PJ.js +1 -0
  63. package/dist/web/assets/Product-BQSiR28a.js +7 -0
  64. package/dist/web/assets/Production-CAv0Vtoy.js +1 -0
  65. package/dist/web/assets/Quality-aQPaPYQc.js +1 -0
  66. package/dist/web/assets/Readiness-CkknP87n.js +1 -0
  67. package/dist/web/assets/Record-09IsC9U-.js +1 -0
  68. package/dist/web/assets/Regression-BL4MfN47.js +5 -0
  69. package/dist/web/assets/RelationGraph-Dg4fqt7l.js +1 -0
  70. package/dist/web/assets/Reports-CMV1l-iS.js +2 -0
  71. package/dist/web/assets/Response-DTBFBeKB.js +9 -0
  72. package/dist/web/assets/Responsive-DBRQ9FUO.js +3 -0
  73. package/dist/web/assets/RunDiff-CMDrnsA3.js +1 -0
  74. package/dist/web/assets/Runs-Dkeu6_vZ.js +2 -0
  75. package/dist/web/assets/Settings-KjKm8h-_.js +21 -0
  76. package/dist/web/assets/{Steps-D-YG0eJy.js → Steps-HYHK9psI.js} +1 -1
  77. package/dist/web/assets/TestCases-Cv6-OSv0.js +1 -0
  78. package/dist/web/assets/TestData-DbEfNlUE.js +2 -0
  79. package/dist/web/assets/TestDebt-DzHQIU4X.js +1 -0
  80. package/dist/web/assets/TestManagement-BgRTGHMT.js +1 -0
  81. package/dist/web/assets/Tosca-DZpHAtnH.js +3 -0
  82. package/dist/web/assets/WhatsNew-jp0c4WSV.js +1 -0
  83. package/dist/web/assets/coverage-BB9BLjGz.js +5 -0
  84. package/dist/web/assets/{dataParts-DbeCj9ga.js → dataParts-DEPK4eQE.js} +2 -2
  85. package/dist/web/assets/{diff-BStuTmsN.js → diff-CcNwLCX6.js} +1 -1
  86. package/dist/web/assets/{families-BBFFrUlo.js → families-gkpkloLT.js} +1 -1
  87. package/dist/web/assets/filters-C7phIFfd.js +1 -0
  88. package/dist/web/assets/fold-i73P-EDV.js +1 -0
  89. package/dist/web/assets/head-BtTqyLlj.js +1 -0
  90. package/dist/web/assets/{highlight-BcFZIf59.js → highlight-DZI39CzZ.js} +1 -1
  91. package/dist/web/assets/index-ClFOh63x.css +2 -0
  92. package/dist/web/assets/index-YGWJEkAT.js +64 -0
  93. package/dist/web/assets/input-C2vQ9O3a.js +1 -0
  94. package/dist/web/assets/logos-BmbNTDu2.js +1 -0
  95. package/dist/web/assets/palette-XFlqvgZl.js +1 -0
  96. package/dist/web/assets/{paletteCommands-Co-RlQ8q.js → paletteCommands-DsbD2ASU.js} +1 -1
  97. package/dist/web/assets/parts-DEVx2Sea.js +1 -0
  98. package/dist/web/assets/productParts-Bi-XjszL.js +1 -0
  99. package/dist/web/assets/qualityParts-Dbu01g7G.js +1 -0
  100. package/dist/web/assets/{recordTest-Cez2sDJO.js → recordTest--Wr40QdN.js} +1 -1
  101. package/dist/web/assets/route-Dg53WdFu.js +1 -0
  102. package/dist/web/index.html +6 -7
  103. package/docs/ARCHITECTURE.md +50 -563
  104. package/docs/ARCHITECTURE_REFERENCE.md +1484 -0
  105. package/docs/CONTAINERS.md +87 -87
  106. package/docs/CUSTOM_AGENTS_FIRST_RUN.md +125 -43
  107. package/docs/DESKTOP-CI.md +18 -3
  108. package/docs/DESKTOP.md +298 -297
  109. package/docs/MOBILE.md +103 -71
  110. package/docs/MODEL_ROUTING.md +48 -15
  111. package/docs/WEB_APP.md +49 -44
  112. package/docs/feature-test-prompts.md +29 -16
  113. package/docs/user-guide.html +5263 -2453
  114. package/guardrails/README.md +22 -2
  115. package/knowledge/README.md +15 -2
  116. package/package.json +1 -1
  117. package/prompts/brain.md +1 -0
  118. package/py/forgeqe_engine/recordsession.py +100 -24
  119. package/dist/web/assets/Agent-CPhmZdFX.js +0 -8
  120. package/dist/web/assets/AgentWork-BXdN9xgi.js +0 -2
  121. package/dist/web/assets/ApiTests-Do3xLjfB.js +0 -10
  122. package/dist/web/assets/Browse-WVkJT6Bs.js +0 -2
  123. package/dist/web/assets/Chat-CDc9UcQX.js +0 -3
  124. package/dist/web/assets/CommandPalette-BAZm62lV.js +0 -1
  125. package/dist/web/assets/Compare-Br6n9T9L.js +0 -1
  126. package/dist/web/assets/Cost-BBUyBu3Y.js +0 -1
  127. package/dist/web/assets/Data-Ch2DPEWp.js +0 -6
  128. package/dist/web/assets/Desktop-Qzoq-cQv.js +0 -1
  129. package/dist/web/assets/DesktopReview-CF_jQYAM.js +0 -1
  130. package/dist/web/assets/Evidence-C72Lj5_Q.js +0 -1
  131. package/dist/web/assets/Features-CQzNo_WP.js +0 -1
  132. package/dist/web/assets/Flaky-BPJvNLCA.js +0 -1
  133. package/dist/web/assets/Impact-CfccsL_k.js +0 -3
  134. package/dist/web/assets/Jobs-T6m4zhDy.js +0 -5
  135. package/dist/web/assets/KindPage-BDUvWe2p.js +0 -6
  136. package/dist/web/assets/Migration-Dqeh4x5u.js +0 -2
  137. package/dist/web/assets/PageAgent-DNjzIgeY.js +0 -1
  138. package/dist/web/assets/Product-nYV_scOV.js +0 -7
  139. package/dist/web/assets/Production-CGSbEWVa.js +0 -1
  140. package/dist/web/assets/Quality-BIypojZm.js +0 -1
  141. package/dist/web/assets/Readiness-BlRjwJRg.js +0 -1
  142. package/dist/web/assets/Record-v2KLI-_Z.js +0 -1
  143. package/dist/web/assets/Regression-B-jSt4Jz.js +0 -5
  144. package/dist/web/assets/RelationGraph-8J98lOVG.js +0 -1
  145. package/dist/web/assets/Reports-GI4u6SyW.js +0 -2
  146. package/dist/web/assets/Response-mhBThq2b.js +0 -9
  147. package/dist/web/assets/Responsive-DXu7Ra7K.js +0 -3
  148. package/dist/web/assets/RunDiff-D0SHDNp0.js +0 -1
  149. package/dist/web/assets/Runs-C1Gjdi9M.js +0 -2
  150. package/dist/web/assets/Settings-BGGeuvyF.js +0 -21
  151. package/dist/web/assets/TestCases-DC4w77eQ.js +0 -1
  152. package/dist/web/assets/TestData-CvKWRVVV.js +0 -2
  153. package/dist/web/assets/TestDebt-D8YzN29_.js +0 -1
  154. package/dist/web/assets/TestManagement-C5cDCqrD.js +0 -1
  155. package/dist/web/assets/Tosca-BGUv3RiJ.js +0 -3
  156. package/dist/web/assets/WhatsNew-B_Gyuv8O.js +0 -1
  157. package/dist/web/assets/coverage-BMP6ELFJ.js +0 -5
  158. package/dist/web/assets/filters-CnAMr286.js +0 -1
  159. package/dist/web/assets/fold-D_O_VZui.js +0 -1
  160. package/dist/web/assets/head-CRo48rPt.js +0 -1
  161. package/dist/web/assets/index-B3JsM7tv.js +0 -64
  162. package/dist/web/assets/index-CafApcbZ.css +0 -2
  163. package/dist/web/assets/input-CtzK50ZF.js +0 -1
  164. package/dist/web/assets/line-icons-rdF8DYDJ.js +0 -1
  165. package/dist/web/assets/logos-D4oVWzqa.js +0 -1
  166. package/dist/web/assets/palette-DAaGSao7.js +0 -1
  167. package/dist/web/assets/parts-D357Wolo.js +0 -1
  168. package/dist/web/assets/productParts-B8oHRCJF.js +0 -1
  169. package/dist/web/assets/qualityParts-BLkmIfDY.js +0 -1
  170. package/dist/web/assets/route-BloYJWgw.js +0 -1
@@ -11,6 +11,7 @@
11
11
  <link rel="stylesheet" href="../docs.css">
12
12
  <script src="../search.js" defer></script>
13
13
  <script src="../docs.js" defer></script>
14
+ <script src="../docs-tabs.js" defer></script>
14
15
  <link rel="stylesheet" href="../../app-look.css">
15
16
  <link rel="stylesheet" href="../app-theme.css">
16
17
  </head>
@@ -112,11 +113,11 @@
112
113
  <div class="container docs-layout">
113
114
  <nav class="docs-side" aria-label="Docs">
114
115
  <a class="side-home" href="../index.html" aria-current="page"><svg class="pix ph" aria-hidden="true" focusable="false"><use href="#ph-wikis"/></svg>Docs home</a>
115
- <div class="side-group"><p class="side-head">Start here</p><ul><li><a href="../overview/index.html"><span>What ForgeQE does</span></a></li><li><a href="../get-started/index.html"><span>Get started</span></a></li><li><a href="../using/index.html"><span>Using ForgeQE</span></a></li><li><a href="../web-app/index.html"><span>The web app</span></a></li></ul></div><div class="side-group"><p class="side-head">Browser and tests</p><ul><li><a href="../area-browser/index.html"><span>Browser testing</span></a></li><li><a href="../area-test-cases/index.html"><span>Test cases</span></a></li><li><a href="../area-automated-tests/index.html"><span>Automated tests</span></a></li><li><a href="../feature-test-prompts/index.html"><span>Feature test prompts</span></a></li><li><a href="index.html" aria-current="page"><span>API testing</span></a></li><li><a href="../area-quality/index.html"><span>Quality checks</span></a></li></ul></div><div class="side-group"><p class="side-head">Desktop and mobile</p><ul><li><a href="../area-desktop/index.html"><span>Desktop apps</span></a></li><li><a href="../area-mobile/index.html"><span>Mobile apps</span></a></li></ul></div><div class="side-group"><p class="side-head">Setup and operations</p><ul><li><a href="../area-setup/index.html"><span>Setup and configuration</span></a></li><li><a href="../area-operations/index.html"><span>Operations and monitoring</span></a></li><li><a href="../area-data/index.html"><span>Test data and databases</span></a></li><li><a href="../area-pull-requests/index.html"><span>Pull requests</span></a></li><li><a href="../area-release/index.html"><span>Release and reports</span></a></li></ul></div><div class="side-group"><p class="side-head">Agents and knowledge</p><ul><li><a href="../custom-agents-first-run/index.html"><span>Custom agents: a first run</span></a></li><li><a href="../product-knowledge/index.html"><span>Product knowledge</span></a></li><li><a href="../graphify/index.html"><span>Reading product code</span></a></li></ul></div><div class="side-group"><p class="side-head">How ForgeQE works</p><ul><li><a href="../area-systems/index.html"><span>Connected systems</span></a></li><li><a href="../architecture/index.html"><span>Architecture</span></a></li><li><a href="../../architecture-map/index.html"><span>Architecture map</span></a></li><li><a href="../../security/index.html"><span>Security and data flows</span></a></li><li><a href="../guardrails/index.html"><span>Guardrails</span></a></li></ul></div><div class="side-group"><p class="side-head">Look it up</p><ul><li><a href="../reference/index.html"><span>Reference</span></a></li></ul></div><div class="side-group"><p class="side-head">For contributors</p><ul><li><a href="../product-graph/index.html"><span>Product knowledge graph</span></a></li><li><a href="../product-views/index.html"><span>Product views</span></a></li><li><a href="../evidence/index.html"><span>Evidence</span></a></li><li><a href="../cost-architecture/index.html"><span>Cost-aware execution</span></a></li></ul></div>
116
+ <div class="side-group"><p class="side-head">Start here</p><ul><li><a href="../overview/index.html"><span>What ForgeQE does</span></a></li><li><a href="../get-started/index.html"><span>Get started</span></a></li><li><a href="../using/index.html"><span>Using ForgeQE</span></a></li><li><a href="../web-app/index.html"><span>The web app</span></a></li></ul></div><div class="side-group"><p class="side-head">Browser and tests</p><ul><li><a href="../area-browser/index.html"><span>Browser testing</span></a></li><li><a href="../area-test-cases/index.html"><span>Test cases</span></a></li><li><a href="../area-automated-tests/index.html"><span>Automated tests</span></a></li><li><a href="../feature-test-prompts/index.html"><span>Feature test prompts</span></a></li><li><a href="index.html" aria-current="page"><span>API testing</span></a></li><li><a href="../area-quality/index.html"><span>Quality checks</span></a></li></ul></div><div class="side-group"><p class="side-head">Desktop and mobile</p><ul><li><a href="../area-desktop/index.html"><span>Desktop apps</span></a></li><li><a href="../area-mobile/index.html"><span>Mobile apps</span></a></li></ul></div><div class="side-group"><p class="side-head">Setup and operations</p><ul><li><a href="../area-setup/index.html"><span>Setup and configuration</span></a></li><li><a href="../area-operations/index.html"><span>Operations and monitoring</span></a></li><li><a href="../area-data/index.html"><span>Test data and databases</span></a></li><li><a href="../area-pull-requests/index.html"><span>Pull requests</span></a></li><li><a href="../area-release/index.html"><span>Release and reports</span></a></li></ul></div><div class="side-group"><p class="side-head">Agents and knowledge</p><ul><li><a href="../custom-agents-first-run/index.html"><span>Custom agents: a first run</span></a></li><li><a href="../product-knowledge/index.html"><span>Product knowledge</span></a></li></ul></div><div class="side-group"><p class="side-head">How ForgeQE works</p><ul><li><a href="../area-systems/index.html"><span>Connected systems</span></a></li><li><a href="../architecture/index.html"><span>How ForgeQE works</span></a></li><li><a href="../../architecture-map/index.html"><span>Architecture map</span></a></li><li><a href="../../security/index.html"><span>Security and data flows</span></a></li><li><a href="../guardrails/index.html"><span>Guardrails</span></a></li></ul></div><div class="side-group"><p class="side-head">Look it up</p><ul><li><a href="../reference/index.html"><span>Reference</span></a></li></ul></div><div class="side-group"><p class="side-head">For contributors</p><ul><li><a href="../architecture-reference/index.html"><span>Architecture reference</span></a></li><li><a href="../product-graph/index.html"><span>Product knowledge graph</span></a></li><li><a href="../product-views/index.html"><span>Product views</span></a></li><li><a href="../graphify/index.html"><span>Reading product code</span></a></li><li><a href="../evidence/index.html"><span>Evidence</span></a></li><li><a href="../cost-architecture/index.html"><span>Cost-aware execution</span></a></li></ul></div>
116
117
  </nav>
117
118
  <main id="main" class="docs-main guide chapter-page">
118
119
  <p class="crumbs"><a href="../index.html">Docs</a><span>/</span>Browser and tests</p>
119
- <div class="page-bar"><details class="bar-menu"><summary>Docs menu</summary><nav class="bar-panel" aria-label="Docs menu"><div class="side-group"><p class="side-head">Start here</p><ul><li><a href="../overview/index.html"><span>What ForgeQE does</span></a></li><li><a href="../get-started/index.html"><span>Get started</span></a></li><li><a href="../using/index.html"><span>Using ForgeQE</span></a></li><li><a href="../web-app/index.html"><span>The web app</span></a></li></ul></div><div class="side-group"><p class="side-head">Browser and tests</p><ul><li><a href="../area-browser/index.html"><span>Browser testing</span></a></li><li><a href="../area-test-cases/index.html"><span>Test cases</span></a></li><li><a href="../area-automated-tests/index.html"><span>Automated tests</span></a></li><li><a href="../feature-test-prompts/index.html"><span>Feature test prompts</span></a></li><li><a href="index.html" aria-current="page"><span>API testing</span></a></li><li><a href="../area-quality/index.html"><span>Quality checks</span></a></li></ul></div><div class="side-group"><p class="side-head">Desktop and mobile</p><ul><li><a href="../area-desktop/index.html"><span>Desktop apps</span></a></li><li><a href="../area-mobile/index.html"><span>Mobile apps</span></a></li></ul></div><div class="side-group"><p class="side-head">Setup and operations</p><ul><li><a href="../area-setup/index.html"><span>Setup and configuration</span></a></li><li><a href="../area-operations/index.html"><span>Operations and monitoring</span></a></li><li><a href="../area-data/index.html"><span>Test data and databases</span></a></li><li><a href="../area-pull-requests/index.html"><span>Pull requests</span></a></li><li><a href="../area-release/index.html"><span>Release and reports</span></a></li></ul></div><div class="side-group"><p class="side-head">Agents and knowledge</p><ul><li><a href="../custom-agents-first-run/index.html"><span>Custom agents: a first run</span></a></li><li><a href="../product-knowledge/index.html"><span>Product knowledge</span></a></li><li><a href="../graphify/index.html"><span>Reading product code</span></a></li></ul></div><div class="side-group"><p class="side-head">How ForgeQE works</p><ul><li><a href="../area-systems/index.html"><span>Connected systems</span></a></li><li><a href="../architecture/index.html"><span>Architecture</span></a></li><li><a href="../../architecture-map/index.html"><span>Architecture map</span></a></li><li><a href="../../security/index.html"><span>Security and data flows</span></a></li><li><a href="../guardrails/index.html"><span>Guardrails</span></a></li></ul></div><div class="side-group"><p class="side-head">Look it up</p><ul><li><a href="../reference/index.html"><span>Reference</span></a></li></ul></div><div class="side-group"><p class="side-head">For contributors</p><ul><li><a href="../product-graph/index.html"><span>Product knowledge graph</span></a></li><li><a href="../product-views/index.html"><span>Product views</span></a></li><li><a href="../evidence/index.html"><span>Evidence</span></a></li><li><a href="../cost-architecture/index.html"><span>Cost-aware execution</span></a></li></ul></div></nav></details><details class="bar-toc"><summary>On this page</summary><nav class="bar-panel" aria-label="On this page"><ul><li><a href="#cap-api-testing">API and contract testing</a></li><li><a href="#doc-how_to_use-api-and-contract-tests">API and contract tests</a></li><li><a href="#doc-how_to_use-end-to-end-api-scenarios">End-to-end API scenarios</a></li><li><a href="#cap-api-load-security">API load and security checks</a></li></ul></nav></details></div>
120
+ <div class="page-bar"><details class="bar-menu"><summary>Docs menu</summary><nav class="bar-panel" aria-label="Docs menu"><div class="side-group"><p class="side-head">Start here</p><ul><li><a href="../overview/index.html"><span>What ForgeQE does</span></a></li><li><a href="../get-started/index.html"><span>Get started</span></a></li><li><a href="../using/index.html"><span>Using ForgeQE</span></a></li><li><a href="../web-app/index.html"><span>The web app</span></a></li></ul></div><div class="side-group"><p class="side-head">Browser and tests</p><ul><li><a href="../area-browser/index.html"><span>Browser testing</span></a></li><li><a href="../area-test-cases/index.html"><span>Test cases</span></a></li><li><a href="../area-automated-tests/index.html"><span>Automated tests</span></a></li><li><a href="../feature-test-prompts/index.html"><span>Feature test prompts</span></a></li><li><a href="index.html" aria-current="page"><span>API testing</span></a></li><li><a href="../area-quality/index.html"><span>Quality checks</span></a></li></ul></div><div class="side-group"><p class="side-head">Desktop and mobile</p><ul><li><a href="../area-desktop/index.html"><span>Desktop apps</span></a></li><li><a href="../area-mobile/index.html"><span>Mobile apps</span></a></li></ul></div><div class="side-group"><p class="side-head">Setup and operations</p><ul><li><a href="../area-setup/index.html"><span>Setup and configuration</span></a></li><li><a href="../area-operations/index.html"><span>Operations and monitoring</span></a></li><li><a href="../area-data/index.html"><span>Test data and databases</span></a></li><li><a href="../area-pull-requests/index.html"><span>Pull requests</span></a></li><li><a href="../area-release/index.html"><span>Release and reports</span></a></li></ul></div><div class="side-group"><p class="side-head">Agents and knowledge</p><ul><li><a href="../custom-agents-first-run/index.html"><span>Custom agents: a first run</span></a></li><li><a href="../product-knowledge/index.html"><span>Product knowledge</span></a></li></ul></div><div class="side-group"><p class="side-head">How ForgeQE works</p><ul><li><a href="../area-systems/index.html"><span>Connected systems</span></a></li><li><a href="../architecture/index.html"><span>How ForgeQE works</span></a></li><li><a href="../../architecture-map/index.html"><span>Architecture map</span></a></li><li><a href="../../security/index.html"><span>Security and data flows</span></a></li><li><a href="../guardrails/index.html"><span>Guardrails</span></a></li></ul></div><div class="side-group"><p class="side-head">Look it up</p><ul><li><a href="../reference/index.html"><span>Reference</span></a></li></ul></div><div class="side-group"><p class="side-head">For contributors</p><ul><li><a href="../architecture-reference/index.html"><span>Architecture reference</span></a></li><li><a href="../product-graph/index.html"><span>Product knowledge graph</span></a></li><li><a href="../product-views/index.html"><span>Product views</span></a></li><li><a href="../graphify/index.html"><span>Reading product code</span></a></li><li><a href="../evidence/index.html"><span>Evidence</span></a></li><li><a href="../cost-architecture/index.html"><span>Cost-aware execution</span></a></li></ul></div></nav></details><details class="bar-toc"><summary>On this page</summary><nav class="bar-panel" aria-label="On this page"><ul><li><a href="#cap-api-testing">API and contract testing</a></li><li><a href="#doc-how_to_use-end-to-end-api-scenarios">End-to-end API scenarios</a></li><li><a href="#cap-api-load-security">API load and security checks</a></li></ul></nav></details></div>
120
121
  <h1 class="topic-h"><svg class="pix pix--title ph" aria-hidden="true" focusable="false"><use href="#ph-api"/></svg>API testing</h1>
121
122
  <p class="guide-lead">Contracts and end-to-end scenarios, without a browser</p>
122
123
  <article class="spec feat" id="cap-api-testing">
@@ -124,28 +125,126 @@
124
125
  <p class="ds">Builds API contracts (status, schema, key fields) from the calls a browser run saw or from an API description (OpenAPI, Swagger, WSDL, GraphQL, .proto, gRPC reflection), and end-to-end API scenarios from runs, descriptions, test cases, or plain English. Runs them straight against the API without a browser, or writes them as tests in the repository. REST, GraphQL (with subscriptions), SOAP, gRPC (with streaming), WebSocket and Server-Sent Events. Comparing runs of one flow learns which values are parameters; contracts that stop passing after the app changed are learned again from a newer run, kept only when a replay passes and a person agrees. A mock server built from the contracts.</p>
125
126
  <div class="facts">
126
127
  <div class="fact"><span class="mono">Ask it</span><ul class="asks"><li>Turn the last run's API calls into tests</li><li>Test the API in openapi.yaml</li><li>Write API scenario tests for the order lifecycle</li><li>Import our Postman collection and send its calls</li><li>Add these cURL calls to the shop API</li><li>Heal the API contracts from the latest run</li></ul></div>
127
- <div class="fact"><span class="mono">What it needs</span><ul class="needs"><li><span class="need opt">Optional</span><span>The coding agent, Quill: a live model profile (or code.model) and the agent runtime, which forgeqe setup installs</span></li></ul></div>
128
+ <div class="fact"><span class="mono">What it needs</span><ul class="needs"><li><span class="need opt">Optional</span><span>The coding agent, Quill: a live model profile (or code.model), and what forgeqe setup installs for it</span></li></ul></div>
128
129
  <div class="fact"><span class="mono">Limits</span><ul class="plainlist"><li>Calls that change data run only when the user allows them, on a test environment, never production; healing never replays them.</li><li>A contract that fails can be a real defect: healing proposes a new version, and a person decides.</li></ul></div>
129
- <div class="fact"><span class="mono">Tools</span><p class="tools"><code>api_contracts</code> <code>run_api_contracts</code> <code>heal_api_contracts</code> <code>api_scenarios</code> <code>run_api_scenarios</code> <code>write_api_tests</code> <code>api_find_calls</code> <code>api_new_set</code> <code>api_add_calls</code> <code>api_import_collection</code></p></div>
130
+ <div class="fact"><span class="mono">Tools</span><p class="tools"><code>api_contracts</code> <code>run_api_contracts</code> <code>heal_api_contracts</code> <code>api_scenarios</code> <code>run_api_scenarios</code> <code>write_api_tests</code> <code>api_find_calls</code> <code>api_new_set</code> <code>api_add_calls</code> <code>api_delete_set</code> <code>api_import_collection</code></p></div>
130
131
  </div>
131
- <div class="detail"><span class="mono">In detail</span>
132
- <section class="doc" id="doc-how_to_use-api-and-contract-tests">
132
+
133
+ </article>
134
+ <div class="feat-detail"><section class="doc" data-topic id="doc-how_to_use-api-and-contract-tests">
133
135
  <h4>API and contract tests</h4>
134
- <div class="prose"><p>ForgeQE tests APIs directly too: REST, GraphQL (queries, mutations and subscriptions), SOAP, gRPC (unary and streaming), WebSocket and Server-Sent Events. API tests check the same logic as UI tests in a fraction of the time, and they do not break when the page changes. Contracts come from two places:</p>
136
+ <div class="prose"><p>ForgeQE tests APIs directly too: REST, GraphQL (queries, mutations and subscriptions), SOAP, gRPC (unary and streaming),
137
+ WebSocket and Server-Sent Events. API tests check the same logic as UI tests in a fraction of the time, and they do not
138
+ break when the page changes.</p>
139
+ <p><strong>Where contracts come from.</strong></p>
135
140
  <ul>
136
- <li><strong>A browser run, a recording, or its latest try.</strong> Every browser run, every recording you make by hand, and the latest <strong>Re-run</strong> of a recording record the application's own API calls (XHR, fetch, event streams) in <code>network.json</code> in the run folder: method, URL, status, timing, and the request and response bodies when they are JSON, XML, or text. Secrets never reach the file: <code>Authorization</code>, cookies, and API key headers are dropped (only the kind of auth is kept, e.g. bearer), and fields named like a password, token, key, session, or card number are redacted in bodies and query strings. Only a few headers are kept (content type, accept, SOAP action); <code>api.keep_headers</code> adds others your API needs, such as <code>X-Tenant</code>, which the contracts' example calls then send too. A header that can carry a credential (<code>Authorization</code>, <code>Cookie</code>, or one named like a token, key, auth or session) is refused there. Analytics and monitoring calls are left out. &quot;Turn the last run's API calls into tests&quot; (<code>api_contracts</code> from <code>run</code>) groups the calls into operations: one per method and path, with ids in paths turned into <code>{id}</code> (<code>GET /api/orders/{id}</code>), GraphQL by operation name, SOAP by action, gRPC-web by method. Several calls to one operation make a better contract: a field in every answer is required, a value that differs between calls is not pinned. No model is used.</li>
137
- <li><strong>An API description,</strong> by link or file: OpenAPI 3 or Swagger 2 (JSON or YAML, or the Swagger UI page, which ForgeQE looks behind for the document), WSDL for SOAP, a GraphQL endpoint (read by introspection) or an SDL or introspection file, <code>.proto</code> files, or <code>grpc://host:port</code> for a gRPC server with reflection (through <a href="https://github.com/fullstorydev/grpcurl" class="ext" rel="noopener">grpcurl</a>); client, server and bidi streaming rpcs become streaming contracts, and a GraphQL subscription becomes a <code>graphql-transport-ws</code> WebSocket contract. Each operation gets an example call from the description's examples; values it gives no example for are made up and the contract is marked as needing real values.</li>
141
+ <li><strong>A browser run, a recording, or its latest try.</strong> Every browser run, every recording you make by hand, and the latest
142
+ <strong>Re-run</strong> of a recording record the application's own API calls (XHR, fetch, event streams) in <code>network.json</code> in the
143
+ run folder: method, URL, status, timing, and the request and response bodies when they are JSON, XML or text.
144
+ <ul>
145
+ <li>Secrets never reach the file. <code>Authorization</code>, cookies and API key headers are dropped (only the kind of auth is
146
+ kept, e.g. bearer), and fields named like a password, token, key, session or card number are redacted in bodies and
147
+ query strings.</li>
148
+ <li>Only a few headers are kept (content type, accept, SOAP action). <code>api.keep_headers</code> adds others your API needs, such
149
+ as <code>X-Tenant</code>, which the contracts' example calls then send too. A header that can carry a credential
150
+ (<code>Authorization</code>, <code>Cookie</code>, or one named like a token, key, auth or session) is refused there.</li>
151
+ <li>Analytics and monitoring calls are left out.</li>
152
+ <li>&quot;Turn the last run's API calls into tests&quot; groups the calls into operations: one per method and path, with ids in
153
+ paths turned into <code>{id}</code> (<code>GET /api/orders/{id}</code>), GraphQL by operation name, SOAP by action, gRPC-web by method.
154
+ Several calls to one operation make a better contract: a field in every answer is required, a value that differs
155
+ between calls is not pinned. No model is used.</li>
138
156
  </ul>
139
- <p>Each contract has one example call and what its answer must have: the <strong>status</strong>, the <strong>content type</strong>, the body's <strong>schema</strong>, and <strong>key fields</strong> (ids, statuses, names, totals: present, with their type; a value only where it does not change between calls, like a status). GraphQL answers must have no <code>errors</code>; SOAP answers no <code>Fault</code> and the expected elements; gRPC calls the OK status. Contract sets are saved in <code>.forgeqe/reports/api/&lt;id&gt;/</code>: <code>contracts.json</code> (edit the examples freely, e.g. to give real ids) and <code>api.md</code>.</p>
140
- <p>Then:</p>
157
+ </li>
158
+ <li><strong>An API description,</strong> by link or file: OpenAPI 3 or Swagger 2 (JSON or YAML, or the Swagger UI page, which ForgeQE
159
+ looks behind for the document), WSDL for SOAP, a GraphQL endpoint (read by introspection) or an SDL or introspection
160
+ file, <code>.proto</code> files, or <code>grpc://host:port</code> for a gRPC server with reflection.
141
161
  <ul>
142
- <li><strong>Run them now</strong> (<code>run_api_contracts</code>, or <code>forgeqe api run</code>): ForgeQE makes each call and checks the answer, without a browser or a model. Calls that change data (POST, PUT, PATCH, DELETE, mutations, SOAP and gRPC calls not named like reads) are left out unless you allow them, on a test environment; the agent asks first. Calls with made-up values are skipped until you give real ones. Results go to <code>results.json</code> and <code>junit.xml</code>, with <code>report.html</code> (each contract a case, its checks the steps, with what the API answered) and <code>suite.json</code> beside them; a 401 or 403 says which header the call needs.</li>
143
- <li><strong>Calls the site's bot protection blocks.</strong> A site behind Cloudflare, Akamai, Imperva, DataDome or a similar service can answer a call that does not come from a browser with a challenge or block page (a 403, 429 or 503 with the service's marks, or HTML where the API answers JSON). ForgeQE tells that apart from the API's own refusal (a JSON 403 is the API's answer) and, with <code>api.browser_fallback</code> on (the default), sends a call that only reads again from a page of a real browser on the API's own site: the page loads first, so a challenge can set its cookie, and the call is made with <code>fetch()</code> in a part of the page the site's own scripts cannot see, so they never read its credentials. The result says &quot;sent from a browser page&quot;. A call that changes data is never sent again. Contract runs, scenarios, healing and the API page's <strong>Send</strong> use it (the page says &quot;Sent from a browser page&quot; by the answer; <code>forgeqe web</code> keeps that browser for two minutes after the last blocked call); load tests and security checks never do. Turned off, a blocked call fails with &quot;blocked&quot; and the reason.</li>
144
- <li><strong>Write them as tests</strong> (<code>write_api_tests</code>, or <code>forgeqe api tests</code>): Quill writes them in the repository's own framework and HTTP client (Playwright's <code>request</code> fixture, pytest with requests, REST Assured, RestSharp or HttpClient, supertest...) with the base URL from configuration and credentials from environment variables, and ForgeQE runs them until they pass.</li>
145
- <li><strong>Heal them when the app changed</strong> (<code>heal_api_contracts</code>, or <code>forgeqe api heal [SET] --run RUN</code>): run the flow again in the browser, and ForgeQE runs the set's read-only calls, learns each one that fails again from the newer run (the same operation with a new answer, or the one call of the same method and step that moved, like <code>/api/v1/orders/{id}</code> to <code>/api/v2/orders/{id}</code>), and replays it. Only a version whose replay passes is offered, with what changed (path, status, fields now required or gone), and the set changes only when you agree (<code>--yes</code> in a terminal); the old <code>contracts.json</code> is kept in <code>history/</code>, and scenarios that still make the old call are named. A contract that fails can be a real defect, so nothing is changed on its own. Calls that change data are never replayed, contracts from a description are fixed in the description, and another site's call is never taken.</li>
162
+ <li>Client, server and bidi streaming rpcs become streaming contracts, and a GraphQL subscription becomes a
163
+ <code>graphql-transport-ws</code> WebSocket contract.</li>
164
+ <li>Each operation gets an example call from the description's examples. Values it gives no example for are made up,
165
+ and the contract is marked as needing real values.</li>
146
166
  </ul>
147
- <p><strong>Learning what the caller chooses.</strong> One run cannot tell <code>/domains/github.com</code> from a fixed path. Give <code>api_contracts</code> other runs of the same flow (other data, another user: <code>compare_runs</code>, or <code>forgeqe api contracts --run RUN --compare RUN2,RUN3</code>) and the calls made in the same step, with the same method and the same number of path segments, are compared: a segment that differed becomes a parameter named for the segment before it (<code>GET /domains/{domain}</code>), when the first segment is the same, no more than half of them differ, and the answers have the same shape, so two endpoints are not made one. Each contract lists its <strong>inputs</strong> in <code>contracts.json</code>, <code>api.md</code> and on the API page (under the call's request, with a note when a call was learned again by healing): its path parameters, and the query keys and body fields whose values differed between calls (names only, never values). The example stays a real call, so it runs as it is.</p>
148
- <p>Credentials for API calls go in <code>forgeqe.yaml</code>, as references to environment variables; the values are sent, never stored or shown to a model:</p>
167
+ </li>
168
+ </ul>
169
+ <p><strong>What a contract holds.</strong> Each contract has one example call and what its answer must have: the <strong>status</strong>, the
170
+ <strong>content type</strong>, the body's <strong>schema</strong>, and <strong>key fields</strong> (ids, statuses, names, totals: present, with their type; a
171
+ value only where it does not change between calls, like a status). GraphQL answers must have no <code>errors</code>; SOAP answers no
172
+ <code>Fault</code> and the expected elements; gRPC calls the OK status. Contract sets are saved in <code>.forgeqe/reports/api/&lt;id&gt;/</code>:
173
+ <code>contracts.json</code> (edit the examples freely, e.g. to give real ids) and <code>api.md</code>.</p>
174
+ <p><strong>Making, running and writing contracts.</strong></p>
175
+ <div class="views" data-views><div class="view-tabs" role="tablist" aria-label="Show the steps for" hidden><button type="button" role="tab" class="view-tab" data-view="web" aria-selected="true">Web app</button><button type="button" role="tab" class="view-tab" data-view="terminal" aria-selected="false">Terminal</button></div><div class="view-panel" role="tabpanel" data-view="web"><p class="view-label"><strong>Web app</strong></p>
176
+ <ol>
177
+ <li>Open <strong>API tests</strong>.</li>
178
+ <li>On <strong>Agent</strong>, paste a link (an API description, a Postman collection, the docs), cURL commands, or tell it about the
179
+ API in your words; attach a file with <strong>Attach a file</strong>. Or on <strong>Workbench</strong>, press <strong>Add an API</strong> and pick <strong>Its
180
+ description</strong>, <strong>A Postman collection</strong> or <strong>A recorded run</strong>.</li>
181
+ <li>On <strong>Workbench</strong>, press <strong>Run</strong> to run every call and then every flow of an API.</li>
182
+ <li>To write the tests in the repository, pick <strong>Write the tests</strong> in the agent box beside the API.</li>
183
+ </ol>
184
+ </div><div class="view-panel" role="tabpanel" data-view="terminal"><p class="view-label"><strong>Terminal</strong></p>
185
+ <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>bash</span><button class="copy-code" type="button">Copy</button></div><pre class="lines"><code><span class="ln"><span class="cmd">forgeqe api contracts --spec https://petstore3.swagger.io/api/v3/openapi.json
186
+ </span></span><span class="ln ln--pair"><span class="cmd">forgeqe api contracts --run</span><span class="pad"> </span><span class="cm"><span class="h">#</span> the latest browser run's API calls
187
+ </span></span><span class="ln ln--pair"><span class="cmd">forgeqe api run --base-url https://qa.shop.example</span><span class="pad"> </span><span class="cm"><span class="h">#</span> exit 1 when a contract fails: a CI gate
188
+ </span></span><span class="ln ln--pair"><span class="cmd">forgeqe api tests --repo ../app</span><span class="pad"> </span><span class="cm"><span class="h">#</span> Quill writes them as tests
189
+ </span></span><span class="ln ln--pair"><span class="cmd">forgeqe api list</span><span class="pad"> </span><span class="cm"><span class="h">#</span> saved contract sets
190
+ </span></span></code></pre></div>
191
+ </div></div><p><strong>Then:</strong></p>
192
+ <ul>
193
+ <li><strong>Run them now</strong> (<strong>Run</strong> on the Workbench, or <code>forgeqe api run</code>): ForgeQE makes each call and checks the answer,
194
+ without a browser or a model.
195
+ <ul>
196
+ <li>Calls that change data (POST, PUT, PATCH, DELETE, mutations, SOAP and gRPC calls not named like reads) are left out
197
+ unless you allow them, on a test environment; the agent asks first.</li>
198
+ <li>Calls with made-up values are skipped until you give real ones.</li>
199
+ <li>Results go to <code>results.json</code> and <code>junit.xml</code>, with <code>report.html</code> (each contract a case, its checks the steps, with
200
+ what the API answered) and <code>suite.json</code> beside them. A 401 or 403 says which header the call needs.</li>
201
+ </ul>
202
+ </li>
203
+ <li><strong>Write them as tests</strong> (<code>forgeqe api tests</code>): Quill writes them in the repository's own framework and HTTP client
204
+ (Playwright's <code>request</code> fixture, pytest with requests, REST Assured, RestSharp or HttpClient, supertest...) with the
205
+ base URL from configuration and credentials from environment variables, and ForgeQE runs them until they pass.</li>
206
+ <li><strong>Heal them when the app changed</strong> (at a terminal, <code>forgeqe api heal [SET] --run RUN</code>, or by asking ForgeQE's agent):
207
+ run the flow again in the browser. ForgeQE runs the set's read-only calls, learns each one that fails again from the
208
+ newer run (the same operation with a new answer, or the one call of the same method and step that moved, like
209
+ <code>/api/v1/orders/{id}</code> to <code>/api/v2/orders/{id}</code>), and replays it.
210
+ <ul>
211
+ <li>Only a version whose replay passes is offered, with what changed (path, status, fields now required or gone).</li>
212
+ <li>The set changes only when you agree (<code>--yes</code> in a terminal). The old <code>contracts.json</code> is kept in <code>history/</code>, and
213
+ scenarios that still make the old call are named.</li>
214
+ <li>A contract that fails can be a real defect, so nothing is changed on its own. Calls that change data are never
215
+ replayed, contracts from a description are fixed in the description, and another site's call is never taken.</li>
216
+ </ul>
217
+ </li>
218
+ </ul>
219
+ <p><strong>Calls the site's bot protection blocks.</strong> A site behind Cloudflare, Akamai, Imperva, DataDome or a similar service can
220
+ answer a call that does not come from a browser with a challenge or block page (a 403, 429 or 503 with the service's
221
+ marks, or HTML where the API answers JSON). ForgeQE tells that apart from the API's own refusal (a JSON 403 is the API's
222
+ answer).</p>
223
+ <ul>
224
+ <li>With <code>api.browser_fallback</code> on (the default), a call that only reads is sent again from a page of a real browser on
225
+ the API's own site. The page loads first, so a challenge can set its cookie, and the call is made with <code>fetch()</code> in a
226
+ part of the page the site's own scripts cannot see, so they never read its credentials. The result says &quot;sent from a
227
+ browser page&quot;.</li>
228
+ <li>A call that changes data is never sent again.</li>
229
+ <li>Contract runs, scenarios, healing and the API page's <strong>Send</strong> use it (the page says &quot;Sent from a browser page&quot; by the
230
+ answer; <code>forgeqe web</code> keeps that browser for two minutes after the last blocked call). Load tests and security checks
231
+ never do.</li>
232
+ <li>Turned off, a blocked call fails with &quot;blocked&quot; and the reason.</li>
233
+ </ul>
234
+ <p><strong>Learning what the caller chooses.</strong> One run cannot tell <code>/domains/github.com</code> from a fixed path. Give ForgeQE other runs
235
+ of the same flow (other data, another user: <code>forgeqe api contracts --run RUN --compare RUN2,RUN3</code>, or ask the agent to
236
+ compare runs).</p>
237
+ <ul>
238
+ <li>The calls made in the same step, with the same method and the same number of path segments, are compared. A segment
239
+ that differed becomes a parameter named for the segment before it (<code>GET /domains/{domain}</code>), when the first segment is
240
+ the same, no more than half of them differ, and the answers have the same shape, so two endpoints are not made one.</li>
241
+ <li>Each contract lists its <strong>inputs</strong> in <code>contracts.json</code>, <code>api.md</code> and on the API page (under the call's request, with a
242
+ note when a call was learned again by healing): its path parameters, and the query keys and body fields whose values
243
+ differed between calls (names only, never values).</li>
244
+ <li>The example stays a real call, so it runs as it is.</li>
245
+ </ul>
246
+ <p><strong>Credentials for API calls.</strong> They go in <code>forgeqe.yaml</code>, as references to environment variables. The values are sent,
247
+ never stored or shown to a model:</p>
149
248
  <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre class="lines"><code><span class="ln"><span class="cmd">api:
150
249
  </span></span><span class="ln ln--pair"><span class="cmd"> capture: true</span><span class="pad"> </span><span class="cm"><span class="h">#</span> record the application's API calls in every browser run (default)
151
250
  </span></span><span class="ln ln--pair"><span class="cmd"> base_url: https://staging.shop.example</span><span class="pad"> </span><span class="cm"><span class="h">#</span> where contracts run when not where they were recorded or described
@@ -169,30 +268,43 @@
169
268
  </span></span><span class="ln"><span class="cmd"> users: 10
170
269
  </span></span><span class="ln"><span class="cmd"> limits: { p95_ms: 800, error_rate: 0.01 }
171
270
  </span></span></code></pre></div>
172
- <p><strong>Sign-in beyond fixed headers.</strong> <code>api.oauth2</code> fetches a bearer token with OAuth2's client-credentials grant from an
173
- https token address only (Basic client auth, no redirect followed), keeps it in memory until just before it expires, and
174
- sends it unless the call already carries an <code>Authorization</code>. <code>api.tls</code> gives a client certificate (mutual TLS), its key
175
- and the authorities trusted, used for HTTP, SSE, WebSocket and gRPC; each must be a PEM file of its kind. The client id,
176
- secret and key passphrase are read from the environment by name and stay out of model-run shells.</p>
177
- <p><strong>Load and latency testing</strong> (<code>forgeqe api load [SET]</code>, or <code>run_api_load</code>): many virtual users repeat the set's
178
- read-only calls for a time or a number of calls, each answer still checked as a contract. It reports each call's
179
- latency (p50/p90/p95/p99), throughput and error rate, and fails when a limit (<code>p95_ms</code>, <code>p99_ms</code>, <code>error_rate</code>,
180
- <code>min_rps</code>) is broken, writing <code>load.md</code>, <code>load.json</code> and <code>junit.xml</code>. Calls that change data are never load tested, and
181
- an environment named like production is refused as a target (at most 50 users, 10 minutes, 20,000 calls).</p>
271
+ <p><strong>Sign-in beyond fixed headers.</strong></p>
272
+ <ul>
273
+ <li><code>api.oauth2</code> fetches a bearer token with OAuth2's client-credentials grant from an https token address only (Basic
274
+ client auth, no redirect followed). It keeps the token in memory until just before it expires, and sends it unless the
275
+ call already carries an <code>Authorization</code>.</li>
276
+ <li><code>api.tls</code> gives a client certificate (mutual TLS), its key and the authorities trusted, used for HTTP, SSE, WebSocket
277
+ and gRPC. Each must be a PEM file of its kind.</li>
278
+ <li>The client id, secret and key passphrase are read from the environment by name and stay out of model-run shells.</li>
279
+ </ul>
280
+ <p><strong>Load and latency testing.</strong> At a terminal (<code>forgeqe api load [SET]</code>), or by asking ForgeQE's agent: many virtual users
281
+ repeat the set's read-only calls for a time or a number of calls, each answer still checked as a contract.</p>
282
+ <ul>
283
+ <li>It reports each call's latency (p50/p90/p95/p99), throughput and error rate.</li>
284
+ <li>It fails when a limit (<code>p95_ms</code>, <code>p99_ms</code>, <code>error_rate</code>, <code>min_rps</code>) is broken, writing <code>load.md</code>, <code>load.json</code> and
285
+ <code>junit.xml</code>.</li>
286
+ <li>Calls that change data are never load tested, and an environment named like production is refused as a target (at
287
+ most 50 users, 10 minutes, 20,000 calls).</li>
288
+ </ul>
182
289
  <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>bash</span><button class="copy-code" type="button">Copy</button></div><pre class="lines"><code><span class="ln"><span class="cmd">forgeqe api load --users 20 --duration 60 --p95-ms 800 --base-url https://qa.shop.example
183
290
  </span></span></code></pre></div>
184
- <p><strong>A mock server</strong> (<code>forgeqe api mock [SET]</code>): serves a mock of the set's REST, GraphQL and SOAP calls on <code>127.0.0.1</code>
185
- until you stop it, so an app, a consumer, or an automation script can run against a stand-in for the real API — useful
186
- for integration and end-to-end tests where the real dependency is missing, flaky, or a paid third party. (For a containerised mock that an environment's app points at for the whole session, the orchestrator's <code>mock_service</code> starts WireMock from a run, an OpenAPI description or a contract set, and takes the same rules file for conditional responses and fault or latency injection; stateful CRUD is served by this in-process mock.) It is guarded
187
- by a random token (send <code>Authorization: Bearer &lt;token&gt;</code>, or <code>X-Forgeqe-Mock-Token</code> when the consumer sends its own
188
- <code>Authorization</code>) and refuses non-local browser origins. Each call is answered in three steps: the first matching
189
- <strong>rule</strong>, then the <strong>stateful store</strong> when <code>--state</code> is on, then the contract's own example body.</p>
291
+ <p><strong>A mock server.</strong> At a terminal only, <code>forgeqe api mock [SET]</code> serves a mock of the set's REST, GraphQL and SOAP calls on
292
+ <code>127.0.0.1</code> until you stop it. An app, a consumer, or an automation script can then run against a stand-in for the real
293
+ API: useful for integration and end-to-end tests where the real dependency is missing, flaky, or a paid third party.</p>
190
294
  <ul>
191
- <li>
192
- <p><strong>Conditional responses</strong> come from a rules file (<code>--rules mocks.yaml</code>, YAML or JSON, read as untrusted — known keys
193
- only, no code). A rule names an <code>operation</code> (a contract id) or a <code>method</code>+<code>path</code>, an optional <code>when</code> (match on path
194
- params, query, headers, or body fields), and a <code>respond</code> (status, body, headers, a <code>delayMs</code>, or a <code>fault</code> of
195
- <code>error</code> or <code>timeout</code>). The first rule that matches wins, so a specific case can precede a catch-all:</p>
295
+ <li>It is guarded by a random token: send <code>Authorization: Bearer &lt;token&gt;</code>, or <code>X-Forgeqe-Mock-Token</code> when the consumer
296
+ sends its own <code>Authorization</code>. It refuses non-local browser origins.</li>
297
+ <li>Each call is answered in three steps: the first matching <strong>rule</strong>, then the <strong>stateful store</strong> when <code>--state</code> is on,
298
+ then the contract's own example body.</li>
299
+ <li>For a containerised mock that an environment's app points at for the whole session, see
300
+ <a href="../area-operations/index.html#doc-how_to_use-containers-and-mock-services">Containers and mock services</a>: it starts WireMock from a run, an OpenAPI description or
301
+ a contract set, and takes the same rules file for conditional responses and fault or latency injection. Stateful CRUD
302
+ is served by this mock.</li>
303
+ </ul>
304
+ <p><strong>Conditional responses</strong> come from a rules file (<code>--rules mocks.yaml</code>, YAML or JSON, read as untrusted: known keys only,
305
+ no code). A rule names an <code>operation</code> (a contract id) or a <code>method</code>+<code>path</code>, an optional <code>when</code> (match on path params,
306
+ query, headers or body fields), and a <code>respond</code> (status, body, headers, a <code>delayMs</code>, or a <code>fault</code> of <code>error</code> or
307
+ <code>timeout</code>). The first rule that matches wins, so a specific case can precede a catch-all:</p>
196
308
  <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>yaml</span><button class="copy-code" type="button">Copy</button></div><pre class="lines"><code><span class="ln"><span class="cmd">state: true
197
309
  </span></span><span class="ln"><span class="cmd">rules:
198
310
  </span></span><span class="ln"><span class="cmd"> - operation: GET /orders/{id}
@@ -207,85 +319,88 @@ params, query, headers, or body fields), and a <code>respond</code> (status, bod
207
319
  </span></span><span class="ln ln--pair"><span class="cmd"> - operation: GET /orders</span><span class="pad"> </span><span class="cm"><span class="h">#</span> a degraded dependency
208
320
  </span></span><span class="ln"><span class="cmd"> respond: { fault: error, delayMs: 800 }
209
321
  </span></span></code></pre></div>
210
- </li>
211
- <li>
212
- <p><strong>Stateful CRUD</strong> (<code>--state</code>, or <code>state: true</code> in the rules file): for each resource with a <code>/thing</code> and
213
- <code>/thing/{id}</code>, a <code>POST</code> creates an entity (assigning an id), the matching <code>GET</code>/<code>PUT</code>/<code>PATCH</code>/<code>DELETE</code> then see it,
214
- and the collection <code>GET</code> lists what exists — so a multi-step E2E flow holds together against the mock. The store is
215
- in memory and resets on restart (or on a control-API reset).</p>
216
- </li>
217
- <li>
218
- <p><strong>Fault and latency injection</strong>: a rule's <code>respond.delayMs</code> adds latency, <code>fault: error</code> forces a 5xx, and
219
- <code>fault: timeout</code> holds the request to test how your automation handles a slow or failing dependency.</p>
220
- </li>
221
- <li>
222
- <p><strong>Runtime control</strong> for scripts, over a token-guarded control API on the same server under <code>/__forgeqe/</code>:
223
- <code>GET /__forgeqe/calls</code> returns the calls the mock received (for assertions), <code>POST /__forgeqe/override</code> pushes a rule
224
- that takes effect immediately (same shape as a rules-file rule), and <code>POST /__forgeqe/reset</code> with
225
- <code>{&quot;what&quot;:&quot;all|state|calls|overrides&quot;}</code> clears it. So a test can set up a specific response, exercise its flow, then
226
- read back what the mock saw — without restarting it.</p>
227
- </li>
322
+ <p><strong>Stateful CRUD</strong> (<code>--state</code>, or <code>state: true</code> in the rules file): for each resource with a <code>/thing</code> and <code>/thing/{id}</code>, a
323
+ <code>POST</code> creates an entity (assigning an id), the matching <code>GET</code>/<code>PUT</code>/<code>PATCH</code>/<code>DELETE</code> then see it, and the collection
324
+ <code>GET</code> lists what exists. So a multi-step end-to-end flow holds together against the mock. The store is in memory and
325
+ resets on restart (or on a control-API reset).</p>
326
+ <p><strong>Fault and latency injection.</strong> A rule's <code>respond.delayMs</code> adds latency, <code>fault: error</code> forces a 5xx, and
327
+ <code>fault: timeout</code> holds the request, to test how your automation handles a slow or failing dependency.</p>
328
+ <p><strong>Runtime control</strong> for scripts, over a token-guarded control API on the same server under <code>/__forgeqe/</code>:</p>
329
+ <ul>
330
+ <li><code>GET /__forgeqe/calls</code> returns the calls the mock received (for assertions);</li>
331
+ <li><code>POST /__forgeqe/override</code> pushes a rule that takes effect immediately (same shape as a rules-file rule);</li>
332
+ <li><code>POST /__forgeqe/reset</code> with <code>{&quot;what&quot;:&quot;all|state|calls|overrides&quot;}</code> clears it.</li>
228
333
  </ul>
334
+ <p>So a test can set up a specific response, exercise its flow, then read back what the mock saw, without restarting it.</p>
229
335
  <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>bash</span><button class="copy-code" type="button">Copy</button></div><pre class="lines"><code><span class="ln"><span class="cmd">forgeqe api mock orders --rules mocks.yaml --state --port 8080
230
336
  </span></span><span class="ln ln--note"><span class="pad"></span><span class="cm"><span class="h">#</span> in the test: override one call, run the flow, then assert on the calls the mock received
231
337
  </span></span><span class="ln"><span class="cmd">curl -s -XPOST localhost:8080/__forgeqe/override -H &quot;authorization: Bearer $T&quot; \
232
338
  </span></span><span class="ln"><span class="cmd"> -d '{&quot;operation&quot;:&quot;GET /orders/{id}&quot;,&quot;respond&quot;:{&quot;status&quot;:503}}'
233
339
  </span></span><span class="ln"><span class="cmd">curl -s localhost:8080/__forgeqe/calls -H &quot;authorization: Bearer $T&quot;
234
340
  </span></span></code></pre></div>
235
- <p><strong>Pact consumer contracts</strong> (v2 and v3) come in through <strong>Add an API</strong> or the Agent tab alongside Postman collections:
236
- a pact's interactions become contracts to verify against the real provider with <code>forgeqe api run</code>, an <code>equality</code>
237
- matching rule becomes a key field, and credentials and off-provider paths are left out (ForgeQE verifies HTTP pacts,
238
- not message pacts).</p>
239
- <p><strong>API-security and robustness checks</strong> (<code>forgeqe api security [SET]</code>, or <code>run_api_security</code>): on an API you own and a
240
- test environment, ForgeQE re-sends each call with malformed query, path and body values (wrong types, empty, oversized,
241
- a traversal string, and marker strings) and with no credentials, then judges the server's <strong>own handling</strong> of that
242
- input — never whether a probe &quot;worked&quot; as an attack. Findings map to the OWASP API Security Top 10: an unhandled <code>5xx</code>
243
- or dropped connection on bad input, an error body that leaks a stack trace or database message, a marker reflected back
244
- as unescaped HTML, a read that still answers with no credentials, an unexpected field accepted and echoed (mass
245
- assignment), and missing transport-security headers. It writes <code>security.md</code>, <code>security.json</code> and <code>junit.xml</code>, and
246
- exits non-zero on a high-severity finding. It refuses an environment named like production, and calls that change data
247
- are probed only with <code>--allow-writes</code>, after you agree (at most 40 probes a call, 2,000 in all).</p>
341
+ <p><strong>Pact consumer contracts</strong> (v2 and v3) come in through <strong>Add an API</strong> or the Agent tab, alongside Postman collections. A
342
+ pact's interactions become contracts to verify against the real provider with <code>forgeqe api run</code>; an <code>equality</code> matching
343
+ rule becomes a key field; credentials and off-provider paths are left out. ForgeQE verifies HTTP pacts, not message
344
+ pacts.</p>
345
+ <p><strong>API-security and robustness checks.</strong> At a terminal (<code>forgeqe api security [SET]</code>), or by asking ForgeQE's agent, on an
346
+ API you own and a test environment. ForgeQE re-sends each call with malformed query, path and body values (wrong types,
347
+ empty, oversized, a traversal string, and marker strings) and with no credentials. Then it judges the server's <strong>own
348
+ handling</strong> of that input, never whether a probe &quot;worked&quot; as an attack.</p>
349
+ <ul>
350
+ <li>Findings map to the OWASP API Security Top 10: an unhandled <code>5xx</code> or dropped connection on bad input, an error body that
351
+ leaks a stack trace or database message, a marker reflected back as unescaped HTML, a read that still answers with no
352
+ credentials, an unexpected field accepted and echoed (mass assignment), and missing transport-security headers.</li>
353
+ <li>It writes <code>security.md</code>, <code>security.json</code> and <code>junit.xml</code>, and exits non-zero on a high-severity finding.</li>
354
+ <li>It refuses an environment named like production. Calls that change data are probed only with <code>--allow-writes</code>, after
355
+ you agree (at most 40 probes a call, 2,000 in all).</li>
356
+ </ul>
248
357
  <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>bash</span><button class="copy-code" type="button">Copy</button></div><pre class="lines"><code><span class="ln ln--pair"><span class="cmd">forgeqe api security --base-url https://qa.shop.example</span><span class="pad"> </span><span class="cm"><span class="h">#</span> exit 1 on a high-severity finding: a CI gate
249
358
  </span></span></code></pre></div>
250
- <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>bash</span><button class="copy-code" type="button">Copy</button></div><pre class="lines"><code><span class="ln"><span class="cmd">forgeqe api contracts --spec https://petstore3.swagger.io/api/v3/openapi.json
251
- </span></span><span class="ln ln--pair"><span class="cmd">forgeqe api contracts --run</span><span class="pad"> </span><span class="cm"><span class="h">#</span> the latest browser run's API calls
252
- </span></span><span class="ln ln--pair"><span class="cmd">forgeqe api run --base-url https://qa.shop.example</span><span class="pad"> </span><span class="cm"><span class="h">#</span> exit 1 when a contract fails: a CI gate
253
- </span></span><span class="ln ln--pair"><span class="cmd">forgeqe api tests --repo ../app</span><span class="pad"> </span><span class="cm"><span class="h">#</span> Quill writes them as tests
254
- </span></span></code></pre></div>
255
- <p><strong>The Agent tab</strong> of the API tests page is a conversation: paste a link (an API description, a Postman collection,
256
- the docs), cURL commands, or tell it about the API in your words, and attach a file (a Postman collection is imported
257
- at once; an API description is kept in <code>.forgeqe/specs/</code> for the agent to read). The agent makes the API and its
258
- calls in folders, as Postman would (<code>api_new_set</code>, <code>api_add_calls</code>, <code>api_import_collection</code>, <code>api_contracts</code>), sends
259
- them, and says what it found; each API it made shows as a card to open on the Workbench tab. It never puts a
260
- credential in a call: you set the API's sign-in on the Workbench.</p>
359
+ <p><strong>The Agent tab</strong> of the API tests page is a conversation. Paste a link (an API description, a Postman collection, the
360
+ docs) or cURL commands, or tell it about the API in your words, and attach a file. A Postman collection is imported at
361
+ once; an API description is kept in <code>.forgeqe/specs/</code> for the agent to read. The agent makes the API and its calls in
362
+ folders, as Postman would, sends them, and says what it found. Each API it made shows as a card to open on the Workbench
363
+ tab. It never puts a credential in a call: you set the API's sign-in on the Workbench.</p>
261
364
  <p><strong>Postman collections</strong> (v2.0 and v2.1) come in from <strong>Add an API</strong> or the Agent tab, and go out with <strong>Export as a
262
- Postman collection</strong>: requests become calls in their folders, a saved example's status what each call must answer;
263
- only requests to the collection's own address are kept, and credentials (headers, secret variables, auth values)
264
- never are. An exported collection has a test of what each call must answer and <code>{{variables}}</code> where credentials go.</p>
265
- <p><strong>On the API tests page's Workbench tab</strong> (<code>forgeqe web</code>), it works like Postman, with an agent beside it. The APIs are on the left,
266
- each with its <strong>calls</strong> (contracts) and <strong>flows</strong> (scenarios). Open a call to see and change its request (method,
267
- path, params, headers, a JSON body), <strong>Send</strong> it and see what came back (body, headers, the checks that passed or
268
- failed), <strong>Save</strong> it, and set <strong>what it must answer</strong> (the status, the statuses that also pass, fields with their
269
- type or value), or take it from a right answer with <strong>Use as what it must answer</strong>. Pick the <strong>environment</strong> from
270
- <code>env.yaml</code> at the top: calls go to its API app's address. Where it has none, the API's own address shows in full before
271
- the path, and you can edit it (http, https, grpc or grpcs, with no user, query or fragment). A call can go to another
272
- app of <code>env.yaml</code> instead: pick <code>{{app.NAME}}</code> before its path, or set one for the whole API under <strong>Calls go to</strong>. Its
273
- address is that app's on the environment picked (else the active one), and a call whose app the environment does not
274
- have is not sent. Rename an API, a call or a flow in place; an API's chevron collapses it. <strong>Run</strong> runs every call and then every flow there
275
- (<code>forgeqe api run-all</code>). A call that changes data asks first: <strong>Send it once</strong>, or <strong>Always on</strong> that environment
276
- (remembered for the API, never for an environment named like production). <strong>Sign in</strong> once per API: a bearer token,
277
- an API key in a header, or a user name and password; the value you type goes to the credential store under a variable
278
- name, and only the name is kept with the API. Credential headers cannot be typed into a call's headers, and answers
279
- come back with credentials masked. Build a <strong>flow</strong> step by step from the API's calls: a step keeps a value from its
280
- answer by a name (<code>id</code> as <code>itemId</code>), and later steps use it as <code>{{itemId}}</code> in their path or body; <code>{{$unique}}</code> is
281
- new on each run. <strong>Ask the agent</strong> writes the tests, says why a call fails, or what is not tested yet, and its work
282
- shows on the page. Adding an API runs its calls that only read at once. Each run keeps the start of every answer (secrets
283
- masked), and each call shows how its last runs went.</p>
365
+ Postman collection</strong>. Requests become calls in their folders, and a saved example's status becomes what each call must
366
+ answer. Only requests to the collection's own address are kept, and credentials (headers, secret variables, auth values)
367
+ never are. An exported collection has a test of what each call must answer, and <code>{{variables}}</code> where credentials go.</p>
368
+ <p><strong>The Workbench tab.</strong> In the web app only. It works like Postman, with an agent beside it.</p>
369
+ <ul>
370
+ <li>The APIs are on the left, each with its <strong>Calls</strong> (contracts) and <strong>Flows</strong> (scenarios). Rename an API, a call or a
371
+ flow in place; an API's chevron collapses it.</li>
372
+ <li>Open a call to see and change its request (method, path, <strong>Params</strong>, <strong>Headers</strong>, a JSON <strong>Body</strong>), <strong>Send</strong> it and
373
+ see what came back (body, headers, the checks that passed or failed), <strong>Save</strong> it, and set <strong>What it must answer</strong>
374
+ (the status, the statuses that also pass, fields with their type or value). Or take it from a right answer with
375
+ <strong>Use as what it must answer</strong>.</li>
376
+ <li>Pick the <strong>environment</strong> from <code>env.yaml</code> at the top: calls go to its API app's address. Where it has none, the API's
377
+ own address shows in full before the path, and you can edit it (http, https, grpc or grpcs, with no user, query or
378
+ fragment).</li>
379
+ <li>A call can go to another app of <code>env.yaml</code> instead: pick <code>{{app.NAME}}</code> before its path, or set one for the whole API
380
+ under <strong>Calls go to</strong>. Its address is that app's on the environment picked (else the active one), and a call whose app
381
+ the environment does not have is not sent.</li>
382
+ <li><strong>Run</strong> runs every call and then every flow there (<code>forgeqe api run-all</code>).</li>
383
+ <li>A call that changes data asks first: <strong>Send it once</strong>, or <strong>Always on</strong> that environment (remembered for the API,
384
+ never for an environment named like production).</li>
385
+ <li><strong>Sign in</strong> once per API: a <strong>Bearer token</strong>, an <strong>API key</strong> in a header, or a <strong>User and password</strong>. The value you
386
+ type goes to the credential store under a variable name, and only the name is kept with the API. Credential headers
387
+ cannot be typed into a call's headers, and answers come back with credentials masked.</li>
388
+ <li>Build a <strong>flow</strong> step by step from the API's calls: a step keeps a value from its answer by a name (<code>id</code> as <code>itemId</code>),
389
+ and later steps use it as <code>{{itemId}}</code> in their path or body. <code>{{$unique}}</code> is new on each run.</li>
390
+ <li><strong>Ask the agent</strong> writes the tests, says why a call fails, or what is not tested yet, and its work shows on the page.</li>
391
+ <li>Adding an API runs its calls that only read at once. Each run keeps the start of every answer (secrets masked), and
392
+ each call shows how its last runs went.</li>
393
+ </ul>
284
394
  </div>
285
395
  </section>
286
396
  <section class="doc" id="doc-how_to_use-end-to-end-api-scenarios">
287
397
  <h4>End-to-end API scenarios</h4>
288
- <div class="prose"><p>A scenario is API calls in order, where later calls use values earlier answers gave: create a cart, add an item to <code>{{cartId}}</code>, place the order, read <code>{{orderId}}</code>. Each step has its own checks (status, schema, key fields). <code>{{$unique}}</code> is new on every run, for emails, usernames, and references that must not clash; <code>{{$uuid}}</code>, <code>{{$now}}</code>, and <code>{{$randomInt}}</code> are there too. Scenarios are saved in the contract set's <code>contracts.json</code> (edit them freely) and listed in <code>api.md</code>. There are four ways to make them (<code>api_scenarios</code>):</p>
398
+ <div class="prose"><p>A scenario is API calls in order, where later calls use values earlier answers gave: create a cart, add an item to
399
+ <code>{{cartId}}</code>, place the order, read <code>{{orderId}}</code>. Each step has its own checks (status, schema, key fields).
400
+ <code>{{$unique}}</code> is new on every run, for emails, usernames and references that must not clash; <code>{{$uuid}}</code>, <code>{{$now}}</code> and
401
+ <code>{{$randomInt}}</code> are there too. Scenarios are saved in the contract set's <code>contracts.json</code> (edit them freely) and listed
402
+ in <code>api.md</code>. On the API tests page they are the API's <strong>Flows</strong>.</p>
403
+ <p>There are four ways to make them:</p>
289
404
  <div class="tbl tbl--cols-3"><table>
290
405
  <thead>
291
406
  <tr><th>From</th><th>How</th><th>Model</th></tr>
@@ -297,16 +412,20 @@ masked), and each call shows how its last runs went.</p>
297
412
  <tr><td data-label="From"><strong>Plain English</strong> (<code>--text &quot;...&quot;</code>) or a story</td><td data-label="How">&quot;Create a user, log in, add two items, check out, verify the order total.&quot; Planned the same way.</td><td data-label="Model">yes</td></tr>
298
413
  </tbody>
299
414
  </table></div>
300
- <p>The planner only uses operations the set has: a step no operation does is listed as unmatched, never invented. Give it the API's operations with <code>--spec</code> (an OpenAPI or Swagger link or file) or a saved set; without a description, make contracts from a browser run first. Every plan is checked before it is saved (each operation exists, each variable is saved before it is used) and shown step by step; nothing runs until you run it.</p>
301
- <p><code>run_api_scenarios</code> (or <code>forgeqe api run-scenarios</code>) runs them against the API, without a browser or a model: each step in order, the values passed on, every step's checks. A failed step stops its scenario, and the scenario's <strong>cleanup</strong> steps (deleting what it created) run, those whose values exist. Scenarios that change data run only after you agree (in CI: <code>--allow-writes</code>), on a test environment. Results go to <code>scenario-results.json</code> and <code>scenarios-junit.xml</code>, with <code>report.html</code> (each scenario a case, its calls the steps) and <code>suite.json</code> beside them. API runs count in the <a href="../area-release/index.html#doc-how_to_use-team-report">team report</a>.</p>
302
- <p><strong>On your existing API automation.</strong> <code>write_api_tests</code> with <code>scenarios</code> (or <code>forgeqe api tests --scenarios</code>) has Quill write each scenario as an end-to-end test in the repository, built on what is already there:</p>
415
+ <p>The planner only uses operations the set has: a step no operation does is listed as unmatched, never invented. Give it
416
+ the API's operations with <code>--spec</code> (an OpenAPI or Swagger link or file) or a saved set; without a description, make
417
+ contracts from a browser run first. Every plan is checked before it is saved (each operation exists, each variable is
418
+ saved before it is used) and shown step by step; nothing runs until you run it.</p>
419
+ <p><strong>Making and running scenarios.</strong></p>
420
+ <div class="views" data-views><div class="view-tabs" role="tablist" aria-label="Show the steps for" hidden><button type="button" role="tab" class="view-tab" data-view="web" aria-selected="true">Web app</button><button type="button" role="tab" class="view-tab" data-view="terminal" aria-selected="false">Terminal</button></div><div class="view-panel" role="tabpanel" data-view="web"><p class="view-label"><strong>Web app</strong></p>
303
421
  <ol>
304
- <li>It maps the repository's API layer first: clients, request helpers, auth and base URL fixtures, data builders, schemas.</li>
305
- <li>Each step calls the helper that already calls that operation; only operations without one get a new helper, in the same style.</li>
306
- <li>It reuses helpers, never tests: a scenario never runs another test as a step, and sets up its own data.</li>
307
- <li>A shared helper is only added to, never changed in a way its tests rely on. When Quill changes one, ForgeQE also runs the tests that use it, and sends any failure back until both pass.</li>
308
- <li>A scenario test for a test case is named after it and recorded in <code>.forgeqe/test-cases.json</code>, and set as the Azure DevOps test case's Associated Automation when write-back is on.</li>
422
+ <li>Open <strong>API tests</strong> › <strong>Workbench</strong> and pick the API.</li>
423
+ <li>Under <strong>Make flows</strong>, press <strong>Build</strong> to make them from the description, or type a flow in your words and press
424
+ <strong>Generate</strong> (the agent plans it). Or press <strong>New flow</strong> and build one from the API's calls. On <strong>Agent</strong>, <strong>Plan
425
+ end-to-end flows</strong> asks for them in a sentence.</li>
426
+ <li>Press <strong>Run</strong>.</li>
309
427
  </ol>
428
+ </div><div class="view-panel" role="tabpanel" data-view="terminal"><p class="view-label"><strong>Terminal</strong></p>
310
429
  <div class="code"><div class="code-bar"><i></i><i></i><i></i><span>bash</span><button class="copy-code" type="button">Copy</button></div><pre class="lines"><code><span class="ln ln--pair"><span class="cmd">forgeqe api scenarios --run</span><span class="pad"> </span><span class="cm"><span class="h">#</span> the latest browser run's flow, chained
311
430
  </span></span><span class="ln ln--pair"><span class="cmd">forgeqe api scenarios --spec https://shop.test/openapi.json</span><span class="pad"> </span><span class="cm"><span class="h">#</span> lifecycles, browsing, links, negative cases
312
431
  </span></span><span class="ln"><span class="cmd">forgeqe api scenarios --cases ado:2238,ado:2239 --spec openapi.yaml
@@ -314,10 +433,32 @@ masked), and each call shows how its last runs went.</p>
314
433
  </span></span><span class="ln ln--pair"><span class="cmd">forgeqe api run-scenarios --allow-writes --base-url https://qa.shop.test</span><span class="pad"> </span><span class="cm"><span class="h">#</span> exit 1 when one fails
315
434
  </span></span><span class="ln ln--pair"><span class="cmd">forgeqe api tests --scenarios --repo ../api-tests</span><span class="pad"> </span><span class="cm"><span class="h">#</span> on the repo's existing helpers
316
435
  </span></span></code></pre></div>
436
+ </div></div><p><strong>Running them.</strong> They run against the API, without a browser or a model: each step in order, the values passed on,
437
+ every step's checks.</p>
438
+ <ul>
439
+ <li>A failed step stops its scenario, and the scenario's <strong>cleanup</strong> steps (deleting what it created) run, those whose
440
+ values exist.</li>
441
+ <li>Scenarios that change data run only after you agree (in CI: <code>--allow-writes</code>), on a test environment.</li>
442
+ <li>Results go to <code>scenario-results.json</code> and <code>scenarios-junit.xml</code>, with <code>report.html</code> (each scenario a case, its calls the
443
+ steps) and <code>suite.json</code> beside them. API runs count in the <a href="../area-release/index.html#doc-how_to_use-team-report">team report</a>.</li>
444
+ </ul>
445
+ <p><strong>On your existing API automation.</strong> <code>forgeqe api tests --scenarios</code> (on the page, <strong>Write a test for this flow</strong> in the agent
446
+ box beside a flow) has Quill write each scenario as an end-to-end test in the repository, built on what is already
447
+ there:</p>
448
+ <ol>
449
+ <li>It maps the repository's API layer first: clients, request helpers, auth and base URL fixtures, data builders,
450
+ schemas.</li>
451
+ <li>Each step calls the helper that already calls that operation; only operations without one get a new helper, in the
452
+ same style.</li>
453
+ <li>It reuses helpers, never tests: a scenario never runs another test as a step, and sets up its own data.</li>
454
+ <li>A shared helper is only added to, never changed in a way its tests rely on. When Quill changes one, ForgeQE also runs
455
+ the tests that use it, and sends any failure back until both pass.</li>
456
+ <li>A scenario test for a test case is named after it and recorded in <code>.forgeqe/test-cases.json</code>, and set as the Azure
457
+ DevOps test case's Associated Automation when write-back is on.</li>
458
+ </ol>
317
459
  </div>
318
460
  </section>
319
461
  </div>
320
- </article>
321
462
  <article class="spec feat" id="cap-api-load-security">
322
463
  <div class="hd"><span class="mono">API</span><h3>API load and security checks</h3></div>
323
464
  <p class="ds">Load and latency testing of a contract set's read-only calls (virtual users, percentiles, throughput and error rate against limits), and robustness and API-security checks (OWASP API Top 10): malformed input, calls without credentials, leaked errors, mass assignment and missing security headers.</p>
@@ -327,17 +468,17 @@ masked), and each call shows how its last runs went.</p>
327
468
  <div class="fact"><span class="mono">Limits</span><ul class="plainlist"><li>Load and security checks run against a test environment, never production; calls that change data are never load tested, and probed only when allowed.</li></ul></div>
328
469
  <div class="fact"><span class="mono">Tools</span><p class="tools"><code>run_api_load</code> <code>run_api_security</code></p></div>
329
470
  </div>
330
- <div class="detail"><span class="mono">In detail</span>
331
- <p class="see">See <a href="#doc-how_to_use-api-and-contract-tests">API and contract tests</a>.</p>
332
- </div>
471
+
333
472
  </article>
473
+ <div class="feat-detail"><p class="see">See <a href="#doc-how_to_use-api-and-contract-tests">API and contract tests</a>.</p>
474
+ </div>
334
475
 
335
476
  <nav class="pager" aria-label="Previous and next">
336
477
  <a class="prev" href="../feature-test-prompts/index.html"><small>Previous</small><span>Feature test prompts</span></a>
337
478
  <a class="next" href="../area-quality/index.html"><small>Next</small><span>Quality checks</span></a>
338
479
  </nav>
339
480
  </main>
340
- <aside class="docs-toc" aria-label="On this page"><p class="side-head">On this page</p><ul><li><a href="#cap-api-testing">API and contract testing</a></li><li><a href="#doc-how_to_use-api-and-contract-tests">API and contract tests</a></li><li><a href="#doc-how_to_use-end-to-end-api-scenarios">End-to-end API scenarios</a></li><li><a href="#cap-api-load-security">API load and security checks</a></li></ul></aside>
481
+ <aside class="docs-toc" aria-label="On this page"><p class="side-head">On this page</p><ul><li><a href="#cap-api-testing">API and contract testing</a></li><li><a href="#doc-how_to_use-end-to-end-api-scenarios">End-to-end API scenarios</a></li><li><a href="#cap-api-load-security">API load and security checks</a></li></ul></aside>
341
482
  </div>
342
483
  <footer class="foot">
343
484
  <div class="container foot__row">