본문으로 건너뛰기
cccskills
무료GitHub에 공개

e2e-testing-standards

End-to-end testing with Playwright - browser automation, visual regression, test data management.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(5)

  • SKILL.md4.8 KB
  • resources/fixtures-helpers.md2.4 KB
  • resources/page-objects.md2.5 KB
  • resources/test-patterns.md6.0 KB
  • resources/testkube.md1.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

E2E Testing Skill

Dynamic path: All paths below use components/<testing-component>/ as a placeholder. The actual directory depends on the testing component defined in sdd/sdd-settings.yaml. Delegate to the techpack-settings skill for directory path resolution — it maps component type (testing) + name to a filesystem path (e.g., type=testing, name=e2e → components/testing-e2e/).

Full browser automation tests that verify complete user journeys. E2E tests run in Kubernetes via Testkube with Playwright.


Overview

AspectDetails
Locationcomponents/<testing-component>/tests/e2e/ and e2e/
FrameworkPlaywright
ExecutorTestkube
Runs InKubernetes cluster
Written ByTester agent

Test Structure

Directory Organization

components/<testing-component>/tests/e2e/
├── tests/
│   ├── auth/
│   │   ├── login.spec.ts
│   │   └── logout.spec.ts
│   ├── planning/
│   │   ├── create-plan.spec.ts
│   │   └── edit-plan.spec.ts
│   └── admin/
│       └── user-management.spec.ts
├── pages/
│   ├── login.page.ts
│   ├── dashboard.page.ts
│   └── plan-editor.page.ts
├── fixtures/
│   ├── users.ts
│   └── plans.ts
├── helpers/
│   ├── auth.ts
│   └── api.ts
└── playwright.config.ts

Playwright Configuration

// components/<testing-component>/tests/e2e/playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  testDir: './tests',
  fullyParallel: true,
  forbidOnly: !!process.env.CI,
  retries: process.env.CI ? 2 : 0,
  workers: process.env.CI ? 1 : undefined,
  reporter: [
    ['html', { open: 'never' }],
    ['json', { outputFile: 'test-results/results.json' }],
  ],
  use: {
    baseURL: process.env.APP_URL || 'http://webapp:5173',
    trace: 'on-first-retry',
    screenshot: 'only-on-failure',
    video: 'on-first-retry',
  },
  projects: [
    {
      name: 'chromium',
      use: { ...devices['Desktop Chrome'] },
    },
    {
      name: 'firefox',
      use: { ...devices['Desktop Firefox'] },
    },
    {
      name: 'mobile',
      use: { ...devices['iPhone 13'] },
    },
  ],
});

Resource Files

For detailed guidance, read these on-demand:


Test Attributes

Add data-testid attributes to components for reliable selectors:

// Component with test attributes
export const LoginForm = () => {
  return (
    <form data-testid="login-form">
      <input data-testid="email-input" type="email" name="email" />
      <input data-testid="password-input" type="password" name="password" />
      <button data-testid="login-button" type="submit">
        Login
      </button>
      <div data-testid="error-message" className="error">
        {error}
      </div>
    </form>
  );
};

Rules

  • User journey focus - Test complete workflows, not isolated features
  • Page Object Model - Encapsulate page interactions in page objects
  • Test isolation - Each test must be independent
  • Cleanup after tests - Remove created data via API
  • Avoid flaky tests - Use proper waits, not arbitrary sleeps
  • Reference spec and issue - Use @spec and @issue JSDoc tags
  • Given/When/Then structure - Clear test organization
  • Use data-testid - Reliable selectors that survive UI changes
  • Screenshot on failure - Capture state for debugging
  • Reasonable timeouts - Configure appropriate timeouts

Summary Checklist

Before committing E2E tests, verify:

  • Tests use Page Object Model
  • @spec and @issue tags present in file header
  • Each acceptance criterion has corresponding tests
  • Tests follow Given/When/Then structure
  • data-testid attributes used for selectors
  • Test data created via API, not UI (faster)
  • Cleanup happens in afterEach/afterAll
  • No hardcoded waits (use Playwright's auto-waiting)
  • Screenshots configured for failures
  • Testkube YAML definition created/updated
  • Tests run successfully via testkube run test
  • Visual regression baselines committed if used

Input / Output

This skill defines no input parameters or structured output.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Standards for authoring SDD plugin agents — frontmatter, self-containment, skill references, and no-user-interaction rules.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Scaffolds Node.js/TypeScript backend components with CMDO architecture, driven by component settings.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

CMDO architecture standards for Node.js/TypeScript backends with strict layer separation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Intent-to-command mappings for fullstack-typescript tech pack features.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Create change specification and implementation plan with dynamic phase generation. Supports feature, bugfix, refactor, and epic types.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

Orchestrates the full change lifecycle — routes actions to phase-specific sub-files.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LiorCohen/sdd432026년 2월 24일 업데이트

LiorCohen의 스킬 모두 보기

이 스킬의 문제 신고