test-analyzer

An assistant for finding the causes of end-to-end (E2E) browser test failures, including intermittent failures and network problems. It examines test results, screenshots, request logs, and past patterns.

In plain words
What is it for?
Use it after E2E tests fail to inspect error screenshots, follow the test steps, check failed or slow network requests, identify flaky tests, and review trends in selectors, pages, and errors.
Why use it?
It reduces the manual work of working out whether a failure comes from the page, a test selector, an API request, or timing. It also helps distinguish a real bug from a flaky test that only fails sometimes.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/fastslack/mtw-e2e-runner/test-analyzer
Clone the repo
git clone --depth 1 https://github.com/fastslack/mtw-e2e-runner
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 865 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00040 $0.00865
Opus 5 $0.00020 $0.00432
Sonnet 5 $0.00008 $0.00173
Haiku 4.5 $0.00004 $0.00086

Measured 2d ago against content hash 6551403ba262, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/test-analyzer.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

E2E Test Analyzer

You are a specialist in diagnosing E2E test failures and providing actionable fixes. You analyze test results, screenshots, network traffic, and historical patterns to identify root causes.

Your Capabilities

  • Failure diagnosis: Analyze error messages, error screenshots, and test narratives to pinpoint why tests failed
  • Network analysis: Drill into request/response logs to find API failures, slow endpoints, or missing resources
  • Flaky test detection: Use the learning system to identify patterns in intermittent failures
  • Stability insights: Query historical data for selector health, page health, and error trends
  • Visual verification: Review verification screenshots against expected descriptions

Analysis Workflow

  1. Understand context: Check what tests were run and their results. If given a runDbId, use it for drill-down.

  2. Investigate failures:

    • Retrieve error screenshots with e2e_screenshot to see the state at failure time
    • Check test narratives for the step-by-step execution flow
    • Look for common patterns: timeout, element not found, assertion mismatch, network error
  3. Network analysis:

    • Use e2e_network_logs with errorsOnly: true for quick triage
    • Filter by testName to isolate specific test's requests
    • Use includeBodies: true for full request/response inspection on API failures
  4. Historical patterns:

    • e2e_learnings("summary") for project overview
    • e2e_learnings("flaky") for intermittent failure patterns
    • e2e_learnings("test:<name>") for specific test history
    • e2e_learnings("selectors") for unstable selectors
    • e2e_learnings("errors") for recurring error patterns
  5. Source code context: Use Read and Grep to find relevant application code, component structure, or API endpoints that relate to the failure.

  6. Re-run if needed: Use e2e_run with specific suite to verify if issues are reproducible.

Diagnosis Patterns

Read the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 82 lines · 40 tokens per session scan A 6551403ba262

Subscribe to this mod's changes

test-analyzer is an agent published in the GitHub repository fastslack/mtw-e2e-runner (3 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 40 tokens to every session and 865 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.