/ui-testing:testerfrom ui-testing
Reviews a user story, feature description, or acceptance criteria as a senior SQA analyst and writes UI test cases in a rigorous house style (behavior-driven, click-by-click, every step with an explicit expected result), and generates or parses runnable Playwright + TypeScript UI scripts for an automation framework, working both ways (cases to scripts and scripts to cases) at three UI levels: smoke, regression, and e2e. Use whenever the user pastes a story, ticket, AC block, feature spec, or flow description and asks for test cases, test coverage, QA review, UI automation or Playwright specs, or to convert between UI test cases and UI scripts, e.g. "write tests for this", "what should I test?", "break this story into test cases", "generate the Playwright spec for this flow", "turn this spec into test cases". Covers click-by-click UI only; request/response API coverage is out of scope.
Ships in ui-testing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
One mindset, two artifacts, two directions. Reason about the UI behavior once — the happy path, every rule, every edge and negative, the full journey — and express it either as a house-style test case (click-by-click, the human-readable spec a reviewer signs off on) or as a runnable Playwright + TypeScript UI script that drops into the automation framework. Author the case first, confirm coverage, then optionally emit the script; or go the other way and recover cases from an existing spec.
Read references/workspace-profile.md, then load .claude/workspace-profile.json from the user's project. This skill needs:
product.name, product.modules, environments, clientIdFormat, and variants (only when generating scripts that run per integration partner).
If any are missing, run discovery for those keys only, confirm with the user, save, then continue. Every org fact below comes from the profile; nothing is assumed. Module and feature names in the examples below (Inbox, Contacts, Settings…) are illustrative placeholders.
page action becomes an atomic "Action" row; each expect(...) becomes an "Expected Result" row; the title comes from the spec's traces-case: header (or the test() title). One test() = one case.When the user hands you a .spec.ts, default to reverse; a story/AC/flow, default to forward; if unclear, ask.
Before writing anything, do a thorough read of the story (in reverse mode, read the spec). Extract:
[Module] - [Feature].Think: "What are all the ways this can work? All the ways it can break? What must the system enforce?" — write a case for every answer.
List the cases you intend to write before drafting steps (show it if scope is ambiguous):
Coverage plan:
- Happy path: <one-line>
- AC #1 (pass): <behavior> ; AC #1 (boundary/fail): <enforcement>
- AC #2: <behavior>
- Business rule — <rule>: <pass> + <fail/enforcement>
- Edge case: <describe>
- Negative: <describe>
- Permission — <role>: can / cannot
- Cross-flow: <module, what to confirm>
Proceed without asking when scope is clear. Ask one focused question only for genuine ambiguity (environment, client, role, forward vs reverse).
[Module] - [Feature] - Verify that <expected behavior>.
Third segment is always "Verify that..." — specific, observable, tied to a single behavior; period at the end. Client-specific variant (client id per clientIdFormat): [Module] - [Feature] - Client Name [ID] - Verify that <behavior>.
Examples:
Inbox - Queues - Verify that user is able to switch to the newly created queue.Contacts - Merge - Verify that a chat contact can be merged into an existing PARTNER-A contact.Settings - Roles - Verify that a user without the Admin role cannot access queue settings.Inbox - Chat - Verify that user is unable to send a message after the 24-hour window.Preconditions: <Client ID / Environment (one of `environments`) / role / required data state>
| # | Action | Expected Result |
|---|--------|-----------------|
| 1 | <single atomic action> | <concrete observable response> |
| 2 | <single atomic action> | <concrete observable response> |
...
| N | Verify that <behavior from title> | <definitive expected outcome> |
Actual Result:
Actual Result: is always left blank — the tester fills it during execution.
Read references/format-and-voice.md for the extended voice guide and common mistakes, and references/example-from-story.md for a full worked example (story → coverage plan → cases).
For every story, produce cases across all applicable axes: happy path; each acceptance criterion (pass + fail/boundary); each business rule (enforce + normal); edge cases (empty, max-length, boundary, missing/expired, duplicate, deleted mid-flow); negative cases; permissions (per role, can/cannot); cross-flow (each shared-data feature, one regression guard). Skip an axis only when it genuinely does not apply.
Optional second deliverable: turn the cases into runnable Playwright UI specs that drop into the automation/ framework and pass npm run typecheck and npm run test:ui. Read the repo first. If the repo's UI layer already has committed specs, follow that precedent; otherwise follow the conventions below, which are consistent with playwright.config.ts and the established API layer.
automation/. Never edit product source.variants.values item) via config; write a profile-specific test only where behavior genuinely differs.baseURL/route config, not literal hosts.The UI projects in playwright.config.ts are the levels:
ui-smoke, 60s) — shallow critical-path per module: the screen loads and its core action works. One or two per module.ui-regression, 90s) — per-feature behavior coverage; the bulk. Mirrors the detailed house-style cases (each AC/rule/edge → a spec).ui-e2e, 120s) — full cross-module user journeys (the equivalent of an API workflow), with any needed setup and teardown.modules/<unit>/ui/
tests/smoke/<name>.spec.ts # project: ui-smoke
tests/regression/<name>.spec.ts # project: ui-regression
tests/e2e/<name>.spec.ts # project: ui-e2e
fixtures/ # unit UI fixtures / storageState (per config comment)
pages/<Name>.page.ts # optional Page Objects (locators + actions), if the unit uses POM
Playwright matches specs by folder (**/ui/tests/<level>/**/*.spec.ts), so the folder is the level. Run with npm run test:ui.
storageState. UI projects reuse the logged-in session rather than logging in every test — a global-setup (the UI analogue of the API layer's token helper, e.g. common/auth/token.ts) signs in once and saves the storage state; specs load it. Only script the login flow explicitly in a spec whose behavior is login.modules/<unit>/ui/fixtures/ or a shared common/fixtures/ui.fixture.ts) once it exists; the first UI spec establishes it (Chromium + storageState). Until then, import test/expect from @playwright/test and set storageState in the project config.page.getByRole('button', { name: 'SAVE' }), page.getByLabel('Queue Name'), page.getByTestId('active-queue'). Use the exact labels from the case steps verbatim — the labels are the shared vocabulary between the case and the script.expect(...). Preserve the case's atomicity in the spec so a failure points at one line./**
* @generated tester · level: regression · unit: inbox
* source-story: <ticket id / feature>
* traces-case: "Inbox - Queues - Verify that user is able to switch to the newly created queue."
* Regenerate via `npm run generate`. Edit only inside the MANUAL region; auto-generated regions are overwritten.
*/
// #region auto-generated
// ...generated test(s)...
// #endregion auto-generated
// #region manual
// ...human-added steps/overrides preserved across regen...
// #endregion manual
Keep the test() title equal to the Part A case title (plus @<unit> @<level> tags for impact selection). The traces-case: string is what the reverse direction reads to recover the case title verbatim — case ↔ script ↔ (future) ADO case all trace by the same string.
modules/inbox/ui/tests/regression/queue-switch.spec.ts:
import { test, expect } from '@playwright/test'; // swap to the unit UI fixture once it exists
test('Inbox - Queues - Verify that user is able to switch to the newly created queue. @inbox @regression',
async ({ page }) => {
await page.goto('/inbox'); // Navigate to the Inbox module
await page.getByRole('button', { name: 'Select Queue' }).click(); // Click the Select Queue dropdown
await expect(page.getByRole('listbox')).toBeVisible(); // Dropdown expands
await page.getByRole('option', { name: 'QA Automation Queue' }).click(); // Click the new queue option
await expect(page.getByTestId('active-queue')).toHaveText('QA Automation Queue'); // Verify the active queue switched
});
Selectors, routes, and test-ids above are illustrative — confirm each against the running app / the product's component code before emitting, exactly as the API layer confirms routes against routes.<unit>.ts. Reuse disposable data with an AUTOMATION_-prefixed convention and tear it down in e2e specs.
traces-case: header verbatim; else the test() title minus @tags, confirmed against the Title format.smoke|regression|e2e) or the @tag.page action to an Action row — page.goto('/inbox') → "Navigate to the Inbox module"; getByRole('button',{name:'SAVE'}).click() → "Click the SAVE button". One action per row, exact labels.expect(...) to an Expected Result row — toHaveText(...)/toBeVisible()/toBeDisabled() → the concrete observable outcome. One assertion per row.storageState/global-setup login, the client/role, and seed data become the Preconditions line; script an explicit login step only when the test is about login.Actual Result:. One test() → one case; keep the title byte-identical so the round trip is lossless.Present the cases (grouped by level when scripts are involved: smoke → regression → e2e); if scripts were requested, show each alongside its matching case. Ask: "Does this coverage look right — anything to add or cut?" Adjust before finalizing. Writing generated files into the automation/ repo is a real change — confirm target paths with the user before writing, and keep every write under automation/.
If the user wants these created as Test Case work items in Azure DevOps, hand off to the buggy skill — it owns ADO creation with the correct XML steps format, work-item linking, and suite assignment. This skill does not write to ADO. This skill doesn't cover request/response (API) testing.
references/workspace-profile.md — the workspace profile spec (Step 0)references/format-and-voice.md — full format rules, common mistakes, extended voice guidereferences/example-from-story.md — illustrative worked example: user story → coverage plan → full test casesWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub shironigun/marketplace --plugin ui-testing2 skills in this plugin