web-testing

Tests web applications in real browsers with Playwright end-to-end automation.

22|Updated Sep 10, 2026
One-click install
npx skills add https://github.com/Lynricsy/HyperSkills --skill web-testing-lynricsy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-testing
Source: https://github.com/Lynricsy/HyperSkills/tree/main/skills/web-testing
Command: npx skills add https://github.com/Lynricsy/HyperSkills --skill web-testing-lynricsy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/test, and includes references (resource) components.

What problem does it solve? End-to-end browser test suites often pass for the wrong reasons: fixed waits that race the application, assertions that can never fail, inter-test coupling hidden by serial execution, and CI jobs that report green while tests only pass on retry. This Skill provides verified rules and workflows for writing, reviewing, and debugging Playwright suites that actually detect regressions. ## Core Features & Use Cases - Locator and assertion discipline: Enforces role-based locators, strict-mode handling, web-first retrying assertions, and the elimination of waitForTimeout, networkidle, and conditional assertions that can never fail. - Authentication and state management: Designs setup projects with storageState, per-role and per-worker sessions, sessionStorage seeding, and TOTP handling for second factors. - Flakiness diagnosis and CI pipelines: Classifies flakes into four shapes with reproduction commands, configures traces and blob report merging, fixes sharding granularity, and enforces version lockstep between Playwright and browser binaries. - Use Case: A team has a checkout spec that passes locally but fails under --fully-parallel. Use this Skill to identify the module-level shared state causing the coupling, rewrite the fixed waits as retrying assertions, and verify the fix with --repeat-each=10 --fully-parallel. ## Quick Start Review my Playwright spec file and CI workflow, then tell me which tests can silently pass and how to fix the flaky suite.

Frequently Asked Questions about web-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix flaky Playwright tests in CI?

First reproduce the flake with `--repeat-each=20 --fully-parallel`, then classify it as timing, isolation, environment, or infrastructure. Fix timing with retrying web-first assertions, isolation with per-worker state or `test.lock`, and add `--fail-on-flaky-tests` so retries cannot hide future flakes.

How do I share login state across Playwright tests?

Create a setup project matched by `testMatch` that logs in once and calls `context.storageState({ path })`, then have real projects declare `dependencies: ['setup']` and `use: { storageState }`. Note that storageState captures cookies and localStorage only, not sessionStorage.

Why is waitForTimeout bad in Playwright tests?

A fixed wait runs the assertion at a wall-clock offset, so it fails when the app is slower than the guess and stops catching regressions when the app is faster. Replace it with a retrying assertion like `expect(locator).toHaveText(...)`, which polls until the condition holds or times out.

Does Playwright sharding split tests evenly across shards?

Only with `fullyParallel: true`. Without it, `--shard` distributes whole files, so shards can come back wildly uneven, including empty shards that finish green and prove nothing. Enable fullyParallel first, then shard, and merge per-shard blob reports with `merge-reports`.

Why does Playwright CI fail with 'Executable doesn't exist' for chromium?

The browser cache key has no version component, so it restores binaries built for an older `@playwright/test` and `playwright install` treats the cache as a hit. Put the resolved Playwright version in the cache key, or use the version-tagged official container image.

When should I not use end-to-end browser tests?

Reserve end-to-end tests for critical journeys that cross tiers like sign-in or checkout. Unit logic, API contracts, edge-case permutations, load testing, and native mobile UI automation belong to other tools and should not be covered by a browser suite.