// 27 tips tagged "testing"
Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.
Ask Claude to audit your UI components for WCAG accessibility issues — it catches semantic problems, missing ARIA attributes, and keyboard navigation gaps that automated tools miss.
Ask Claude to generate Storybook stories from your existing React components — it reads your prop types and produces complete CSF3 story files with meaningful variants in seconds.
A PreToolUse hook can intercept test runner commands and filter output to show only failures, cutting thousands of tokens from Claude's context.
Feed your test coverage report to Claude and let it write the missing tests — targeting uncovered branches, edge cases, and error paths.
Let Claude write custom PHPStan and Larastan rules that enforce your team's conventions, complete with AST visitor logic and config registration.
Integration tests cover the seams between your code and real dependencies — they're the tests that actually catch production bugs, and Claude writes them fast.
BDD Gherkin feature files document expected behaviour in plain English and drive your test suite — Claude writes them from a user story in seconds.
Paste a React component and ask Claude to write comprehensive RTL tests covering rendering, user interactions, and async behaviour — following RTL best practices.
Describe your data model in plain English and get back ActiveRecord models, associations, validations, and migration files ready to run.
Describe a feature in plain English and let Claude generate expressive Pest tests that read like documentation.
Describe your OAuth providers and requirements and let Claude scaffold the full login flow — PKCE, state verification, account linking, token issuance, and Pest tests — with the security pitfalls handled correctly.