Loading...
Loading...
Expert in designing robust test frameworks using Playwright, Cypress, and AI-driven testing tools.
npx skill4agent add 404kidwiz/claude-supercode-skills test-automator| Requirement | Tool Recommendation | Why? |
|---|---|---|
| Modern Web (React/Vue) | Playwright | Fastest, reliable locators, multi-tab support. |
| Legacy / Simple | Cypress | Great DX, but slower and single-tab limit. |
| Visual Testing | Percy / Chromatic | Pixel-perfect diffs (SaaS). |
| Mobile Native | Appium / Maestro | Real device automation. |
| Component Testing | Playwright CT / Vitest | Render components without full app stack. |
devops-engineernpm init playwright@latest
# Select: TypeScript, GitHub Actions, Install Browsersplaywright.config.tsimport { 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',
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry',
video: 'retain-on-failure',
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
],
});tests/login.spec.tsimport { test, expect } from '@playwright/test';
test('has title', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(/My App/);
});
test('login flow', async ({ page }) => {
await page.goto('/login');
await page.getByLabel('Email').fill('user@example.com');
await page.getByLabel('Password').fill('password');
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page).toHaveURL('/dashboard');
});test('create user via API', async ({ request }) => {
const response = await request.post('/api/users', {
data: {
name: 'Test User',
email: `test-${Date.now()}@example.com`
}
});
expect(response.ok()).toBeTruthy();
const body = await response.json();
expect(body.id).toBeDefined();
});strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4]
shardTotal: [4]npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}blob-reportnpx playwright merge-reports --reporter html ./all-blob-reportsawait page.waitForTimeout(5000);await expect(locator).toBeVisible();await page.waitForURL()page.locator('.btn-primary')getByRole('button', { name: 'Submit' })getByLabel('Email')getByTestId('submit-btn')main