e2e-testing-patterns – skill Lập trình cho agent AI
Xây dựng bộ kiểm thử end-to-end đáng tin cậy, nhanh và dễ bảo trì, giúp tự tin phát hành code nhanh và phát hiện lỗi hồi quy trước khi người dùng gặp phải.
Cài skill e2e-testing-patterns bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/e2e-testing-patterns-2acde.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /e2e-testing-patterns – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/e2e-testing-patterns-2acde.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $e2e-testing-patterns – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/e2e-testing-patterns-2acde.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /e2e-testing-patterns – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/e2e-testing-patterns-2acde.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /e2e-testing-patterns – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
E2E Testing Patterns
Build reliable, fast, and maintainable end-to-end test suites that provide confidence to ship code quickly and catch regressions before users do.
Use this skill when
- Implementing end-to-end test automation
- Debugging flaky or unreliable tests
- Testing critical user workflows
- Setting up CI/CD test pipelines
- Testing across multiple browsers
- Validating accessibility requirements
- Testing responsive designs
- Establishing E2E testing standards
Do not use this skill when
- You only need unit or integration tests
- The environment cannot support stable UI automation
- You cannot provision safe test accounts or data
Instructions
1. Identify critical user journeys and success criteria.
2. Build stable selectors and test data strategies.
3. Implement isolated tests with observable assertions and tracing; diagnose retries rather than counting a retry as an ordinary pass.
4. Run in CI with parallelization and artifact capture.
Safety
- Avoid running destructive tests against production.
- Use dedicated test data and scrub sensitive output.
Resources
resources/implementation-playbook.mdfor detailed E2E patterns and templates.
Worked example
Input: invalid login sometimes appears successful because the test reads the error before rendering finishes. Use a dedicated fixture account and assert await expect(page.getByRole('alert')).toContainText('Invalid credentials'). Run the test without retries and confirm the dashboard remains inaccessible. Expected: the failure state is observed reliably; a delayed error cannot silently pass.
Inputs and prerequisites
An authorized test URL, isolated accounts/data, the installed browser runner and known success/failure states. The playbook uses project-specific routes and adapters; install only the dependencies your existing suite needs.
Limitations
- A mocked backend or payment provider proves only the mocked boundary; retain separate real integration checks.
- Automated accessibility scans miss interaction and assistive-technology problems.
- Retries, larger timeouts and updated snapshots can hide regressions; preserve first-failure evidence.
- Browser tooling cannot validate a locked or unavailable interactive environment. Report that gap and continue independent tests.
Skill liên quan
- stripe-link-cli – Thanh toán cho agent qua Stripe Link — thẻ, SPT, phê duyệt.
- torchdrug – Xây dựng và khắc phục sự cố quy trình TorchDrug 0.2.1 cho đồ thị phân tử, dự đoán thuộc…
- ebpf-observability – Dùng eBPF để quan sát sâu ở mức kernel — theo dõi syscall, luồng mạng và hành vi ứng…
- edr-bypass-re – Xem xét telemetry EDR và các nhóm kỹ thuật né tránh phòng thủ đã biết, dùng bằng chứng…
- pw – Bộ công cụ kiểm thử Playwright chuẩn production. Dùng khi người dùng nhắc đến test…
- pw-init – Thiết lập Playwright trong dự án. Dùng khi người dùng nói “thiết lập playwright”, “thêm…
- electron-development – Làm chủ phát triển ứng dụng desktop Electron với IPC an toàn, contextIsolation, preload…
- elixir – Hướng dẫn mã nguồn chuyên biệt cho Elixir.