Community코딩 & 개발github.com

webapp-testing

로컬 웹 애플리케이션을 테스트하고 상호작용하기 위한 Playwright 기반 도구 키트입니다. 프론트엔드 기능 검증, UI 동작 디버깅, 브라우저 스크린샷 캡처, 브라우저 로그 보기를 지원합니다.

webapp-testing란 무엇인가요?

이 스킬은 개발자와 AI 에이전트(예: Claude Code, Cursor, Codex)가 로컬 웹 애플리케이션을 테스트할 수 있도록 돕는 Playwright 기반 도구 키트입니다. `scripts/with_server.py` 헬퍼 스크립트를 통해 하나 이상의 서버(예: 프론트엔드와 백엔드)의 라이프사이클을 자동으로 관리하며, 사용자는 Playwright 자동화 스크립트에만 집중할 수 있습니다. 정적 HTML과 동적 웹앱을 구분하는 의사 결정 트리를 제공하여, 정적 HTML은 파일을 직접 읽어 선택자를 식별하고, 동적 앱은 서버 실행 여부에 따라 스크립트를 실행하거나 정찰 후 행동(reconnaissance-then-action) 패턴을 사용합니다. 이 패턴은 `networkidle` 상태를 기다린 후 DOM을 검사하고 스크린샷을 찍어 선택자를 식별한 후 UI 상호작용을 수행합니다. 또한 번들 스크립트를 블랙박스로 사용하여 컨텍스트 창을 오염시키지 않고 복잡한 워크플로를 안정적으로 처리하도록 권장합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-claude-skills/tree/master/webapp-testing

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

웹 애플리케이션 테스트

로컬 웹 애플리케이션을 테스트하려면 네이티브 Python Playwright 스크립트를 작성하세요.

사용 가능한 헬퍼 스크립트:

  • scripts/with_server.py - 서버 라이프사이클 관리 (여러 서버 지원)

항상 스크립트를 --help와 함께 먼저 실행하여 사용법을 확인하세요. 사용자 정의 솔루션이 절대적으로 필요하다는 것을 확인한 후에야 소스 코드를 읽으세요. 이 스크립트들은 매우 커서 컨텍스트 창을 오염시킬 수 있습니다. 컨텍스트 창에 포함시키기보다는 블랙박스 스크립트로 직접 호출하도록 설계되었습니다.

접근 방식 선택을 위한 의사 결정 트리

사용자 작업 → 정적 HTML인가?
    ├─ 예 → HTML 파일을 직접 읽어 선택자 식별
    │         ├─ 성공 → 선택자를 사용하여 Playwright 스크립트 작성
    │         └─ 실패/불완전 → 동적으로 간주 (아래 참조)
    │
    └─ 아니요 (동적 웹앱) → 서버가 이미 실행 중인가?
        ├─ 아니요 → 실행: python scripts/with_server.py --help
        │              그런 다음 헬퍼를 사용하고 단순화된 Playwright 스크립트 작성
        │
        └─ 예 → 정찰 후 행동:
            1. 탐색 및 networkidle 대기
            2. 스크린샷 촬영 또는 DOM 검사
            3. 렌더링된 상태에서 선택자 식별
            4. 발견된 선택자로 작업 수행

예시: with_server.py 사용법

서버를 시작하려면 먼저 --help를 실행한 후 헬퍼를 사용하세요:

단일 서버:

python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.py

여러 서버 (예: 백엔드 + 프론트엔드):

python scripts/with_server.py \
  --server "cd backend && python server.py" --port 3000 \
  --server "cd frontend && npm run dev" --port 5173 \
  -- python your_automation.py

자동화 스크립트를 만들 때는 Playwright 로직만 포함하세요 (서버는 자동으로 관리됨):

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True) # 항상 headless 모드로 chromium 실행
    page = browser.new_page()
    page.goto('http://localhost:5173') # 서버가 이미 실행 및 준비됨
    page.wait_for_load_state('networkidle') # 중요: JavaScript 실행을 기다림
    # ... 자동화 로직
    browser.close()

정찰 후 행동 패턴

  1. 렌더링된 DOM 검사:

    page.screenshot(path='/tmp/inspect.png', full_page=True)
    content = page.content()
    page.locator('button').all()
    
  2. 검사 결과에서 선택자 식별

  3. 발견된 선택자를 사용하여 작업 수행

일반적인 함정

❌ 하지 마세요 - 동적 앱에서 networkidle을 기다리기 전에 DOM 검사 ✅ 하세요 - 검사 전에 page.wait_for_load_state('networkidle')을 기다리세요

모범 사례

  • 번들 스크립트를 블랙박스로 사용 - 작업을 수행할 때 scripts/ 폴더에 있는 스크립트가 도움이 될 수 있는지 고려하세요. 이 스크립트들은 일반적이고 복잡한 워크플로를 안정적으로 처리하며 컨텍스트 창을 오염시키지 않습니다. --help를 사용하여 사용법을 확인한 후 직접 호출하세요.
  • sync_playwright()를 동기 스크립트에 사용하세요.
  • 작업이 끝나면 항상 브라우저를 닫으세요.
  • 설명적인 선택자 사용: text=, role=, CSS 선택자, 또는 ID.
  • 적절한 대기 추가: page.wait_for_selector() 또는 page.wait_for_timeout().

참고 파일

  • examples/ - 일반적인 패턴을 보여주는 예시:
    • element_discovery.py - 페이지에서 버튼, 링크, 입력 필드 발견
    • static_html_automation.py - 로컬 HTML을 위한 file:// URL 사용
    • console_logging.py - 자동화 중 콘솔 로그 캡처

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

agent-mail-automation

Automate Agent Mail tasks via Rube MCP (Composio). Always search tools first for current schemas.

agentql-automation

Automate Agentql tasks via Rube MCP (Composio). Always search tools first for current schemas.

agenty-automation

Automate Agenty tasks via Rube MCP (Composio). Always search tools first for current schemas.

관련 스킬