Website Testing Skill
Turn critical user journeys into repeatable browser tests, run them locally and in CI, and interpret failures without guessing.
Download this skill
3 files · SKILL.md + ZIP + JavaScript · License CC BY 4.0
SKILL.md
3.0 KBv1.1.0skill mdskill.json
1.3 KBv1.1.0manifestsmoke.spec.ts
893 Bv1.1.0code Executable
License: CC BY 4.0. Only download and use files you are licensed to use.
This resource includes executable scripts. Review the code before running it, run it in an isolated environment, and never pass secrets you do not intend to share with the script.
Test the outcomes users care about
A browser test is expensive: it is slower and more brittle than a unit test. Use it where the value is highest — the journeys that create revenue, lose data or block access.
This skill focuses on a small smoke suite: the homepage renders, search works, a core flow completes, and unknown routes return the right status. That suite catches deployment mistakes without becoming a maintenance burden.
Selectors and waits
Role-based selectors are both more accessible and more stable. getByRole("button", { name: "Sign in" }) survives a class rename; .btn-primary > span does not.
Avoid fixed sleeps. Wait for a visible result, a URL change or a network response. If a test needs a sleep, you probably have not identified the condition that signals readiness.
Interpreting failure
Before editing the test, decide what failed:
- Product regression: the user-visible behaviour changed unintentionally.
- Intentional change: update the test and the expectation.
- Test bug: the selector or data setup is wrong.
- Environment issue: staging is down or credentials expired.
Capture a trace and a screenshot on failure. A test suite without diagnostics turns every failure into an investigation from scratch.
Keep it small
A smoke suite that runs in a few minutes gets used. A 400-test browser suite that takes an hour gets skipped. Push detailed logic into unit tests and reserve end-to-end tests for the paths where integration failure matters.
At a glance
- Difficulty
- Intermediate
- Platforms
- Claude, ChatGPT, Cursor, GitHub Copilot
- File format
- SKILL.md + ZIP + JavaScript
- License
- CC BY 4.0
- Version
- 1.1.0
- Last reviewed
- May 17, 2026
- Source
- AI Skills Hub original
- Access
- Free
What it does
Capabilities included in this package.
- Critical-journey test template
- Accessible selectors and stable waits
- Screenshot and trace guidance
- A triage checklist for flaky tests
Requirements
Check these before you start.
- Node.js 20+
- Playwright installed
- A staging environment you are allowed to test
Installation
Set up the skill in a working folder before you use it on real material.
- 1
Download the skill
Save SKILL.md and the example Playwright test.
- 2
Install Playwright
Use the official installer for your platform.
npm init -y npm i -D @playwright/test npx playwright install - 3
Point tests at staging
Use an environment variable for the base URL. Never run destructive tests against production.
How to use it
A reviewed sequence that keeps a person in the loop.
- 1
List the journeys that matter
Prioritise sign-in, search, checkout and any action that creates or destroys data.
- 2
Write one test per outcome
A test should assert a user-visible outcome, not the presence of an implementation detail.
- 3
Use role-based selectors
Prefer getByRole and getByLabel. They are more accessible and less brittle than CSS chains.
- 4
Handle test data explicitly
Create unique data per run and clean it up. Shared accounts cause flaky failures.
- 5
Triage failures
Read the trace, reproduce locally, and distinguish product bugs from test bugs before changing the test.
Use cases
Tasks this skill is designed for.
- Verify signup, login and checkout after a deploy
- Catch broken links and missing form validation
- Run a smoke test on mobile viewports
Worked examples
Smoke test
Visit the homepage, search for a known term, open the first result and assert the heading. Keep the test independent of content that changes often.
Form validation
Submit an invalid email and assert the visible error. Then submit a valid email and assert the success state. Do not assert an exact CSS class.
Security and privacy
Read this before running any downloaded script or sending material to an AI provider.
Treat downloaded code and extracted text as untrusted
Never point automated tests at production write paths or real customer accounts. Use test credentials with minimal permissions. Browser tests can capture screenshots and traces containing personal data, so set retention and access controls.
Version history
v1.1.0
Initial reviewed release.
Apr 13, 2026
Frequently asked questions
Related resources
Spotted something out of date? Suggest the fix and an editor will review it.