62 / 168 · 01 Agent Skills for Browser Automation · Hybrid Strategies: Using Skills and MCP Together← prev⊞ allnext →☰ Read as one page
9.4Strategy 3: Different Tools for Different Test Types
The Pattern
| Test Type | Primary Tool | Why |
|---|---|---|
| Functional tests | CLI (playwright-cli) |
Known flows, ref-driven, fast |
| Accessibility audits | CLI snapshot (YAML a11y tree) |
The snapshot is an accessibility summary — grep it, reason over it |
| Visual regression | CLI + screenshot |
Files on disk, compared without entering context |
| Exploratory testing | CLI snapshot + agent reasoning |
Discovery is a read away |
| Sandboxed / hosted agents | Playwright MCP | No filesystem — inline state is the only option |
| API integration checks | CLI + eval |
playwright-cli eval for XHR/state inspection |
| Performance checks | CLI + eval |
playwright-cli eval "JSON.stringify(performance.timing)" |
Configuration
# test-framework-config.yaml
test_types:
functional:
tool: playwright-cli
session: per-test # fresh named session per test
headed: false
accessibility:
tool: playwright-cli
artifacts: snapshots # keep YAML snapshots for audit
visual:
tool: playwright-cli
screenshots: true
comparison_threshold: 0.98
hosted_exploratory:
tool: playwright-mcp # sandboxed surface, no filesystem
snapshot_mode: full