Playwright and GitHub Copilot: QA workflow setup

Learn to configure Playwright agents and MCP servers in VS Code, then use a seven-step prompt to generate tests and commit QA artifacts to GitHub.

Player not loading? Watch on YouTube

Ravi walks through a QA automation workflow in Visual Studio Code, with GitHub Copilot coordinating Playwright's planner, generator and healer agents. The example tests the Sauce Demo checkout process, starting with a user story and five acceptance criteria stored in a Markdown file.

Setup covers installing Playwright, choosing the default TypeScript project, adding Playwright MCP and configuring the test agents. Ravi then adds GitHub MCP with a personal access token. The tutorial uses a local workspace alongside Copilot and GitHub; it does not demonstrate offline model inference or a self-hosted model.

A detailed prompt file defines seven steps: read the requirements, create a test plan, explore the application, generate scripts, execute and repair tests, write a report, and commit the artifacts. The generator uses both the plan and exploratory findings, with browser tools inspecting the live DOM for locators. Although setup selects TypeScript, the prompt requests JavaScript tests.

In the demonstration, Ravi reports 60 tests across five files, running with six workers. Failures lead to use of the healer before report generation and GitHub commits. The workflow also pauses for execution and token-access approvals. His claims about production readiness, time savings and a 100% pass rate are presenter claims, rather than guarantees established by this example.