Design robust Playwright E2E tests, CI pipelines, and flaky test mitigation.
The material appears to be a Playwright E2E testing patterns document/prompt with no declared secrets or fixed remote endpoints, and it comes from an open-source GitHub source with very high community adoption, so overall risk is low. The content does involve typical testing capabilities such as browser-driven execution, accessing target apps, and generating local reports/screenshots, but these are normal caution items rather than high-risk red flags.
The material and objective checks indicate no required keys or environment variables. There is no stated need for API tokens, account credentials, or embedding secrets into configuration, so credential exposure risk appears low.
No fixed remote endpoint is declared, but the examples use Playwright to access the target application and its APIs, such as a baseURL or /api/search; this is normal for E2E testing. The material does not show a specific red flag of exfiltrating data to unrelated third-party services.
Playwright testing inherently involves running test code locally or in CI and driving a browser, which is a standard capability for this category of tool. The material is mainly pattern/documentation oriented and does not show requests for excessive system privileges or a suspicious execution chain.
The examples write local test artifacts such as screenshots, traces, videos, and HTML/JUnit/JSON reports, which may contain page content or failure-state details; this is common test data persistence behavior. There is no stated access to sensitive system resources beyond normal project testing outputs.
The source is an open-source GitHub repository with very high community adoption (about 210k stars), which are strong risk-reducing signals; the material is also marked prompt-only. Although the license is unspecified and maintenance status is unknown, there is no high-risk red flag such as closed-source exfiltration, an unauditable origin, or misleading installation instructions.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "e2e-testing" skill from askskill: 1. Download https://raw.githubusercontent.com/affaan-m/ECC/main/skills/e2e-testing/SKILL.md 2. Save it as ~/.claude/skills/e2e-testing/SKILL.md 3. Reload skills and tell me it's ready
Design a directory structure for a Playwright-based web E2E testing project using the Page Object Model. Include three core flows: login, product search, and checkout, and provide recommended config files and sample test code.
A clear project structure, page object breakdown, configuration guidance, and reusable sample test code.
Integrate Playwright end-to-end tests into CI/CD and give me a GitHub Actions workflow example that includes dependency installation, browser caching, test execution, and uploading screenshots and trace files on failure.
A complete pipeline configuration with artifact retention and failure investigation guidance.
I have a set of Playwright tests that fail intermittently. Analyze common flaky test causes and provide improvements for wait strategies, selector reliability, retries, test isolation, and trace-based debugging.
Systematic recommendations to improve test stability, reliability, and maintainability.
Comprehensive Playwright patterns for building stable, fast, and maintainable E2E test suites.
tests/
├── e2e/
│ ├── auth/
│ │ ├── login.spec.ts
│ │ ├── logout.spec.ts
│ │ └── register.spec.ts
│ ├── features/
│ │ ├── browse.spec.ts
│ │ ├── search.spec.ts
│ │ └── create.spec.ts
│ └── api/
│ └── endpoints.spec.ts
├── fixtures/
│ ├── auth.ts
│ └── data.ts
└── playwright.config.ts
import { Page, Locator } from '@playwright/test'
export class ItemsPage {
readonly page: Page
readonly searchInput: Locator
readonly itemCards: Locator
readonly createButton: Locator
constructor(page: Page) {
this.page = page
this.searchInput = page.locator('[data-testid="search-input"]')
this.itemCards = page.locator('[data-testid="item-card"]')
this.createButton = page.locator('[data-testid="create-btn"]')
}
async goto() {
await this.page.goto('/items')
await this.page.waitForLoadState('networkidle')
}
async search(query: string) {
await this.searchInput.fill(query)
await this.page.waitForResponse(resp => resp.url().includes('/api/search'))
await this.page.waitForLoadState('networkidle')
}
async getItemCount() {
return await this.itemCards.count()
}
}
import { test, expect } from '@playwright/test'
import { ItemsPage } from '../../pages/ItemsPage'
test.describe('Item Search', () => {
let itemsPage: ItemsPage
test.beforeEach(async ({ page }) => {
itemsPage = new ItemsPage(page)
await itemsPage.goto()
})
test('should search by keyword', async ({ page }) => {
await itemsPage.search('test')
const count = await itemsPage.getItemCount()
expect(count).toBeGreaterThan(0)
await expect(itemsPage.itemCards.first()).toContainText(/test/i)
await page.screenshot({ path: 'artifacts/search-results.png' })
})
test('should handle no results', async ({ page }) => {
await itemsPage.search('xyznonexistent123')
await expect(page.locator('[data-testid="no-results"]')).toBeVisible()
expect(await itemsPage.getItemCount()).toBe(0)
})
})
import { defineConfig, devices } from '@playwright/test'
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: [
['html', { outputFolder: 'playwright-report' }],
['junit', { outputFile: 'playwright-results.xml' }],
['json', { outputFile: 'playwright-results.json' }]
],
use: {
baseURL: process.env.BASE_URL || 'http://localhost:3000',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
actionTimeout: 10000,
navigationTimeout: 30000,
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
{ name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
],
webServer: {
command: 'npm run dev',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
timeout: 120000,
},
})
test('flaky: complex search', async ({ page }) => {
test.fixme(true, 'Flaky - Issue #123')
// test code...
})
test('conditional skip', async ({ page }) => {
test.skip(process.env.CI, 'Flaky in CI - Issue #123')
// test code...
})
npx playwright test tests/search.spec.ts --repeat-each=10
npx playwright test tests/search.spec.ts --retries=3
Race conditions:
// Bad: assumes element is ready
await page.click('[data-testid="button"]')
// Good: auto-wait locator
…
Plan demand forecasts, safety stock, and replenishment for multi-location retail inventory.
Automatically format, lint, and fix code issues on every edit.
Apply NestJS architecture patterns to build maintainable production-ready TypeScript backends.
Learn robust error-handling patterns across TypeScript, Python, and Go applications.
Audit Claude skills and commands with quick scans or full stocktakes.
Create iOS liquid glass interfaces with dynamic visuals and interactive morphing.
Automate browser interactions, capture screenshots, and run end-to-end testing workflows.
Get AI guidance for Playwright best practices and better automated tests.
Write and run Markdown-driven end-to-end tests for Relay apps.
Automatically repair failing Playwright E2E tests and verify fixes end to end.
Run Playwright UI automation via AI and get reports with screenshots.
Automate a real browser from the terminal for testing, scraping, and UI debugging.