e2e-testing
E2E testing - hybrid: e2e-test.js smoke checks + Playwright for flows, assertions, visual regression, Ollama AI analysis.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- e2e-testing
- triggers
- test, e2e, playwright, browser testing, interactive testing, form testing
- changelog
- docs/ciclos/cycle28-20260815.md
- description
- E2E testing - hybrid: e2e-test.js smoke checks + Playwright for flows, assertions, visual regression, Ollama AI analysis.
- token_budget
- 2732
03 SKILL.md 正文
When to Use
Browser-level verification of user flows: smoke, forms, login/dashboard, visual regression. Quick Mode = fast smoke; Full Mode = CI pipelines, assertions, screenshots.
Quick Mode (e2e-test.js CLI)
.\scripts\e2e-test.ps1 -Url "http://localhost:3000" -Actions "click:#login"
.\scripts\e2e-test.ps1 -Url "http://localhost:3000" -Actions "fill:#email=test,fill:#pass=test,click:#submit"
# or: node scripts/e2e-test.js --url http://localhost:3000 --actions "click:#login" --analyze
Actions: click:#sel · fill:#sel=value · type · select · wait:#sel/wait:1000 · screenshot:name.png.
Full Mode (Playwright Test Runner)
Structure: tests/e2e/login.spec.js, dashboard.spec.js.
const { test, expect } = require('@playwright/test');
test('login flow', async ({ page }) => {
await page.goto('http://localhost:3000');
await page.fill('#email', 'test');
await page.click('#submit');
await expect(page).toHaveURL(/dashboard/);
});
Run: npx playwright test · single file · --ui · show-report.
When to Use Which
| Scenario | Mode | Why |
|---|---|---|
| Quick smoke test | Simple | Fast, no setup |
| Form validation | Simple | Interactive actions |
| CI/CD pipeline | Full | Assertions, reporting |
| Visual regression | Full | Screenshot comparisons |
Requirements
Playwright: npm i -D playwright · Chromium: npx playwright install chromium · Ollama (optional): AI analysis.
Reference
Worked examples, testing patterns, edge cases, anti-patterns → docs/skills/e2e-testing/reference.md
Anti-Rationalization
| Rationalization | Red Flag | Verification |
|---|---|---|
| "Playwright para smoke que e2e-test.js cubre" | Full Playwright para smoke simple | Quick Mode e2e-test.ps1 para smoke; Full solo assertions/visual |
| "Flows sin assertions" | goto/click sin expect | Cada flow con expect(page).toHaveURL / toHaveScreenshot / assertions |
| "E2E sin viewport ni reporte" | Solo chromium desktop sin CI report | Multi-viewport + show-report + Chromium install verify |
Red Flags
- Doing work without checking output format → STOP, re-read skill
- Second occurrence of same rationalization → force RED zone
Verification
- Output matches skill ## Output contract + file:line citaton
- cross-ref-check.ps1 → SKILL.md OK
Refs
Cross-Refs: testing-strategy | api-testing
04 同仓库更多 Skills
web-quality-audit
Comprehensive web audit: performance, a11y, SEO, responsive, animation, design tokens.
ui-engine
UI system — Grid/Flexbox/@layer/:has(), container queries, compositor-only animation, OKLCH tokens, component patterns
baseline-ui
Anti-slop UI — layout, typography, responsive, animation, tokens. Use for cleanup or polish.
skill-creator
Create new AI agent skills following Agent Skills spec -- auto-bootstrap unknown tasks, define structure, register in AGENTS.md
senior-engineer
Apply senior engineering competencies — system design, trade-off analysis, delegation, mentoring, and tech debt strategy
prompt-engineering
Design effective prompts using SPEARS framework — scope, principles, examples, assertions, refinements, with ReAct and multi-agent patterns