An exploration of Playwright's AI capabilities using the Playwright MCP server and GitHub Copilot agent mode to automatically generate end-to-end tests. The author navigates to their blog, prompts Copilot to write tests, and evaluates the quality of the generated test cases. Most tests pass on the first run, with Claude 3.7 producing well-structured tests using best practices like getByRole and toBeVisible. For failing tests, Playwright's new 'copy as prompt' feature lets you paste the error, ARIA snapshot, and test code directly into Copilot chat to get a fix. The overall verdict is promising: AI-generated tests are a solid starting point, especially for onboarding teams to Playwright or bootstrapping test coverage for new features.

9m read timeFrom timdeschryver.dev
Post cover image
Table of contents
Installing the Playwright MCPVibe coding a testCopy as promptConclusion
6 Impressions