A Playwright + TypeScript framework set up for AI-assisted testing
A public demo framework that shows how I structure UI tests. It runs against a public practice web shop.
- Page Object Model with a
BasePageand aPageFactory, injected into tests through custom fixtures. - Data-driven specs, with test data and expected UI text kept in their own folders.
- Strict TypeScript, ESLint, Prettier and Husky as gates before any commit.
- Docker and GitHub Actions, with Allure and HTML reports.
- A custom failure reporter that groups failed tests by their first error and gives a rerun command for each.
How the AI works inside the rules
CLAUDE.mdloads the framework guide, so generated code follows the same rules as mine.- The
/add-testcommand explores the flow in a real browser first, reuses page objects, then runs the checks and the test until both pass. settings.jsonblocks the agent from reading.envand formats every file it edits.- Lint, type checks and the tests reject generated code that breaks the rules, the same as hand-written code.
While building it, the agent found that the site's test password had changed before any test code was written.