본문으로 건너뛰기
Skillpedia
테스트33k · #8787

playwright-e2e-builder

하는 일

이 스킬은 AI 에이전트가 Playwright로 브라우저 테스트 모음을 만드도록 돕습니다. 가입이나 결제 같은 핵심 사용자 흐름에 자동 테스트를 원하는 개발자를 위한 것입니다.

사용하는 경우

  • ✓기존 프로젝트에 Playwright를 처음부터 설정하고 싶을 때.
  • ✓가입이나 결제 같은 핵심 사용자 흐름에 종단 간 테스트가 필요할 때.
  • ✓Playwright 테스트를 샤딩과 재시도가 있는 CI에서 실행하려는 경우.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/playwright-e2e-builder/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/playwright-e2e-builder/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“가입과 결제 흐름을 위한 Playwright 테스트를 설정하고 GitHub Actions에서 실행해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 먼저 프로젝트의 프레임워크, 라우트, 로그인 흐름을 살펴보고 질문하며 계획합니다. 그다음 페이지 객체 패턴과 저장된 인증 상태를 사용해 테스트를 만듭니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Playwright E2E Test Suite Builder

When to use

Use this skill when you need to:

  • Set up Playwright from scratch in an existing project
  • Build E2E tests for critical user flows (signup, checkout, dashboards)
  • Implement Page Object Model for maintainable test architecture
  • Configure authentication state persistence across tests
  • Set up visual regression testing with screenshots
  • Integrate Playwright into CI/CD with sharding and retries

Phase 1: Explore (Plan Mode)

Enter plan mode. Before writing any tests, explore the existing project:

Project structure

  • Find the tech stack: is this React, Next.js, Vue, SvelteKit, or another framework?
  • Check if Playwright is already installed (playwright.config.ts, @playwright/test in package.json)
  • Look for existing test directories (e2e/, tests/, __tests__/)
  • Check for existing E2E tests in Cypress, Selenium, or other frameworks (migration context)
  • Find the dev server command and port (npm run dev, next dev, etc.)

Application structure

  • Identify the main routes/pages (look at router config, pages directory, or route files)
  • Find authentication flow (login page URL, auth API endpoints, token storage)
  • Check for test IDs in components (data-testid, data-test, data-cy attributes)
  • Look for API routes that tests might need to seed data through
  • Check .env files for test-specific environment variables

CI/CD

  • Check for existing CI config (.github/workflows/, .gitlab-ci.yml, Jenkinsfile)
  • Look for Docker or docker-compose setup (useful for consistent test environments)
  • Check if there's a staging/preview environment URL pattern

Phase 2: Interview (AskUserQuestion)

Use AskUserQuestion to clarify requirements. Ask in rounds.

Round 1: Scope and critical flows

Question: "What are the critical user flows to test?"
Header: "Flows"
multiSelect: true
Options:
  - "Authentication (signup, login, logout, password reset)" — Core auth flows
  - "Core CRUD (create, read, update, delete main resources)" — Primary data operations
  - "Checkout/payments (cart, billing, confirmation)" — E-commerce or payment flows
  - "Dashboard/admin (data views, filters, exports)" — Admin panel interactions
Question: "How many pages/routes does the application have approximately?"
Header: "App size"
Options:
  - "Small (< 10 routes)" — Landing page, auth, a few feature pages
  - "Medium (10-30 routes)" — Multiple feature areas, settings, profiles
  - "Large (30+ routes)" — Complex app with many sections and user roles

Round 2: Authentication strategy for tests

Question: "How does your app handle authentication?"
Header: "Auth type"
Options:
  - "Cookie/session based (Recommended)" — Server sets httpOnly cookies after login
  - "JWT in localStorage" — Token stored in browser localStorage
  - "OAuth/SSO (Google, GitHub, etc.)" — Third-party auth provider redirect flow
  - "No auth (public app)" — No login required

Question: "How should tests authenticate?"
Header: "Test auth"
Options:
  - "Login via UI once, reuse state (Recommended)" — storageState pattern: login in setup, share cookies across tests
  - "API login in beforeEach" — Call auth API directly before each test, skip UI login
  - "Seed auth token in fixtures" — Inject pre-generated tokens, no login flow needed
  - "Test login UI every time" — Actually test the login form in each test suite

Round 3: Test data and environment

Question: "How should test data be managed?"
Header: "Test data"
Options:
  - "API seeding in fixtures (Recommended)" — Call API endpoints to create/clean test data before each test
  - "Database seeding (direct SQL)" — Run SQL scripts or ORM commands to populate test database
  - "Shared test environment (pre-populated)" — Tests run against a persistent staging environment with existing data
  - "Mock API responses" — Intercept network requests and return mock data

Question: "What environment do E2E tests run against?"
Header: "Environment"
Options:
  - "Local dev server (Recommended)" — Start dev server before tests, run against localhost
  - "Preview/staging URL" — Run against a deployed preview or staging environment
  - "Docker Compose stack" — Full stack in containers, tests run outside or inside

Round 4: CI and parallelization

Question: "How should tests run in CI?"
Header: "CI"
Options:
  - "GitHub Actions (Recommended)" — Native Playwright support with sharding
  - "GitLab CI" — Docker-based ru
자주 묻는 질문

바로 테스트 작성을 시작하나요?

아니요. 에이전트는 먼저 프로젝트를 살펴보고 계획하며, 테스트를 쓰기 전에 질문합니다.

시각 테스트도 다루나요?

네. 스크린샷으로 시각 회귀 테스트를 설정할 수 있습니다.

테스트를 병렬로 실행할 수 있나요?

네. 계획에는 병렬화와 CI 샤딩이 포함됩니다.

상세 정보

작성자의 원본 설명

Plan and build comprehensive Playwright E2E test suites with Page Object Model, authentication state persistence, custom fixtures, visual regression, and CI integration. Uses interview-driven planning to clarify critical user flows, auth strategy, test data approach, and parallelization before writing any tests.

repo: davila7/claude-code-templates

인기도

GitHub 스타
33k
순위
#8787
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬