Generation Agents
The five agents that form the test generation pipeline — from crawling your live app to producing reviewed, ready-to-run pytest scripts.
For a detailed description of how these agents interact as a pipeline, see Generation Pipeline. This page documents each agent's individual behaviour and configuration.
AppExplorer
Purpose: Crawls the live application and captures selector and structure data for every page or endpoint referenced in the Knowledge Base.
What it does:
- Launches a headless Chromium browser and navigates to each page listed in KB domain base URLs
- Discovers interactive elements (inputs, buttons, links, forms, selects)
- Records multiple selector strategies per element (data-testid, ARIA role, text, CSS, XPath)
- For API modules: probes API endpoints and records response shapes
- Stores output as structured JSON selector maps per domain
Re-run AppExplorer only: Navigate to Project → Generation → AppExplorer → Re-run after UI changes to refresh selector maps without regenerating scripts.
DocGen
Purpose: Converts KB scenarios into structured test case documents that serve as the specification for ScriptGen.
What it does:
- Reads each KB scenario (steps, expected outcomes, priority, tags)
- Combines with AppExplorer selector data to infer element interactions
- Generates a Markdown test case document with explicit test setup, actions, and assertions
- Assigns unique test case IDs following the configured numbering convention
DocReview
Purpose: Quality-gates DocGen output before code is written, catching gaps and ambiguities early.
Checks performed:
- All required document fields are present and non-empty
- Steps and expected outcomes are internally consistent
- Referenced DOM selectors exist in AppExplorer output
- Assertions are specific enough for ScriptGen to produce meaningful code
Passing documents are forwarded to ScriptGen. Failing documents are retried once automatically; persistent failures enter the Approvals queue as rejected items with the specific failure reason.
ScriptGen
Purpose: Converts approved test case documents into executable pytest test scripts.
What it produces:
- Python pytest files using Playwright (Web UI) or HTTPX (API) as the testing library
- One test function per scenario ID
- Fixtures for authentication, environment configuration, and base URL injection
- Assertions derived from the expected outcomes in the test case document
ScriptReview
Purpose: Validates generated scripts before they reach the Approvals queue.
Checks performed:
- Python syntax validity — scripts are parsed and any syntax errors are reported
- Selector existence — verifies referenced locators exist in current AppExplorer maps
- Assertion presence — each test function must contain at least one assertion
- Import validity — checks that all used fixtures and imports are resolvable
Passing scripts are sent to the Approvals queue. Failing scripts trigger one automatic ScriptGen retry; persistent failures go to Approvals as rejected items.
All five generation agents are visible in Agent Activities during a generation run. You can monitor progress in real time and see which stage each domain or scenario is currently in.