Back to list
hotyanovicha

test

by hotyanovicha

0🍴 0📅 Jan 22, 2026

SKILL.md


name: test description: Run Playwright tests with various options (specific file, all UI tests, debug mode, headed browser, tagged tests). Use when user asks to run tests, execute tests, test something, or debug tests. allowed-tools: Bash(npx:), Bash(playwright:), Read, Grep

Test Execution

Usage Patterns

1. Run Specific Test File

# Single spec file
npx playwright test tests/ui/basket.spec.ts

# With specific test name
npx playwright test tests/ui/basket.spec.ts -g "Remove product from cart"

2. Run All UI Tests

# All tests in ui directory
npx playwright test tests/ui/

# All tests
npx playwright test

3. Run Tagged Tests

# Run P1 priority tests
npx playwright test --grep @P1

# Run P2 priority tests
npx playwright test --grep @P2

4. Debug Mode

# Debug specific test (opens Playwright Inspector)
npx playwright test tests/ui/basket.spec.ts --debug

# Debug with specific test name
npx playwright test tests/ui/basket.spec.ts -g "Add product" --debug

5. Headed Mode (See Browser)

# Run with visible browser
npx playwright test tests/ui/basket.spec.ts --headed

# Slow down execution for visibility
npx playwright test tests/ui/basket.spec.ts --headed --slow-mo=1000

6. Run on Specific Browser

# Chromium only
npx playwright test --project=chromium

# Run setup manually
npx playwright test --project=setup

7. Update Snapshots

# Update all snapshots
npx playwright test --update-snapshots

# Update specific test snapshots
npx playwright test tests/ui/basket.spec.ts --update-snapshots

Common Options

OptionDescription
--headedShow browser window
--debugOpen Playwright Inspector
--uiOpen Playwright UI mode (interactive)
-g "pattern"Run tests matching pattern
--grep @P1Run tests with @P1 tag
--project=chromiumRun on specific browser
--workers=1Run tests serially (for debugging)
--reporter=listUse list reporter (verbose)
--trace onRecord trace for all tests

Interactive UI Mode

# Open Playwright UI (best for development)
npx playwright test --ui

After Test Execution

  1. Check results in console output
  2. If failures occur:
    • Read error messages
    • Check screenshots in playwright-report/
    • Offer to open HTML report: npx playwright show-report
  3. Summarize: passed/failed/skipped counts

Troubleshooting

If auth setup fails:

# Run setup separately
npx playwright test tests/auth.setup.ts

If parallel execution causes issues:

# Run serially
npx playwright test --workers=1

Clear test artifacts:

# Remove auth files
rm -rf .auth/

# Remove reports
rm -rf playwright-report/ test-results/

Best Practices

  • Use --headed for visual debugging
  • Use --debug to step through test actions
  • Use --ui for interactive test development
  • Run with --workers=1 when debugging race conditions
  • Check HTML report after failures for detailed diagnostics

Score

Total Score

40/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon