Playwright + LLM + MCP: Using AI for API and UI Testing
Learning objective
This workshop connects Playwright to AI coding tools such as GitHub Copilot and Cursor through Model Context Protocol (MCP). Participants use tool calling and Retrieval-Augmented Generation (RAG) in exploratory testing and UI and API automation, while measuring the risks as well as the time saved.
By the end of the course, participants will be able to:
- Explain what tool calling (function calling) and RAG are, and how they apply to software testing.
- Describe the role of MCP and its architecture in the Playwright ecosystem.
- Run LLM-assisted exploratory testing sessions.
- Generate and maintain Playwright tests (UI and API) with AI assistance.
- Assess when AI support improves productivity and when it increases risk.
Agenda
1) Modern LLM techniques
- LLM fundamentals (how tools like ChatGPT operate)
- Tool calling / tools: connecting the model to external capabilities
- Retrieval-Augmented Generation (RAG): improving answer quality using internal documentation
- AI agents: concepts, theory, and practical applications
2) MCP and Playwright
- MCP server architecture
- Installation, configuration, and integration with Playwright (JS/TS)
- API overview: accessibility snapshots, navigation, and element actions
3) MCP in hands-on testing
- Prompt-driven exploratory testing
- Generating test cases from user stories
4) Test automation with AI
- Using Copilot / Cursor for test automation
- Connecting Copilot / Cursor with MCP: a "prompt → code → run → fix" workflow
- Practical workshops:
- Automating REST API checks with Playwright
- Automating UI tests with MCP + Playwright
- Productivity review: what to write manually vs what to generate
5) Risks, ethics, and maintainability
- Model hallucinations vs test stability and quality
- Versioning prompts and ensuring reproducibility
- Cost analysis and return on investment
- MCP and Playwright roadmap: what to watch next
Prerequisites
Who is this for?
The course is intended for testers who have basic programming skills in JavaScript/TypeScript and understand Playwright fundamentals. Familiarity with Git is recommended.
What to prepare
- A laptop with Node.js (LTS), Git, and VS Code
- An AI coding tool configured (e.g., GitHub Copilot or Cursor)
A detailed setup checklist is provided after registration.
About two thirds of the training is hands-on. Each practical block ends with a short review of what worked, what failed, and why. Participants keep the working code and prompt history.
Training materials
- Slide deck (PDF)
- Git repository with branches for each module
- Prompt notebook (Markdown)
- A curated collection of reference links
What you will leave with
- working Playwright examples that use MCP for browser and API tasks,
- prompt and repository patterns you can adapt to your own project,
- a checklist for reviewing generated tests and exploratory findings,
- criteria for deciding when AI saves time and when manual work is safer.