test-engineer
БесплатноБез исполняемых скриптовНе проверенAutomated E2E testing with Playwright including the auto-fix loop — generate test cases from the UI, run them, fix failures and re-run until passing, then…
от wasintoh★ 99 звёзд на GitHubОб этом скилле
Test Engineer Skill
Overview
Skill for automated testing with Playwright, including auto-fix loop capability.
Core Philosophy
"Test until it passes, not just test and report"
- Auto-Generate Tests - Generate test cases from UI automatically
- Auto-Fix Loop - If fails, fix and re-test until passing
- Human-Readable Reports - Easy to understand reports
- Language-Adaptive - Error messages adapt to project language setting
Tech Stack
| Tool | Purpose |
|---|---|
| Playwright | E2E Testing |
| @playwright/test | Test Runner |
| playwright-report | HTML Reports |
Setup
1. Install Playwright
npm install -D @playwright/test
npx playwright install
2. Config File
Create 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'],
['list']
],
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'Mobile Chrome',
use: { ...devices['Pixel 5'] },
},
],
webServer: {
command: 'npm run dev',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
timeout: 120 * 1000,
},
})
3. Test Directory Structure
tests/
├── auth/
│ ├── login.spec.ts
│ └── register.spec.ts
├── dashboard/
│ └── dashboard.spec.ts
├── products/
│ ├── list.spec.ts
│ └── detail.spec.ts
├── checkout/
│ └── flow.spec.ts
└── fixtures/
└── test-data.ts
Test Generation Patterns
Pattern 1: Page Render Test
Every page must have a test to verify correct rendering:
import { test, expect } from '@playwright/test'
test.describe('Products Page', () => {
test('should render correctly', async ({ page }) => {
await page.goto('/products')
// Check title
await expect(page).toHaveTitle(/Products/)
// Check main heading
await expect(
page.getByRole('heading', { name: 'All Products' })
).toBeVisible()
// Check key elements exist
await expect(page.getByTestId('product-grid')).toBeVisible()
await expect(page.getByRole('searchbox')).toBeVisible()
})
})
Pattern 2: Form Validation Test
Every form must have validation tests:
test.describe('Register Form', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/register')
})
test('should show validation errors for empty fields', async ({ page }) => {
// Click submit without filling
await page.getByRole('button', { name: 'Register' }).click()
// Check error messages
await expect(page.getByText('Name is required')).toBeVisible()
await expect(page.getByText('Email is required')).toBeVisible()
await expect(page.getByText('Password is required')).toBeVisible()
})
test('should validate email format', async ({ page }) => {
await page.getByLabel('Email').fill('invalid-email')
await page.getByRole('button', { name: 'Register' }).click()
await expect(page.getByText('Invalid email format')).toBeVisible()
})
test('should validate password strength', async ({ page }) => {
await page.getByLabel('Password').fill('123')
await page.getByRole('button', { name: 'Register' }).click()
await expect(page.getByText('Password must be at least 8 characters')).toBeVisible()
})
})
Pattern 3: User Flow Test
Test complete user journey:
test.describe('Checkout Flow', () => {
test('should complete purchase successfully', async ({ page }) => {
// Step 1: Browse products
await page.goto('/products')
await expect(page.getByTestId('product-card')).toHaveCount.greaterThan(0)
// Step 2: Add to cart
await page.getByTestId('product-card').first().click()
await page.getByRole('button', { name: 'Add to Cart' }).click()
await expect(page.getByTestId('cart-count')).toHaveText('1')
// Step 3: Go to cart
await page.getByTestId('cart-icon').click()
await expect(page).toHaveURL('/cart')
await expect(page.getByTestId('cart-item')).toHaveCount(1)
// Step 4: Checkout
await page.getByRole('button', { name: 'Checkout' }).click()
await expect(page).toHaveURL('/checkout')
// Step 5: Fill shipping info
await page.getByLabel('Full Name').fill('John Smith')
await page.getByLabel('Address').fill('123 Main Street')
await page.getByLabel('Phone').fill('555-123-4567')
// Step 6: Confirm order
await page.getByRole('button', { name: 'Confirm Order' }).click()
// Step 7: Success
await expect(page).toHaveURL(/\/order\//)
await expect(page.ge
Установить test-engineer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл test-engineer?
Automated E2E testing with Playwright including the auto-fix loop — generate test cases from the UI, run them, fix failures and re-run until passing, then produce a human-readable report. Test until it passes, not just test and report. Drives /toh-test; use whenever tests must be written, run, or made green.
Как установить скилл test-engineer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл test-engineer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic