Post-Run Agents
Five AI agents that run automatically after every test execution to classify failures, detect regressions, and keep your test suite healthy.
Overview
Post-run agents are triggered automatically when a test run completes. They operate in parallel on the run results and produce actionable outputs — bug tracker entries, alerts, coverage reports, and healing patches — within minutes of run completion. You don't need to trigger them manually.
| Agent | Trigger | Primary output |
|---|---|---|
| ResultAnalyzer | After every run | Failure classification (Bug / Script / Flaky / Environment) |
| RegressionGuard | After every run | Regression alert with suspect commit/version |
| CoverageGap | After every run | Coverage % per domain, list of untested scenarios |
| FlakyDetector | When ResultAnalyzer flags Flaky | Stability score, locator instability flag |
| LocatorHealer | On locator failure or FlakyDetector signal | Healing patch queued in Approvals |
ResultAnalyzer
ResultAnalyzer processes every failed test in the run and classifies the failure into one of four categories:
- Product Bug — the application behaviour does not match the expected outcome. A bug tracker entry is created automatically.
- Script Error — the test script has an issue (e.g. stale selector, wrong assertion). The script is flagged for regeneration.
- Flaky — the test passed in a previous run but failed now with no clear application change. Forwarded to FlakyDetector.
- Environment Issue — the failure is attributed to infrastructure (timeout, missing dependency). Flagged with environment context.
For Product Bug classifications, ResultAnalyzer creates a structured bug entry in the Bug Tracker module (if enabled) with the failed test ID, steps, assertion failure, and screenshot.
RegressionGuard
RegressionGuard compares the pass/fail pattern of the current run against the immediately preceding run. It raises a regression alert when:
- A test that passed in the previous run fails in the current run
- A new test scenario fails on its first run (no baseline established)
- Multiple tests in the same domain fail together, suggesting a domain-level change
Regression alerts include the suspected commit or deployment version (derived from the CI/CD context passed at run trigger time), the affected test IDs, and a diff of the pass/fail count.
CoverageGap
CoverageGap cross-references all KB scenarios against the test IDs present in the active test suite. After each run it reports:
- Coverage percentage per domain (scenarios with tests ÷ total scenarios)
- List of KB scenario IDs that have no corresponding test script
- Suggestion to trigger the generation pipeline for uncovered scenarios
CoverageGap outputs are visible in the Coverage tab of the run results view and in the dashboard's coverage summary widget.
FlakyDetector
FlakyDetector is triggered when ResultAnalyzer flags one or more tests as Flaky. It analyses the last 5 run histories for each flagged test and computes a stability score between 0 and 1. Tests scoring below the threshold (default 0.75) are marked as unstable.
If the instability pattern correlates with DOM selector changes (detected by comparing AppExplorer snapshots), FlakyDetector raises a locator instability flag and queues LocatorHealer automatically.
LocatorHealer
LocatorHealer is triggered when a test fails with a locator-related error or when FlakyDetector raises a locator instability flag. It:
- Launches a headless Chromium session and navigates to the affected page
- Attempts to re-discover the target element using alternative selector strategies (role, text, data-testid, CSS, XPath)
- Scores candidate selectors by stability and uniqueness
- Generates a healing patch — a script update replacing the broken selector with the best candidate
- Queues the patch in Approvals with the confidence score and selector comparison
LocatorHealer patches require human approval before being applied to the test suite. This ensures a QA engineer reviews the proposed selector change before it is committed.
Viewing agent outputs
All post-run agent outputs are accessible from the run results view under the Agent Activity tab. You can see which agents ran, their status, the time taken, and drill into each agent's detailed output. Pending approvals generated by agents appear in Approvals → From Agents.