@capagents/forgeqe 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HOW_TO_USE.md +91 -2
- package/dist/docs-site/docs/index.html +118 -10
- package/dist/docs-site/docs/mobile/index.html +29 -7
- package/dist/docs-site/docs/search.js +1 -1
- package/dist/docs-site/docs/web-app/index.html +8 -4
- package/dist/forgeqe.js +1096 -1067
- package/dist/web/assets/{Agent-Q7njo1Nn.js → Agent-u7Ey8Slc.js} +1 -1
- package/dist/web/assets/ApiTests-D_PZKUXw.js +10 -0
- package/dist/web/assets/Chat-BCwImb3U.js +3 -0
- package/dist/web/assets/{Data-CYWRWMA2.js → Data-x_yeOrL3.js} +4 -4
- package/dist/web/assets/{Features-CuixPXUj.js → Features-BQr8SMEU.js} +1 -1
- package/dist/web/assets/Jobs-KYn7S4yx.js +3 -0
- package/dist/web/assets/Quality-BY4sCSwU.js +1 -0
- package/dist/web/assets/Record-yZT93LmM.js +2 -0
- package/dist/web/assets/Regression-BMzfuhsG.js +5 -0
- package/dist/web/assets/Reports-D_L3pa9R.js +2 -0
- package/dist/web/assets/Response-DeCMeFqw.js +4 -0
- package/dist/web/assets/Runs-ShLZeGq3.js +2 -0
- package/dist/web/assets/Shell-B8HJCZ4f.js +3 -0
- package/dist/web/assets/arrow-down-B8XP1MaD.js +1 -0
- package/dist/web/assets/capgemini-white-ByjwPW8N.svg +21 -0
- package/dist/web/assets/{circle-dashed-CO-RmzsR.js → circle-dashed-ByDXyh2H.js} +1 -1
- package/dist/web/assets/index-Ct2Md_DL.js +26 -0
- package/dist/web/assets/index-DtP9ditr.css +2 -0
- package/dist/web/assets/{markdown-9nLYjAqd.js → markdown-BQVf95TM.js} +7 -7
- package/dist/web/assets/{sticky-note-BffcGVvl.js → sticky-note-Cx1bYZ3E.js} +1 -1
- package/dist/web/assets/thread-CIhAcfY-.js +5 -0
- package/dist/web/assets/{trending-up-BbHX2F6j.js → trending-up-Dg2FfbKu.js} +1 -1
- package/dist/web/assets/usePageChat-PSLtKusy.js +1 -0
- package/dist/web/index.html +3 -3
- package/docs/MOBILE.md +29 -7
- package/docs/WEB_APP.md +9 -4
- package/docs/user-guide.html +118 -10
- package/forgeqe.example.yaml +7 -0
- package/package.json +1 -1
- package/py/forgeqe_engine/cli.py +16 -0
- package/py/forgeqe_engine/recordsession.py +180 -7
- package/py/forgeqe_engine/suggest.py +79 -0
- package/py/forgeqe_engine/webrecord.py +19 -0
- package/py/forgeqe_engine/webrecord_page.py +11 -3
- package/py/forgeqe_mobile/cli.py +9 -2
- package/py/forgeqe_mobile/hyperexecute.py +133 -19
- package/py/forgeqe_mobile/maestro.py +45 -3
- package/py/forgeqe_mobile/service.py +51 -14
- package/dist/web/assets/ApiTests-C0ZAAuTl.js +0 -2
- package/dist/web/assets/Chat-QFcqaBtK.js +0 -3
- package/dist/web/assets/Jobs-B88qIb_r.js +0 -3
- package/dist/web/assets/Quality-BIUiBg1X.js +0 -1
- package/dist/web/assets/Record-DnT3bDoJ.js +0 -1
- package/dist/web/assets/Regression-BH1i_yvJ.js +0 -2
- package/dist/web/assets/Reports-DnidGC7G.js +0 -2
- package/dist/web/assets/Response-o9QqBpwk.js +0 -8
- package/dist/web/assets/Runs-hOT-2g1a.js +0 -2
- package/dist/web/assets/frame-C0RAa-Ev.js +0 -3
- package/dist/web/assets/index-BdhUnF_q.css +0 -2
- package/dist/web/assets/index-DBQd0Qgk.js +0 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ar as e}from"./
|
|
1
|
+
import{ar as e}from"./Shell-B8HJCZ4f.js";var t={name:`sticky-note`,size:24,node:[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{ht as e}from"./Shell-B8HJCZ4f.js";var t=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},n=e=>typeof e==`string`?e:e==null?``:String(e),r=(e,t=400)=>e.length>t?`${e.slice(0,t-1)}…`:e,i=e=>typeof e==`number`?` in ${Math.round(e/1e3)}s`:``;function a(e,t=400){return r(e.replace(/\s+/g,` `).trim(),t).replace(/([\\`*_[\]<>#|~!])/g,`\\$1`)}function o(e){let t=e.replace(/\s+/g,` `).trim();if(!t)return``;let n=t.includes("`")?"``":"`";return`${n}${n==="``"?` `:``}${t}${n==="``"?` `:``}${n}`}function s(e,t){return/^https?:\/\/[^\s)]+$/i.test(t)?`[${a(e||t,120)}](${t})`:a(e)}var c=e=>[o(n(t(e).id)),a(n(t(e).title),200)].filter(Boolean).join(` `);function l(e){return e.replace(/<!--[\s\S]*?(?:-->|$)/g,``).trim()}function u(e){return e.replace(/\[((?:\\.|[^\]\\])*)\]\(https?:\/\/[^\s)]+\)/g,`$1`).replace(/\\(.)/g,`$1`).replace(/[*`]/g,``)}var d=(e,t)=>({tone:e,kind:`item`,md:t}),f=(e,t)=>({tone:e,kind:`sub`,md:t});function p(e,r=``){let i=r||(e.agent&&e.agent!==`forgeqe`?`**${a(n(e.agent))}:** `:``);switch(e.kind){case`info`:return d(`info`,`${i}${a(n(e.text))}`);case`start`:return d(`dim`,`${i}→ ${o(n(e.tool))}${e.text&&e.text!==e.tool?` ${a(n(e.text),200)}`:``}`);case`tool`:{let r=t(e.file);return d(e.ok===!1?`warn`:`dim`,`${i}${e.ok===!1?`⚠`:`✓`} ${a(n(e.text)||n(e.tool),240)}${r.path?` (${a(n(r.action))} ${o(n(r.path))})`:``}`)}case`say`:{let t=l(n(e.text));return t?d(`say`,`${i}*${a(t)}*`):null}case`test`:return Number(e.attempt)>0?d(e.ok?`ok`:`fail`,`${i}${e.ok?`✓`:`✗`} **Test, attempt ${a(n(e.attempt))}:** ${a(n(e.text),240)}`):d(e.ok?`ok`:`fail`,`${i}${e.ok?`✓`:`✗`} ${a(n(e.text),240)}`);case`plan`:{let r=Array.isArray(e.items)?e.items.map(t):[],o=r.find(e=>e.status===`in_progress`);return d(`info`,`${i}**Plan:** ${r.filter(e=>e.status===`completed`).length} of ${r.length} done${o?`; now: ${a(n(o.text))}`:``}`)}case`review`:return d(e.approved?`ok`:`warn`,`${i}**Review, attempt ${a(n(e.attempt))}:** ${e.approved?`approved`:`changes asked`}. ${a(n(e.summary),240)}`);case`attempt`:return d(`warn`,`${i}**Attempt ${a(n(e.attempt))} of ${a(n(e.max))}:** ${a(n(e.why),240)}`);case`answer`:return d(`dim`,`${i}Attempt ${a(n(e.attempt))}: ${a(n(e.notes)||`changed ${(Array.isArray(e.changed)?e.changed:[]).map(n).join(`, `)}`,240)}`);case`context`:return e.compacted?d(`info`,`${i}Context compacted: the conversation was summarised to make room.`):null;default:return null}}function m(e,r=``){switch(e.type){case`log`:return d(e.level===`error`?`fail`:e.level===`warn`?`warn`:`dim`,`${r}${e.level===`warn`||e.level===`error`?`⚠ `:``}${a(n(e.text))}`);case`step`:return d(`dim`,`${r}**Step ${a(n(e.step))}** · ${e.source===`memory`?`from memory`:a(n(e.category))} · ${s(n(e.title)||`untitled`,n(e.url))}`);case`memory`:return d(`info`,`${r}↻ ${a(n(e.text))}`);case`thought`:return f(`think`,`*${a(n(e.text))}*`);case`outcome`:return f(e.ok?`ok`:`fail`,`${e.ok?`✓`:`✗`} ${a(n(e.text),300)}`);case`done`:{let i=t(e.result);return d(i.status===`complete`?`ok`:`fail`,`${r}**${a(n(i.status))}:** ${a(n(i.summary))}`)}case`code`:return p(e,r);default:return null}}function h(e){switch(e.type){case`run-start`:return{tone:`info`,kind:`head`,md:`Browser run: ${a(n(e.goal),200)}${e.url?` · ${s(n(e.url).replace(/^https?:\/\//,``),n(e.url))}`:``}`};case`run-event`:return m(t(e.event));case`run-done`:{let r=t(e.result),s=!e.error&&(r.outcome===`passed`||!r.outcome&&r.status===`complete`);return d(s?`ok`:`fail`,`${s?`✓`:`✗`} **Run ${s?`passed`:`failed`}**${i(e.ms)}: ${a(n(e.error)||n(r.summary))}${e.runDir?` · ${o(n(e.runDir))}`:``}`)}case`suite-start`:return{tone:`info`,kind:`head`,md:`Suite: ${(Array.isArray(e.cases)?e.cases:[]).length} cases, ${a(n(e.parallel))} at once`};case`suite-event`:{let r=t(e.event);if(r.type===`case-start`)return d(`info`,`**Case ${Number(r.index)+1} of ${a(n(r.total))}:** ${c(r.case)}`);if(r.type===`case-event`)return m(t(r.event),`${o(n(t(r.case).id))} `);if(r.type===`case-done`){let e=t(r.result);return d(e.status===`passed`?`ok`:`fail`,`${e.status===`passed`?`✓`:`✗`} ${c(e.case)}: **${a(n(e.status))}**${i(e.ms)}${e.summary?`. ${a(n(e.summary),240)}`:``}`)}return r.type===`code-start`?d(`info`,`${o(n(t(r.case).id))} writing its test`):r.type===`writeback`?d(`dim`,`Posted the result back: ${a(JSON.stringify(r.item),240)}`):null}case`suite-done`:{let n=(Array.isArray(t(e.suite).results)?t(e.suite).results:[]).map(t),r=n.filter(e=>e.status===`passed`).length;return d(r===n.length?`ok`:`fail`,`**Suite: ${r} of ${n.length} passed**${i(t(e.suite).ms)}`)}case`info`:return d(e.ok===!1?`fail`:e.ok===!0?`ok`:`info`,a(n(e.text)));case`agent`:return p(t(t(e.event)),`**Coding agent:** `);case`code-start`:return{tone:`info`,kind:`head`,md:`Writing a test: ${a(n(e.goal),200)}`};case`code-done`:return d(e.error?`fail`:`ok`,`${e.error?`✗`:`✓`} **Test ${e.error?`not written`:`written`}**${i(e.ms)}${e.error?`: ${a(n(e.error),240)}`:``}`);case`card`:{let r=t(e.card),i=(Array.isArray(r.body)?r.body:[]).map(n).filter(Boolean);return d(r.status===`ok`?`ok`:r.status===`fail`?`fail`:`info`,`**${a(n(r.title))}**${r.stats?` · ${a(n(r.stats))}`:``}${i.length?`: ${a(i.join(`; `),300)}`:``}`)}case`report`:return d(`ok`,`✓ Report saved: ${a(n(e.title))}`);case`call-start`:return d(`dim`,`→ ${a(n(e.text),240)}`);case`call`:return d(e.ok===!1?`warn`:`dim`,`${e.ok===!1?`⚠`:`✓`} ${a(n(e.text),240)}`);default:return null}}function g(e){let r=n(e.at)||n(e.t),i=null;switch(e.type){case`user`:i=d(`you`,`**You:** ${a(n(e.text),240)}`);break;case`agent`:i=p(t(e.event));break;case`tool`:i=h(t(e.event));break;case`ask`:i=d(`you`,`**Asked:** ${a(n(t(e.question).title))}`);break;case`wait`:i=d(`you`,`**Waiting for you:** ${a(n(e.prompt))}`);break;case`answered`:i=d(`you`,`**You:** ${e.label===void 0?e.ok?`done, continue`:`cancel`:a(n(e.label))}`);break;case`turn_done`:i=d(e.outcome===`done`?`ok`:e.outcome===`stopped`?`warn`:`fail`,`**${e.outcome===`done`?`Done`:e.outcome===`stopped`?`Stopped`:e.outcome===`needs_input`?`Needs your input`:`Failed`}**${e.error?`: ${a(n(e.error),300)}`:``}`);break;case`settings`:i=d(`you`,`**Settings:** browser ${e.headed?`shown`:`headless`}, ${e.writeTests?`passed runs become tests`:`no tests written`}`);break;case`stderr`:i={tone:`dim`,kind:`out`,md:n(e.text)};break;case`error`:i=d(`warn`,`⚠ ${a(n(e.message))}`);break;case`fatal`:i=d(`fail`,`✗ **ForgeQE cannot go on:** ${a(n(e.message))}`);break;case`exit`:i=d(e.code===0?`dim`:`fail`,`ForgeQE stopped${e.code!==null&&e.code!==void 0?` (exit ${a(n(e.code))})`:``}${e.message?`: ${a(n(e.message))}`:``}`)}return i?{at:r,...i,plain:i.kind===`out`?i.md:u(i.md)}:null}function _(e,t){let n=e?Math.max(0,Math.round((Date.parse(t)-Date.parse(e))/1e3)):0;return Number.isFinite(n)?`+${Math.floor(n/60)}:${String(n%60).padStart(2,`0`)}`:``}function v(e,t,n){let r=n?[`## ${a(n,200)}`,``]:[],i=[],o=()=>{if(!i.length)return;let e=Math.max(2,...i.map(e=>Math.max(0,...(e.match(/`+/g)||[]).map(e=>e.length)))),t="`".repeat(e+1);r.push(``,`${t}text`,...i,t,``),i=[]};for(let n of e){let e=`\`${_(t,n.at)}\``;n.kind===`out`?i.push(`${_(t,n.at)} ${n.md}`):(o(),n.kind===`head`?r.push(``,`#### ${n.md} ${e}`,``):n.kind===`sub`?r.push(` - ${n.md}`):r.push(`- ${e} ${n.md}`))}return o(),r.join(`
|
|
2
|
+
`).replace(/\n{3,}/g,`
|
|
3
|
+
|
|
4
|
+
`).trim()+`
|
|
5
|
+
`}var y=e=>{let t=b(e);return typeof t.input==`number`&&typeof t.output==`number`?{input:t.input,output:t.output,cached:typeof t.cached==`number`?t.cached:void 0}:void 0},b=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},x=e=>typeof e==`string`?e:e==null?``:String(e),S=[[/find_test_cases|story_test_cases|check_test_cases|list_sprints/,`Finding test cases`,`searching`],[/environment|logins/,`Preparing the environment`,`handing`],[/run_test_cases|browser_run|suite|run_goal|run_direct/,`Running in the browser`,`browsing`],[/comment_on_pr/,`Commenting on the pull request`,`working`],[/write_back|post_result|post_results|file_bugs|create_bugs/,`Posting the result`,`working`],[/write_test|heal/,`Writing the test`,`writing`],[/run_tests|bash|shell/,`Running the tests`,`working`],[/read_confluence|read|grep|glob|list|webfetch/,`Reading`,`reading`],[/edit|write|patch/,`Changing the code`,`writing`],[/task/,`Handing work to another agent`,`handing`]],C=/run_test_cases|browser_run|run_suite|write_test/,w=[[/find_test_cases|story_test_cases|check_test_cases/,`forgeqe-find`],[/run_test_cases|browser_run|run_goal|run_direct|suite|explore_run/,`engine`],[/write_test/,`forgeqe-test`],[/heal/,`forgeqe-heal`],[/review_pr|pr_review/,`forgeqe-pr-review`],[/api_plan/,`forgeqe-api-plan`],[/write_api|api_test/,`forgeqe-api`],[/explore_plan|plan_charters/,`forgeqe-explore-plan`],[/defect_rca|root_cause/,`forgeqe-defect-rca`],[/insights|forgeqe_bi|defect_intelligence/,`forgeqe-bi`],[/refine/,`forgeqe-refine`]];function T(e){let t=e.toLowerCase();if(!O(t))return w.find(([e])=>e.test(t))?.[1]}var E=[[/^(azure_devops|ado|azuredevops)_/,`Azure DevOps`],[/^(jira|atlassian)_/,`Jira`],[/^confluence_/,`Confluence`],[/^github_/,`GitHub`],[/^xray_/,`Xray`],[/^testrail_/,`TestRail`],[/^zephyr_/,`Zephyr Scale`],[/^qtest_/,`qTest`]],D=/(^|_)(create|update|add|delete|remove|post|comment|link|unlink|upload|set|assign|transition|edit|merge|close|reopen|queue|trigger|run|push|move|copy|import|write|publish|approve|vote|lock|unlock)(_|$)/;function O(e){let t=e.toLowerCase();if(!t.startsWith(`forgeqe_`))return E.find(([e])=>e.test(t))?.[1]}var k=e=>{let t=b(e);return typeof t.diff==`string`&&t.diff?{diff:t.diff,added:Number(t.added)||0,removed:Number(t.removed)||0}:void 0},A=e=>Array.isArray(e)?e.map(x).filter(Boolean):[];function j(e,t,n){let r=x(e.status)||(t?`failed`:``);return{status:r,ok:!t&&/^(passed|pass|written|ok|known_defect)$/i.test(r),...x(e.testFile)?{testFile:x(e.testFile)}:{},...x(e.testName)?{testName:x(e.testName)}:{},...x(e.command)?{command:x(e.command)}:{},...typeof e.attempts==`number`?{attempts:e.attempts}:{},...typeof e.maxAttempts==`number`?{maxAttempts:e.maxAttempts}:{},changed:A(e.changed),reused:A(e.reused),...n?{runDir:n}:{},...t?{error:t}:{},...x(e.notes)?{notes:x(e.notes)}:{}}}function M(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){let e=b(n),r=(typeof n==`string`?n:x(e.label)||x(e.request)).replace(/\s+/g,` `).trim(),i=(typeof n==`string`?n:x(e.request)||x(e.label)).trim();r&&i&&!t.some(e=>e.label.toLowerCase()===r.toLowerCase())&&t.push({label:r.length>60?`${r.slice(0,59)}…`:r,request:i})}return t.slice(0,4)}function N(e){let t=e.toLowerCase(),n=O(t);if(n)return D.test(t.replace(/^[a-z]+_/,``))?{label:`Updating ${n}`,orb:`working`}:{label:`Reading ${n}`,orb:`reading`};for(let[e,n,r]of S)if(e.test(t))return{label:n,orb:r};let r=t.replace(/^forgeqe_/,``).replace(/[_-]+/g,` `).trim();return{label:r?r[0].toUpperCase()+r.slice(1):`Working`,orb:`working`}}function P(e,t){return{id:e,user:t,steps:[],parts:[],next:[],asks:[],waits:[],log:[],plan:[],changes:[],tests:[],reports:[]}}function F(e){let t=b(e);return[x(t.id),x(t.title)].filter(Boolean).join(`: `)}function I(t){let n={turns:[],notes:[]},r=new Map,i=e=>(typeof e==`string`?r.get(e):void 0)??n.turns.at(-1),a=(e,t)=>{let n=e=>{for(let r of e){if(r.key===t)return r;let e=r.children&&n(r.children);if(e)return e}};return n(e.steps)},o=(e,t,n)=>{let r={lines:[],...t};if(n)n.push(r);else{let t=e.plan.find(e=>e.status===`active`)??e.plan.find(e=>e.status===`pending`)??e.plan.at(-1);t&&(r.phase=t.text),e.steps.push(r)}return r},s=(t,n,r)=>{let i=n.parent?a(t,`c:${x(n.parent)}`):void 0;if(i)return i.children??=[];let s=x(n.agent);if(!r||!s||s===`forgeqe`)return;let c=[...t.steps].reverse().find(e=>e.status===`running`);return c||=o(t,{key:`ag:${s}:${t.steps.length}`,label:e(s).name,status:`running`,orb:`handing`,agent:s}),c.agent??=s,c.children??=[]},c=(t,r,i)=>{let c=x(r.kind),l=x(r.id);if((c===`start`||c===`tool`)&&C.test(x(r.tool))&&!O(x(r.tool)))return;let u=s(t,r,i),d=b(r.delegate),f=x(d.agent)?{agent:x(d.agent),task:x(d.task)}:void 0;if(c===`start`){if(f)o(t,{key:`c:${l}`,label:`Hands off to the ${e(f.agent).name}`,arg:f.task||void 0,status:`running`,orb:`handing`,agent:f.agent,handoff:f,children:[]},u);else{let{label:e,orb:n}=N(x(r.tool)||x(r.text)),i=u?void 0:T(x(r.tool));o(t,{key:`c:${l}`,label:e,arg:x(r.text)&&x(r.text)!==x(r.tool)?x(r.text):void 0,status:`running`,orb:n,...i?{agent:i}:{}},u)}}else if(c===`tool`){let n=l?a(t,`c:${l}`):void 0,i=b(r.file),s=k(r.change);if(s&&x(i.path)){let e=t.changes.find(e=>e.path===x(i.path));e?Object.assign(e,{diff:`${e.diff}\n${s.diff}`,added:e.added+s.added,removed:e.removed+s.removed}):t.changes.push({path:x(i.path),...s,...x(r.agent)?{agent:x(r.agent)}:{}})}if(n)n.status=r.ok===!1?`fail`:`ok`,n.handoff&&x(d.result)&&(n.handoff.result=x(d.result));else if(f)o(t,{key:`c:${l||t.steps.length}`,label:`Hands off to the ${e(f.agent).name}`,arg:f.task||void 0,status:r.ok===!1?`fail`:`ok`,orb:`handing`,agent:f.agent,handoff:{...f,...x(d.result)?{result:x(d.result)}:{}},children:[]},u);else{let{label:e,orb:n}=N(x(r.tool)||x(r.text)),a=u?void 0:T(x(r.tool));o(t,{key:`c:${l||t.steps.length}`,label:e,arg:x(i.path)||x(r.text)||void 0,status:r.ok===!1?`fail`:`ok`,orb:n,...a?{agent:a}:{},...s?{change:s}:{}},u)}n&&s&&(n.change=s)}else if(c===`stream`||c===`say`){if(i)return;let e=t.parts.find(e=>e.id===l);e?e.text=c===`say`?x(r.text):e.text+x(r.text):t.parts.push({id:l||`p${t.parts.length}`,text:x(r.text)})}else if(c===`plan`){if(u||r.agent&&r.agent!==`forgeqe`)return;let e=Array.isArray(r.items)?r.items.map(b):[],n=e=>e===`completed`?`done`:e===`in_progress`?`active`:e===`cancelled`?`skipped`:`pending`;t.plan=e.map(e=>({text:x(e.text),status:n(e.status)})).filter(e=>e.text)}else if(c===`test`){let e=Number(r.attempt)||0;if(e>0)o(t,{key:`t:${t.steps.length}`,label:`Test, attempt ${e}`,arg:x(r.text),status:r.ok?`ok`:`fail`,orb:`retrying`},u);else if(r.ok&&/\bconnected$/i.test(x(r.text)))return;else o(t,{key:`t:${t.steps.length}`,label:x(r.text)||(r.ok?`Checked`:`Check failed`),status:r.ok?`ok`:`fail`,orb:/connect|mcp/i.test(x(r.text))?`waiting`:`working`},u)}else if(c===`review`)o(t,{key:`r:${t.steps.length}`,label:r.approved?`Review approved`:`Review asked for changes`,status:r.approved?`ok`:`info`,orb:`thinking`,agent:`forgeqe-review`,lines:[{text:x(r.summary)}]});else if((c===`context`||c===`usage`)&&!i)c===`context`&&typeof r.tokens==`number`&&typeof r.limit==`number`&&(n.context={tokens:r.tokens,limit:r.limit,compactsAt:typeof r.compactsAt==`number`?r.compactsAt:void 0}),c===`usage`&&(n.usage=y(r.usage)??n.usage);else if(c===`info`){let e=(u??t.steps).at(-1);e&&e.lines.push({text:x(r.text)})}},l,u=(e,t)=>{let n=x(t.type);if(n===`run-start`)o(e,{key:`run:${e.steps.length}`,label:`Running in the browser`,arg:x(t.goal),status:`running`,orb:`browsing`,agent:`engine`});else if(n===`run-event`){let n=[...e.steps].reverse().find(e=>e.key.startsWith(`run:`)),r=b(t.event);if(!n)return;r.type===`outcome`?n.lines.push({text:`Step ${x(r.step)}: ${x(r.action)||x(r.text)}`,ok:r.ok===!0||r.ok!==!1&&void 0}):r.type===`log`&&(r.level!==`info`||r.progress)&&n.lines.push({text:x(r.text),ok:r.level!==`error`&&void 0})}else if(n===`run-done`){let n=[...e.steps].reverse().find(e=>e.key.startsWith(`run:`)&&e.status===`running`),r=b(t.result),i=!t.error&&(r.outcome===`passed`||!r.outcome&&r.status===`complete`);if(n){n.status=i?`ok`:`fail`;let e=x(t.error)||x(r.summary);e&&n.lines.push({text:e,ok:!!i})}x(t.runDir)&&e.reports.push({label:i?`Browser run report`:`Browser run report (failed)`,path:x(t.runDir)})}else if(n===`suite-start`){let n=Array.isArray(t.cases)?t.cases:[];o(e,{key:`suite:${e.steps.length}`,label:`Running ${n.length} test case${n.length===1?``:`s`}`,status:`running`,orb:`working`,agent:`engine`})}else if(n===`suite-event`){let n=[...e.steps].reverse().find(e=>e.key.startsWith(`suite:`)),r=b(t.event);if(n&&r.type===`case-done`){let e=b(r.result);n.lines.push({text:`${F(e.case)}: ${x(e.status)}`,ok:e.status===`passed`})}}else if(n===`suite-done`){let n=[...e.steps].reverse().find(e=>e.key.startsWith(`suite:`)),r=Array.isArray(b(t.suite).results)?b(t.suite).results.map(b):[];if(n){let e=r.filter(e=>e.status!==`passed`).length;n.status=e?`fail`:`ok`,n.arg=`${r.length-e} of ${r.length} passed`}}else if(n===`card`){let n=b(t.card);o(e,{key:`card:${e.steps.length}`,label:x(n.title),arg:x(n.stats)||void 0,status:n.status===`ok`?`ok`:n.status===`fail`?`fail`:`info`,orb:`working`,lines:(Array.isArray(n.body)?n.body:[]).map(e=>({text:x(e)}))})}else if(n===`call-start`&&!t.quiet)o(e,{key:`call:${x(t.id)}`,label:x(t.text),status:`running`,orb:`working`});else if(n===`call`&&!t.quiet){let n=t.id?a(e,`call:${x(t.id)}`):void 0;n?n.status=t.ok===!1?`fail`:`ok`:o(e,{key:`call:${e.steps.length}`,label:x(t.text),status:t.ok===!1?`fail`:`ok`,orb:`working`})}else if(n===`code-start`)l=x(t.runDir)||void 0,o(e,{key:`code:${e.steps.length}`,label:`Writing the test`,arg:x(t.goal),status:`running`,orb:`writing`,agent:`forgeqe-test`});else if(n===`code-done`){let n=[...e.steps].reverse().find(e=>e.key.startsWith(`code:`)&&e.status===`running`);n&&(n.status=t.error?`fail`:`ok`,t.error&&n.lines.push({text:x(t.error),ok:!1})),e.tests.push(j(b(t.result),x(t.error),l)),l=void 0}else if(n===`agent`)c(e,b(t.event),!0);else if(n===`info`){let n=e.steps.at(-1);n?n.lines.push({text:x(t.text),ok:t.ok===!0||t.ok!==!1&&void 0}):o(e,{key:`info:${e.steps.length}`,label:x(t.text),status:t.ok===!1?`fail`:`info`,orb:`working`})}else n===`report`&&(o(e,{key:`report:${e.steps.length}`,label:`Report saved`,arg:x(t.title),status:`ok`,orb:`working`}),x(t.html)&&e.reports.push({label:x(t.title)||`Report`,path:x(t.html)}))};for(let e of t){d(e);let t=g(e);t&&(typeof e.id==`string`&&r.get(e.id)||typeof e.turn==`string`&&r.get(e.turn)||n.turns.at(-1))?.log.push(t)}return n;function d(e){switch(e.type){case`user`:{let t=P(x(e.id),x(e.text));n.turns.push(t),r.set(t.id,t);break}case`ready`:{let t=b(e.profile);t.name&&(n.model={name:x(t.name),provider:x(t.provider)}),n.writeTests=e.writeTests!==!1,n.headed=e.headed===!0;break}case`settings`:typeof e.writeTests==`boolean`&&(n.writeTests=e.writeTests),typeof e.headed==`boolean`&&(n.headed=e.headed);break;case`turn_start`:{let t=i(e.id);t&&(t.started=x(e.t)||x(e.at));break}case`agent`:{let t=i(e.id);t&&c(t,b(e.event),!1);break}case`tool`:{let t=i(e.id);t&&u(t,b(e.event));break}case`ask`:{let t=i(e.turn),n=b(e.question);t?.asks.push({id:x(e.id),title:x(n.title),detail:x(n.detail)||void 0,lines:Array.isArray(n.lines)?n.lines.map(x):[],options:(Array.isArray(n.options)?n.options:[]).map(e=>({id:x(b(e).id),label:x(b(e).label)}))});break}case`wait`:i(e.turn)?.waits.push({id:x(e.id),prompt:x(e.prompt)});break;case`answered`:for(let t of n.turns){let n=t.asks.find(t=>t.id===e.ask);n&&(n.answer=x(e.label));let r=t.waits.find(t=>t.id===e.ask);r&&(r.answer=e.ok===!0)}break;case`turn_done`:{let t=i(e.id);if(!t)break;t.outcome=e.outcome,t.reply=x(e.reply),t.next=M(e.next),t.error=x(e.error)||void 0,t.ended=x(e.t)||x(e.at),n.usage=y(e.usage)??n.usage;let r=e=>{for(let n of e)n.status===`running`&&(n.status=t.outcome===`done`?`ok`:`info`),n.children&&r(n.children)};if(r(t.steps),t.outcome===`done`)for(let e of t.plan)e.status===`active`&&(e.status=`done`);break}case`error`:e.code!==`busy`&&n.notes.push(x(e.message));break;case`fatal`:n.fatal=x(e.message);break;case`exit`:n.ended={code:typeof e.code==`number`?e.code:null,stderr:Array.isArray(e.stderr)?e.stderr.map(x):void 0,message:x(e.message)||void 0}}}}function L(e){let t=e.asks.find(e=>e.answer===void 0),n=e.waits.find(e=>e.answer===void 0);if(t||n)return{text:`Waiting for you…`,orb:`waiting`};let r=[...e.steps].reverse().find(e=>e.status===`running`);return r?{text:`${r.label}…`,orb:r.orb}:e.parts.some(e=>e.text.trim())&&e.steps.length?{text:`Writing a reply…`,orb:`writing`}:{text:`Thinking…`,orb:`thinking`}}function R(e){if(!e.started||!e.ended)return`Done`;let t=Math.max(1,Math.round((Date.parse(e.ended)-Date.parse(e.started))/1e3)),n=e.outcome===`stopped`?`Stopped after`:`Worked for`;return t<60?`${n} ${t} second${t===1?``:`s`}`:`${n} ${Math.floor(t/60)} min ${t%60} s`}var z={running:`active`,ok:`done`,fail:`failed`,info:`note`};function B(e,t){let n=e=>e===`active`&&!t?`done`:e;if(!e.plan.length)return e.steps.map(e=>({key:e.key,label:e.label,status:n(z[e.status]),steps:[],step:e}));let r=new Set(e.plan.map(e=>e.text)),i=new Map,a=``;for(let t of e.steps)t.phase&&r.has(t.phase)&&(a=t.phase),i.set(a,[...i.get(a)||[],t]);let o=e=>e.some(e=>e.status===`running`),s=[],c=i.get(``)||[];c.length&&s.push({key:`plan:start`,label:`Getting started`,status:n(o(c)?`active`:`done`),steps:c});let l=e.plan.map((e,n)=>{let r=i.get(e.text)||[],a=e.status===`done`?`done`:e.status===`skipped`?`skipped`:e.status===`active`||o(r)?`active`:`pending`;return{key:`plan:${n}`,label:e.text,status:a===`active`&&!t?`pending`:a,steps:r}});return[...s,...V(l)]}function V(e){let t=e.findIndex(e=>e.status===`active`);return t<0?e:e.map((e,n)=>e.status===`skipped`||e.status===`failed`||n===t?e:{...e,status:n<t?`done`:`pending`})}export{g as a,R as i,I as n,v as o,B as r,l as s,L as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ar as e}from"./
|
|
1
|
+
import{ar as e}from"./Shell-B8HJCZ4f.js";var t={name:`trending-down`,size:24,node:[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]};t.node;var n=e(t),r={name:`trending-up`,size:24,node:[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]};r.node;var i=e(r);export{n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fr as e,Mr as t,ar as n,fr as r}from"./Shell-B8HJCZ4f.js";import{n as i}from"./thread-CIhAcfY-.js";var a={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};a.node;var o=n(a),s={name:`message-square-plus`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]};s.node;var c=n(s),l={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};l.node;var u=n(l),d=e(t(),1),f=/^<!--[\s\S]*?-->\s*/,p=e=>e&&/^No model in llms\.json/.test(e)?`No model is set up for the agent yet: add one in Settings, Models (or sign in to GitHub Copilot there), then send this again.`:e;function m(e){let t=()=>{try{return localStorage.getItem(e)}catch{return null}},n=t=>{try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}},[a,o]=(0,d.useState)(t),[s,c]=(0,d.useState)([]),[l,u]=(0,d.useState)(null);(0,d.useEffect)(()=>{if(!a){c([]),u(null);return}let e=!1,t=0;return c([]),(async()=>{for(;!e;)try{let n=await r.events(a,t,t>0);if(e||(u(n.state),n.events.length&&(t=n.events.at(-1).n,c(e=>[...e,...n.events])),(n.state===`closed`||n.state===`failed`)&&!n.events.length))return}catch(t){if(e)return;if(t.status===404){n(null),o(null);return}await new Promise(e=>setTimeout(e,2e3))}})(),()=>{e=!0}},[a]);let f=(0,d.useMemo)(()=>i(s),[s]),p=f.turns.at(-1),m=l===`closed`||l===`failed`;return{chat:a,thread:f,last:p,busy:l===`busy`||l===`starting`||!!p&&!p.outcome&&!m,ended:m,send:async(e,t)=>{if(a&&!m)await r.send(a,e);else{let{id:i}=await r.start(`${t}\n${e}`,{});n(i),o(i)}},reset:()=>{n(null),o(null)}}}export{c as a,u as i,p as n,o,m as r,f as t};
|
package/dist/web/index.html
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<meta name="referrer" content="no-referrer" />
|
|
7
7
|
<title>ForgeQE</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Ct2Md_DL.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/Shell-B8HJCZ4f.js">
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DtP9ditr.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|
package/docs/MOBILE.md
CHANGED
|
@@ -19,8 +19,10 @@ ForgeQE drives mobile apps two ways, and one workflow format runs on both:
|
|
|
19
19
|
## Use
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
forgeqe mobile doctor # does the Appium server answer, is maestro installed?
|
|
22
|
+
forgeqe mobile doctor # does the Appium server answer, is maestro installed? (or, with
|
|
23
|
+
# mobile.maestro.testmu: is the hyperexecute CLI there, are the user and key set?)
|
|
23
24
|
forgeqe mobile apps # the mobile apps of the active environment
|
|
25
|
+
forgeqe mobile devices --like "Pixel 8-14" # the devices TestMu or BrowserStack has, most like one first
|
|
24
26
|
forgeqe mobile explore "Sign in as the courier and accept the first delivery" --app courier
|
|
25
27
|
forgeqe mobile replay .forgeqe/reports/mobile-explore-…/workflow.yaml
|
|
26
28
|
forgeqe mobile replay workflow.yaml --driver maestro
|
|
@@ -170,11 +172,11 @@ mobile:
|
|
|
170
172
|
username_env: LT_USERNAME
|
|
171
173
|
access_key_env: LT_ACCESS_KEY
|
|
172
174
|
capabilities:
|
|
173
|
-
"LT:Options": { w3c: true, isRealMobile: true, deviceName: "Pixel
|
|
175
|
+
"LT:Options": { w3c: true, isRealMobile: true, deviceName: "Pixel 8", platformVersion: "14", build: nightly } # app: added from the app's own
|
|
174
176
|
maestro:
|
|
175
177
|
testmu: # Maestro on TestMu, through HyperExecute
|
|
176
178
|
cli: /opt/hyperexecute # TestMu's hyperexecute CLI
|
|
177
|
-
devices: ["Pixel
|
|
179
|
+
devices: ["Pixel 8-14"] # name-version, or a pattern such as ".*-.*"
|
|
178
180
|
real_device: true # false: TestMu's emulators
|
|
179
181
|
# username_env: LT_USERNAME # the defaults
|
|
180
182
|
# access_key_env: LT_ACCESS_KEY
|
|
@@ -186,13 +188,33 @@ mobile:
|
|
|
186
188
|
the device's `appId`; a build file is uploaded with the project), a fixed setup script (Android platform tools 35.0.2
|
|
187
189
|
and Maestro 2.6.1 from its release, both checked against their SHA-256) and a fixed run script, and
|
|
188
190
|
`hyperexecute.yaml`. Team flows are checked against the allowlist first, as always. Flow file names may only use
|
|
189
|
-
letters, digits and `_ . -
|
|
190
|
-
|
|
191
|
-
result in the
|
|
191
|
+
letters, digits and `_ . - /`, because HyperExecute's shell reads them, and no folder or file may be hidden except
|
|
192
|
+
a top-level `.maestro/` (hidden files of the working folder never leave the machine). After the job, ForgeQE
|
|
193
|
+
downloads its artifacts (Maestro's command results and JUnit reports), so each step gets its own result in the
|
|
194
|
+
report. A job on several devices (more than one entry in `devices`, or a pattern) brings back one run per device:
|
|
195
|
+
the steps show the first device that failed, or the first device when all passed, and the job's page has each one.
|
|
196
|
+
The job's link is printed from either `hyperexecute.lambdatest.com` or `hyperexecute.testmu.ai`.
|
|
197
|
+
- **Devices are checked first.** On TestMu (Appium or Maestro) and BrowserStack (Appium), `replay`, `maestro` and
|
|
198
|
+
`explore` read the cloud's device list before they start (TestMu's list for the region, BrowserStack's
|
|
199
|
+
`devices.json`) and check each configured device, exact or a pattern. A device the cloud does not have would wait
|
|
200
|
+
in its queue and time out (`QUEUE_TIMEOUT_DEVICE_UNAVAILABLE`), so ForgeQE offers the devices most like it instead:
|
|
201
|
+
the same model on other OS versions, then the same family. In a terminal you pick one for this run; without one it
|
|
202
|
+
stops and names them. `--device "Pixel 8-13"` runs on another device this time (several, comma-separated, for
|
|
203
|
+
Maestro), `--no-device-check` skips the check, and `forgeqe mobile devices` lists what the cloud has. The list
|
|
204
|
+
says what a cloud offers in the region, not whether a device is free this minute. TestMu's emulators
|
|
205
|
+
(`real_device: false`, `isRealMobile: false`) are not in it and are not checked.
|
|
206
|
+
- **Videos.** TestMu records each Maestro flow as an App Automation session (its dashboard, not the HyperExecute job
|
|
207
|
+
page, shows the video). Each run is its own build there, and after the job ForgeQE saves each flow's recording as
|
|
208
|
+
`videos/<flow>.mp4` in the run folder, plays it in the report's Artifacts tab, and prints it with the session's
|
|
209
|
+
TestMu page. A video TestMu has not finished is waited for briefly; a run never fails for want of one.
|
|
192
210
|
- **Secrets on Maestro on TestMu:** a workflow that types a secret is refused there for now (HyperExecute would need
|
|
193
|
-
the value in its own vault). Replay it on TestMu with `--driver appium`.
|
|
211
|
+
the value in its own vault). Replay it on TestMu with `--driver appium`. For the same reason, a team flow that reads
|
|
212
|
+
a `${NAME}` variable its own `env:` blocks do not set is refused on TestMu (locally it could come from the
|
|
213
|
+
environment); run it with a local `maestro`.
|
|
194
214
|
- The access key is passed to the CLI as an argument. It is removed from the CLI's output and from every file in the
|
|
195
215
|
run folder. Neither the user name nor the key is passed to the flows' environment.
|
|
216
|
+
- `maestro` and the `hyperexecute` CLI are started without ForgeQE's own secrets (the model's key, service tokens) in
|
|
217
|
+
their environment; only the mobile engine itself holds them.
|
|
196
218
|
- The `testmu` job of `.github/workflows/ci.yml` (Run workflow, job `testmu`) runs all three on TestMu (Appium, Maestro with a workflow, a team flow)
|
|
197
219
|
with TestMu's Wikipedia sample app, once the repository has the secrets `LT_USERNAME` and `LT_ACCESS_KEY`.
|
|
198
220
|
|
package/docs/WEB_APP.md
CHANGED
|
@@ -39,6 +39,11 @@ Settings are locked.
|
|
|
39
39
|
4. **A model.** At least one model with its key or sign-in, under **Models**. For a GitHub Copilot seat, sign in here
|
|
40
40
|
or in Models (below).
|
|
41
41
|
|
|
42
|
+
**Dark mode.** Each person chooses for their own browser: **System mode** in the sidebar's footer moves through
|
|
43
|
+
System (as the computer is set), Light and Dark, and Settings › Appearance › **Colour mode** has all three. In dark mode
|
|
44
|
+
the page and the default sidebar go dark, links and the accent are lightened so they read, code is coloured for a dark
|
|
45
|
+
page, and logos drawn in black turn white. A project's own sidebar colour (Appearance) stays the brand's.
|
|
46
|
+
|
|
42
47
|
**Signing in to GitHub Copilot** (Set up, and Settings › Models › Sign-ins) does what `forgeqe auth login copilot`
|
|
43
48
|
does. **Sign in with GitHub** runs GitHub's own Copilot CLI sign-in (downloaded the first time): the page shows
|
|
44
49
|
GitHub's link with **Open GitHub** and the one-time code with **Copy**, and waits while you approve on GitHub; the
|
|
@@ -125,10 +130,10 @@ and Ended as filters, a search, and 50 at a time.
|
|
|
125
130
|
|
|
126
131
|
| Page | What it is for |
|
|
127
132
|
|---|---|
|
|
128
|
-
| **Record** | Do a test's steps yourself in a browser or a Windows app ForgeQE opens; each click, entry and
|
|
129
|
-
| **Regression** | Regression packs for a release
|
|
130
|
-
| **API tests** |
|
|
131
|
-
| **Quality** | What each browser run measured:
|
|
133
|
+
| **Record** | Do a test's steps yourself in a browser or a Windows app ForgeQE opens; each click, entry and choice is recorded, with nothing to describe first: no panel in the page, only a small badge, with Pause, Undo and Stop on the Record page. A web recording is then reviewed with clicks: its name (written from what you did), steps to drop or add (in your words, a page to open, go back), notes on steps, instructions for the Coding agent, checks suggested from what each step brought to the page or picked on its picture (a text, a field's value, the page it leads to, or in your words), and where each typed value comes from (as typed, test data, new on each run, or a secret read from the environment, its typed text removed from the recording). Every change is a version to go back to. Steps used in many tests are kept as a **block**, put into another recording, or played first when one starts (**Start from a block**). **Record more from here** plays the steps up to one and records what comes next. Checks of the page's own server calls, and **Suggest with the model** (one call). ForgeQE makes the usual choices first, and finds saved blocks in the steps. **Try it** replays the steps with Playwright, on another environment or with other test data if you like. **Write the test** tries the steps first, then the Coding agent writes it in the review, asking nothing: the plan and where the test goes follow the repository, and a block becomes one helper. A desktop recording replays with no model. The recordings, searched and paged, each with **Review**. |
|
|
134
|
+
| **Regression** | Regression packs for a release, in two tabs. **Agent**: a conversation where the agent reads the connected sources, says what is missing, asks for the details it needs (ticked off above the message box), and builds the pack. **Packs**: a table of the packs; a row opens the pack's page, with its numbers in one strip, the plan as a table (automated, manual, new automation, exploratory; filters, search, 50 rows a page, each row's evidence) and the release's changes, risk areas, runs and triage, history and a comparison beside it; save it, run it now or schedule it, refresh it, reuse it for the next release. |
|
|
135
|
+
| **API tests** | Two tabs. **Agent**: a conversation where you paste links, cURL or details (or attach a Postman collection or an API description) and the agent makes the API's calls in folders, sends them and says what it found, each API as a card to open. **Workbench**: like Postman, with an agent: APIs (from a description, a Postman collection, or the calls a recorded run saw) with their calls in folders and flows on the left, exported as a Postman collection; a call open to edit and **Send**, its answer, and what it must answer; an environment from env.yaml and one **Run**. Calls that change data ask first (once, or always on a test environment). Sign in once per API, the value kept as a secret. Flows built from the API's calls, passing values on. **Ask the agent** writes the tests or explains a failure, on the page. |
|
|
136
|
+
| **Quality** | What each browser run measured, as a table of runs (rules failed, critical and serious violations, slow pages, visual changes, budgets exceeded), with Trends beside it. A row opens the run's page: its numbers in one strip and three tabs, **Accessibility** (every failed WCAG rule with its criterion, level, elements and pages, each opening on the elements and how to fix it; the rules that passed), **Performance** (every page's Core Web Vitals, requests and size against the thresholds and budgets) and **Visual** (every page against its baseline, with the baseline, this run and the difference, and **Approve as the new baseline**). |
|
|
132
137
|
| **Data** | Databases (read-only queries; test data only with a writable database and your confirmation), test data, and data flows. |
|
|
133
138
|
| **Runs** | Every ForgeQE session in the project, from here, a schedule or the terminal: 25 to a page with filters. A run shows its summary, the conversation, its activity, and its details. |
|
|
134
139
|
| **Reports** | Every report ForgeQE wrote, each opening as its HTML report in a new tab; and the project report: every run together, with pass rate by day, what fails most, flaky cases and defects. |
|
package/docs/user-guide.html
CHANGED
|
@@ -1158,6 +1158,46 @@ change. <code>--no-plan</code> (or <code>--yes</code>) skips the plan. Later: <c
|
|
|
1158
1158
|
<p>The recorder runs in an isolated world in each page, so the page's own scripts can neither see it nor add steps, and it
|
|
1159
1159
|
records only real input: clicks and keys a script fakes are ignored. The panel's own clicks and keys never reach the page
|
|
1160
1160
|
and are never recorded, and it stays above the page's dialogs. Recording uses local Chrome or Chromium.</p>
|
|
1161
|
+
<p><strong>From the web app (Record page).</strong> You only do the steps, with nothing to describe first: the browser shows the site
|
|
1162
|
+
with no panel in it, only a small "Recording" badge that takes no click. <strong>Pause</strong>, <strong>Undo</strong> and <strong>Stop</strong> are on the
|
|
1163
|
+
Record page (and on the keys: Ctrl+Shift+Space, then P, Z or S). After each step the recorder keeps a picture of the
|
|
1164
|
+
page and what it showed (<code>steps/NNN.jpg</code> and <code>.json</code> in the run folder; the badge is left out of the picture, and an
|
|
1165
|
+
address keeps no query, where a form sent by GET puts what was typed), and the calls the page made to its own site
|
|
1166
|
+
that change data or fail (method, path and status only). When you stop, you review the recording with clicks.</p>
|
|
1167
|
+
<p>The review starts with the steps and <strong>Write the test</strong>; everything else is under <strong>More</strong>. ForgeQE has already made
|
|
1168
|
+
the choices most recordings need, as one version you can undo: an email typed where an account is made is new on each
|
|
1169
|
+
run, and the last step has the check its page suggests first. When steps of the recording are a saved block, it says
|
|
1170
|
+
so: <strong>Use the block</strong> marks them as the block.</p>
|
|
1171
|
+
<div class="tbl"><table>
|
|
1172
|
+
<thead>
|
|
1173
|
+
<tr><th>In the review</th><th>What it does</th></tr>
|
|
1174
|
+
</thead>
|
|
1175
|
+
<tbody>
|
|
1176
|
+
<tr><td>Name</td><td>Written from what you did ("shop.test: Sign in → Email → Password → Log in …"); change it if you like</td></tr>
|
|
1177
|
+
<tr><td>Check that … under a step</td><td>One click adds a check of what the step brought to the page: a new title, a message or heading. Digits are checked by their shape (<code>Order placed: #\d+</code>)</td></tr>
|
|
1178
|
+
<tr><td>A call under a step</td><td>One click checks the page's own call to its server, such as <code>POST /api/orders answers 201</code>: the test waits for it and checks its status</td></tr>
|
|
1179
|
+
<tr><td>Suggest with the model</td><td>One model call reads the pages after each step and suggests checks and test data; each is kept only when it is what the recording holds. <strong>Add</strong> one, or <strong>Add all</strong></td></tr>
|
|
1180
|
+
<tr><td>The picture of a step</td><td>Click a text on it to check that it shows, or a field to check its value</td></tr>
|
|
1181
|
+
<tr><td>Add, then Check</td><td>The page the step leads to, or a check in your words, which the coding agent finds on the page</td></tr>
|
|
1182
|
+
<tr><td>Add, then Step</td><td><strong>Record more from here</strong>: the browser opens and does the steps up to there, and you record what comes next; it goes in after that step. Or a step in your words ("choose the cheapest delivery"), which the coding agent finds on the page and does there; open a page; or go back</td></tr>
|
|
1183
|
+
<tr><td>Add, then Note</td><td>A note on the step for whoever writes the test ("this is the cart page object")</td></tr>
|
|
1184
|
+
<tr><td>Drop (bin)</td><td>Removes the step</td></tr>
|
|
1185
|
+
<tr><td>Instructions for the Coding agent</td><td>Anything else about the test, in your words: where it goes, the page objects to use, its tags. The coding agent follows them, as long as they keep to the steps and checks</td></tr>
|
|
1186
|
+
<tr><td>Test data</td><td>Each typed value: as typed, test data, new on each run (<code>ann+{{$unique}}@shop.test</code>), or a secret read from the environment, its typed text removed from the recording, its pictures and every kept version</td></tr>
|
|
1187
|
+
<tr><td>Blocks</td><td>Keep steps you do in many tests (Sign in) as a block, <code>.forgeqe/blocks/<name>.yaml</code>; put a block in after a step. Blocks go into the repository, so the team shares them (the review says when <code>.gitignore</code> leaves them out). A block holds only steps done by hand: a block file with a step that runs JavaScript, calls an API or uploads a file is ignored</td></tr>
|
|
1188
|
+
<tr><td>History</td><td>Every change is a version: go back to any of them, or to the recording as recorded</td></tr>
|
|
1189
|
+
<tr><td>Try it</td><td>Plays the steps with Playwright in a new browser, as the test will: where it was recorded or on another environment of <code>env.yaml</code> (the same web app's address there), with the test data as recorded or other values</td></tr>
|
|
1190
|
+
</tbody>
|
|
1191
|
+
</table></div>
|
|
1192
|
+
<p><strong>Start from a block</strong> (More options on the Record page): the recording opens the block's first page and does its
|
|
1193
|
+
steps for you in the same tab, the recorder paused meanwhile; then you record the rest. A step that cannot be done (a
|
|
1194
|
+
secret not set) ends the block there, and you do the rest by hand. <strong>Write the test</strong> hands the recording to the coding
|
|
1195
|
+
agent, which asks nothing: the plan and where the test goes follow the repository, and each block becomes one helper
|
|
1196
|
+
that every test using it calls. A past recording is run again the same way: <strong>Review</strong> in the list, then <strong>Try it</strong>.</p>
|
|
1197
|
+
<p><strong>Write the test</strong> first plays the steps with Playwright, as the test will. When a step does not work, it says so
|
|
1198
|
+
before any code is written: <strong>Record step N again</strong> (the browser does the steps before it, and what you record takes
|
|
1199
|
+
its place), drop it, or write the test anyway. Then the Coding agent writes the test, and its work shows in the review:
|
|
1200
|
+
what it is doing, the files it changed, and its answer (or why it stopped).</p>
|
|
1161
1201
|
</div>
|
|
1162
1202
|
</section>
|
|
1163
1203
|
</div>
|
|
@@ -2688,8 +2728,10 @@ no CI job tests it yet (it needs a macOS runner with a simulator).</p>
|
|
|
2688
2728
|
</section>
|
|
2689
2729
|
<section class="doc" id="doc-docs-mobile-use">
|
|
2690
2730
|
<h4>Use</h4>
|
|
2691
|
-
<div class="prose"><pre><code class="language-bash">forgeqe mobile doctor # does the Appium server answer, is maestro installed?
|
|
2731
|
+
<div class="prose"><pre><code class="language-bash">forgeqe mobile doctor # does the Appium server answer, is maestro installed? (or, with
|
|
2732
|
+
# mobile.maestro.testmu: is the hyperexecute CLI there, are the user and key set?)
|
|
2692
2733
|
forgeqe mobile apps # the mobile apps of the active environment
|
|
2734
|
+
forgeqe mobile devices --like "Pixel 8-14" # the devices TestMu or BrowserStack has, most like one first
|
|
2693
2735
|
forgeqe mobile explore "Sign in as the courier and accept the first delivery" --app courier
|
|
2694
2736
|
forgeqe mobile replay .forgeqe/reports/mobile-explore-…/workflow.yaml
|
|
2695
2737
|
forgeqe mobile replay workflow.yaml --driver maestro
|
|
@@ -2834,11 +2876,11 @@ the build (it must be inside the working folder), and saves the <code>lt://</cod
|
|
|
2834
2876
|
username_env: LT_USERNAME
|
|
2835
2877
|
access_key_env: LT_ACCESS_KEY
|
|
2836
2878
|
capabilities:
|
|
2837
|
-
"LT:Options": { w3c: true, isRealMobile: true, deviceName: "Pixel
|
|
2879
|
+
"LT:Options": { w3c: true, isRealMobile: true, deviceName: "Pixel 8", platformVersion: "14", build: nightly } # app: added from the app's own
|
|
2838
2880
|
maestro:
|
|
2839
2881
|
testmu: # Maestro on TestMu, through HyperExecute
|
|
2840
2882
|
cli: /opt/hyperexecute # TestMu's hyperexecute CLI
|
|
2841
|
-
devices: ["Pixel
|
|
2883
|
+
devices: ["Pixel 8-14"] # name-version, or a pattern such as ".*-.*"
|
|
2842
2884
|
real_device: true # false: TestMu's emulators
|
|
2843
2885
|
# username_env: LT_USERNAME # the defaults
|
|
2844
2886
|
# access_key_env: LT_ACCESS_KEY
|
|
@@ -2850,13 +2892,33 @@ The project holds the flows in their folder layout (so <code>runFlow</code> stil
|
|
|
2850
2892
|
the device's <code>appId</code>; a build file is uploaded with the project), a fixed setup script (Android platform tools 35.0.2
|
|
2851
2893
|
and Maestro 2.6.1 from its release, both checked against their SHA-256) and a fixed run script, and
|
|
2852
2894
|
<code>hyperexecute.yaml</code>. Team flows are checked against the allowlist first, as always. Flow file names may only use
|
|
2853
|
-
letters, digits and <code>_ . - /</code
|
|
2854
|
-
|
|
2855
|
-
result in the
|
|
2895
|
+
letters, digits and <code>_ . - /</code>, because HyperExecute's shell reads them, and no folder or file may be hidden except
|
|
2896
|
+
a top-level <code>.maestro/</code> (hidden files of the working folder never leave the machine). After the job, ForgeQE
|
|
2897
|
+
downloads its artifacts (Maestro's command results and JUnit reports), so each step gets its own result in the
|
|
2898
|
+
report. A job on several devices (more than one entry in <code>devices</code>, or a pattern) brings back one run per device:
|
|
2899
|
+
the steps show the first device that failed, or the first device when all passed, and the job's page has each one.
|
|
2900
|
+
The job's link is printed from either <code>hyperexecute.lambdatest.com</code> or <code>hyperexecute.testmu.ai</code>.</li>
|
|
2901
|
+
<li><strong>Devices are checked first.</strong> On TestMu (Appium or Maestro) and BrowserStack (Appium), <code>replay</code>, <code>maestro</code> and
|
|
2902
|
+
<code>explore</code> read the cloud's device list before they start (TestMu's list for the region, BrowserStack's
|
|
2903
|
+
<code>devices.json</code>) and check each configured device, exact or a pattern. A device the cloud does not have would wait
|
|
2904
|
+
in its queue and time out (<code>QUEUE_TIMEOUT_DEVICE_UNAVAILABLE</code>), so ForgeQE offers the devices most like it instead:
|
|
2905
|
+
the same model on other OS versions, then the same family. In a terminal you pick one for this run; without one it
|
|
2906
|
+
stops and names them. <code>--device "Pixel 8-13"</code> runs on another device this time (several, comma-separated, for
|
|
2907
|
+
Maestro), <code>--no-device-check</code> skips the check, and <code>forgeqe mobile devices</code> lists what the cloud has. The list
|
|
2908
|
+
says what a cloud offers in the region, not whether a device is free this minute. TestMu's emulators
|
|
2909
|
+
(<code>real_device: false</code>, <code>isRealMobile: false</code>) are not in it and are not checked.</li>
|
|
2910
|
+
<li><strong>Videos.</strong> TestMu records each Maestro flow as an App Automation session (its dashboard, not the HyperExecute job
|
|
2911
|
+
page, shows the video). Each run is its own build there, and after the job ForgeQE saves each flow's recording as
|
|
2912
|
+
<code>videos/<flow>.mp4</code> in the run folder, plays it in the report's Artifacts tab, and prints it with the session's
|
|
2913
|
+
TestMu page. A video TestMu has not finished is waited for briefly; a run never fails for want of one.</li>
|
|
2856
2914
|
<li><strong>Secrets on Maestro on TestMu:</strong> a workflow that types a secret is refused there for now (HyperExecute would need
|
|
2857
|
-
the value in its own vault). Replay it on TestMu with <code>--driver appium</code
|
|
2915
|
+
the value in its own vault). Replay it on TestMu with <code>--driver appium</code>. For the same reason, a team flow that reads
|
|
2916
|
+
a <code>${NAME}</code> variable its own <code>env:</code> blocks do not set is refused on TestMu (locally it could come from the
|
|
2917
|
+
environment); run it with a local <code>maestro</code>.</li>
|
|
2858
2918
|
<li>The access key is passed to the CLI as an argument. It is removed from the CLI's output and from every file in the
|
|
2859
2919
|
run folder. Neither the user name nor the key is passed to the flows' environment.</li>
|
|
2920
|
+
<li><code>maestro</code> and the <code>hyperexecute</code> CLI are started without ForgeQE's own secrets (the model's key, service tokens) in
|
|
2921
|
+
their environment; only the mobile engine itself holds them.</li>
|
|
2860
2922
|
<li>The <code>testmu</code> job of <code>.github/workflows/ci.yml</code> (Run workflow, job <code>testmu</code>) runs all three on TestMu (Appium, Maestro with a workflow, a team flow)
|
|
2861
2923
|
with TestMu's Wikipedia sample app, once the repository has the secrets <code>LT_USERNAME</code> and <code>LT_ACCESS_KEY</code>.</li>
|
|
2862
2924
|
</ul>
|
|
@@ -4152,7 +4214,7 @@ forgeqe report setup # a report after every Playw
|
|
|
4152
4214
|
<div class="facts">
|
|
4153
4215
|
<div class="fact"><span class="mono">Ask it</span><ul class="asks"><li>Build a regression pack for sprint 12 and run it on TestMu</li><li>Which tests should we run for the PRs merged this week?</li></ul></div>
|
|
4154
4216
|
<div class="fact"><span class="mono">What it needs</span><ul class="needs"><li><span class="need input">You give</span><span>a repository with tests</span></li><li><span class="need opt">Optional</span><span>Azure DevOps or Jira, to read a sprint's or release's work items: set up under sources: in forgeqe.yaml, or sign in with /auth</span></li></ul></div>
|
|
4155
|
-
<div class="fact"><span class="mono">Tools</span><p class="tools"><code>build_regression_pack</code> <code>run_regression_pack</code> <code>list_regression_packs</code></p></div>
|
|
4217
|
+
<div class="fact"><span class="mono">Tools</span><p class="tools"><code>build_regression_pack</code> <code>run_regression_pack</code> <code>list_regression_packs</code> <code>regression_sources</code> <code>edit_regression_pack</code></p></div>
|
|
4156
4218
|
</div>
|
|
4157
4219
|
<div class="detail"><span class="mono">In detail</span>
|
|
4158
4220
|
<section class="doc" id="doc-how_to_use-regression-packs-for-a-release">
|
|
@@ -4183,6 +4245,27 @@ Build a pack for Jira fix version 2.4 and the commits since release/2.3 in ../sh
|
|
|
4183
4245
|
</tbody>
|
|
4184
4246
|
</table></div>
|
|
4185
4247
|
<p><strong>Gaps.</strong> Changes no test is in for are listed as <em>not covered</em>, each with the closest existing test and what it lacks, so you can extend that test rather than write a new one.</p>
|
|
4248
|
+
<p><strong>The plan: what the release needs.</strong> Besides the tests to run, a pack is a plan in four groups, so what is ready is never mixed up with what someone still has to do:</p>
|
|
4249
|
+
<div class="tbl"><table>
|
|
4250
|
+
<thead>
|
|
4251
|
+
<tr><th>Group</th><th>What it is</th><th>Its script</th></tr>
|
|
4252
|
+
</thead>
|
|
4253
|
+
<tbody>
|
|
4254
|
+
<tr><td>A Automated</td><td>tests of the repository the pack found (the reasons above)</td><td><em>checked</em> only while its file is in the repository and still names the test; otherwise <em>missing</em> (moved, renamed or deleted since)</td></tr>
|
|
4255
|
+
<tr><td>B Manual</td><td>test cases linked to a changed work item that no automated test runs</td><td>run by a person</td></tr>
|
|
4256
|
+
<tr><td>C New automation</td><td>changes no test covers: a test to write, or the closest one to extend</td><td>to write</td></tr>
|
|
4257
|
+
<tr><td>D Exploratory</td><td>the risk areas the release touches</td><td>a session for a person</td></tr>
|
|
4258
|
+
</tbody>
|
|
4259
|
+
</table></div>
|
|
4260
|
+
<p>Each entry has a priority, says where it came from (<em>found</em> in the sources and the code, or <em>suggested</em> by ForgeQE or its agent) and keeps its evidence (the work item, pull request or defect history, with links). Change it in your words ("take out the flaky ones", "add a manual check of the invoice PDF", "why is this in?") or on the page: priority, take out and put back, move between B, C and D, add an entry. An automated test is added only when its file is in the test repository (no hidden file) and names the test, so the pack never claims a script it has not found. Every change is kept in the pack's history, with who made it.</p>
|
|
4261
|
+
<p>A pack starts as a <strong>draft</strong>; save it (a name, the release) when it is right, then run it now or on a schedule (a job that runs <code>forgeqe pack run</code>). Reuse it:</p>
|
|
4262
|
+
<ul>
|
|
4263
|
+
<li><strong>Refresh</strong>: the same changes read again (<code>forgeqe pack build --refresh release-22</code>); your edits and its runs stay.</li>
|
|
4264
|
+
<li><strong>The next release</strong>: a new pack from new changes that keeps the edits of an earlier one (<code>--based-on release-22</code>).</li>
|
|
4265
|
+
<li><strong>Compare</strong> two releases: what each has ready, manual, to automate and exploratory, the tests and changes one has and the other not, and their last runs.</li>
|
|
4266
|
+
</ul>
|
|
4267
|
+
<p><code>--release "Release 22"</code> names the release a pack is for.</p>
|
|
4268
|
+
<p><strong>On the Regression page</strong> there are two tabs. On <strong>Agent</strong> you ask for a pack in a sentence ("Create a regression pack for Release 22"). The agent reads which sources the project is connected to (the test and product repositories, Azure DevOps, Jira, GitHub, test management, docs, a pipeline: the line at the top says which), says what a missing one would add and offers to connect it, and asks for the details it still needs, one or two at a time: the release, where its changes are, what to leave out, then whether to save it and run it now or on a schedule. Above the message box, <em>The pack needs</em> ticks off each detail as it is given (sources, release, changes, plan, saved, run); click a missing one to start your answer to it. The tab looks and works like the API page's Agent tab. None of the sources is required, and nothing runs until you say so. On <strong>Packs</strong> the packs are a table, newest first: each with how many entries are ready to run, scripts missing, manual, to automate and exploratory, and its last run. A row opens the pack's page: one strip of numbers (ready to run, script missing, the four groups, high priority, coverage of the release's changes, the last run; click one to show those entries), the plan as a table (all or one group, high priority, script missing, flaky or taken out, a search over tests, files and features, 50 rows a page with the highest priority first; a row opens its evidence), and beside it the release's changes, risk areas, runs and triage, history and a comparison with another release. Without a model set up, <em>Choose the changes</em> picks the sprint, commits or pull requests yourself.</p>
|
|
4186
4269
|
<p><strong>Running it.</strong> ForgeQE asks before it runs anything.</p>
|
|
4187
4270
|
<ul>
|
|
4188
4271
|
<li><em>This machine</em>: ForgeQE builds one command for exactly the pack's tests, the way the repository already runs a test (for .NET, a <code>--filter</code> with each test, the settings an earlier job used, TRX results), runs it, and reads each result. A failed test runs once more; one that then passes is flaky.</li>
|
|
@@ -4322,10 +4405,10 @@ forgeqe pr-tests 42 --run --post # and post the results on p
|
|
|
4322
4405
|
<div class="hd"><span class="mono">API</span><h3>API and contract testing</h3></div>
|
|
4323
4406
|
<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, SOAP, and gRPC.</p>
|
|
4324
4407
|
<div class="facts">
|
|
4325
|
-
<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></ul></div>
|
|
4408
|
+
<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></ul></div>
|
|
4326
4409
|
<div class="fact"><span class="mono">What it needs</span><ul class="needs"><li><span class="need opt">Optional</span><span>The coding agent, Scribe: a live model profile (or code.model) and the agent runtime, which forgeqe setup installs</span></li></ul></div>
|
|
4327
4410
|
<div class="fact"><span class="mono">Limits</span><ul class="plainlist"><li>Functional API testing, not load or stress testing.</li></ul></div>
|
|
4328
|
-
<div class="fact"><span class="mono">Tools</span><p class="tools"><code>api_contracts</code> <code>run_api_contracts</code> <code>api_scenarios</code> <code>run_api_scenarios</code> <code>write_api_tests</code></p></div>
|
|
4411
|
+
<div class="fact"><span class="mono">Tools</span><p class="tools"><code>api_contracts</code> <code>run_api_contracts</code> <code>api_scenarios</code> <code>run_api_scenarios</code> <code>write_api_tests</code> <code>api_new_set</code> <code>api_add_calls</code> <code>api_import_collection</code></p></div>
|
|
4329
4412
|
</div>
|
|
4330
4413
|
<div class="detail"><span class="mono">In detail</span>
|
|
4331
4414
|
<section class="doc" id="doc-how_to_use-api-and-contract-tests">
|
|
@@ -4356,6 +4439,31 @@ forgeqe api contracts --run # the latest browser run's API c
|
|
|
4356
4439
|
forgeqe api run --base-url https://qa.shop.example # exit 1 when a contract fails: a CI gate
|
|
4357
4440
|
forgeqe api tests --repo ../app # Scribe writes them as tests
|
|
4358
4441
|
</code></pre>
|
|
4442
|
+
<p><strong>The Agent tab</strong> of the API tests page is a conversation: paste a link (an API description, a Postman collection,
|
|
4443
|
+
the docs), cURL commands, or tell it about the API in your words, and attach a file (a Postman collection is imported
|
|
4444
|
+
at once; an API description is kept in <code>.forgeqe/specs/</code> for the agent to read). The agent makes the API and its
|
|
4445
|
+
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
|
|
4446
|
+
them, and says what it found; each API it made shows as a card to open on the Workbench tab. It never puts a
|
|
4447
|
+
credential in a call: you set the API's sign-in on the Workbench.</p>
|
|
4448
|
+
<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
|
|
4449
|
+
Postman collection</strong>: requests become calls in their folders, a saved example's status what each call must answer;
|
|
4450
|
+
only requests to the collection's own address are kept, and credentials (headers, secret variables, auth values)
|
|
4451
|
+
never are. An exported collection has a test of what each call must answer and <code>{{variables}}</code> where credentials go.</p>
|
|
4452
|
+
<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,
|
|
4453
|
+
each with its <strong>calls</strong> (contracts) and <strong>flows</strong> (scenarios). Open a call to see and change its request (method,
|
|
4454
|
+
path, params, headers, a JSON body), <strong>Send</strong> it and see what came back (body, headers, the checks that passed or
|
|
4455
|
+
failed), <strong>Save</strong> it, and set <strong>what it must answer</strong> (the status, the statuses that also pass, fields with their
|
|
4456
|
+
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
|
|
4457
|
+
<code>env.yaml</code> at the top: calls go to its API app's address, and <strong>Run</strong> runs every call and then every flow there
|
|
4458
|
+
(<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
|
|
4459
|
+
(remembered for the API, never for an environment named like production). <strong>Sign in</strong> once per API: a bearer token,
|
|
4460
|
+
an API key in a header, or a user name and password; the value you type goes to the credential store under a variable
|
|
4461
|
+
name, and only the name is kept with the API. Credential headers cannot be typed into a call's headers, and answers
|
|
4462
|
+
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
|
|
4463
|
+
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
|
|
4464
|
+
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
|
|
4465
|
+
shows on the page. Adding an API runs its calls that only read at once. Each run keeps the start of every answer (secrets
|
|
4466
|
+
masked), and each call shows how its last runs went.</p>
|
|
4359
4467
|
</div>
|
|
4360
4468
|
</section>
|
|
4361
4469
|
<section class="doc" id="doc-how_to_use-end-to-end-api-scenarios">
|
package/forgeqe.example.yaml
CHANGED
|
@@ -41,6 +41,13 @@ environments:
|
|
|
41
41
|
# maestro:
|
|
42
42
|
# command: [maestro]
|
|
43
43
|
# # device: emulator-5554
|
|
44
|
+
# # testmu: # run Maestro on TestMu AI's devices (HyperExecute) instead; docs/MOBILE.md
|
|
45
|
+
# # cli: ./hyperexecute # TestMu's hyperexecute program
|
|
46
|
+
# # devices: ["Pixel 8-14"] # name-version, or a pattern such as ".*-.*"
|
|
47
|
+
# # real_device: true # false: TestMu's emulators
|
|
48
|
+
# # region: us
|
|
49
|
+
# # username_env: LT_USERNAME # the user and key, as environment variable names
|
|
50
|
+
# # access_key_env: LT_ACCESS_KEY
|
|
44
51
|
# secrets: [COURIER_PASSWORD] # the only environment variables {{secret:…}} may read
|
|
45
52
|
# heal: true
|
|
46
53
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capagents/forgeqe",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "ForgeQE: a browser agent CLI that runs goals and test cases in local Chrome or Chromium, or BrowserStack and TestMu AI/LambdaTest when configured, and turns passing runs into tests in your repo",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
package/py/forgeqe_engine/cli.py
CHANGED
|
@@ -238,6 +238,20 @@ def _probe(out: TextIO) -> int:
|
|
|
238
238
|
return 0 if result.get("ok") else 1
|
|
239
239
|
|
|
240
240
|
|
|
241
|
+
def _suggest(out: TextIO) -> int:
|
|
242
|
+
"""stdin: {llm, steps}. Prints {ok, picks, ms, usage} or {ok: false, error}: one model call over a reviewed recording."""
|
|
243
|
+
from .suggest import suggest
|
|
244
|
+
|
|
245
|
+
line = sys.stdin.readline()
|
|
246
|
+
payload = json.loads(line) if line.strip() else {}
|
|
247
|
+
try:
|
|
248
|
+
result = asyncio.run(suggest(payload))
|
|
249
|
+
except Exception as e:
|
|
250
|
+
result = {"ok": False, "error": f"{type(e).__name__}: {e}"[:500]}
|
|
251
|
+
out.write(json.dumps(result, ensure_ascii=False) + "\n")
|
|
252
|
+
return 0 if result.get("ok") else 1
|
|
253
|
+
|
|
254
|
+
|
|
241
255
|
def _utf8_stdio() -> None:
|
|
242
256
|
"""The CLI speaks UTF-8 on every pipe; on Windows a pipe defaults to the ANSI code page, which turns a curly quote into a lone surrogate."""
|
|
243
257
|
for stream in (sys.stdin, sys.stderr):
|
|
@@ -265,6 +279,8 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
265
279
|
return _token(out)
|
|
266
280
|
if cmd == "probe":
|
|
267
281
|
return _probe(out)
|
|
282
|
+
if cmd == "suggest":
|
|
283
|
+
return _suggest(out)
|
|
268
284
|
if cmd == "copilot-gateway":
|
|
269
285
|
from .copilot_gateway import main as copilot_gateway
|
|
270
286
|
|