AI in testing
Using AI to plan, generate and maintain tests, and testing AI features themselves.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkOn this page
Overview
AI in testing covers two jobs. First, using AI to help with testing: generating test ideas from requirements, drafting unit and end-to-end tests, exploring an app through a browser agent, and repairing broken locators. Playwright's planner, generator and healer agents are one example.
Second, testing products that contain AI. Output varies between runs, so assertions move from exact matches to properties, rubrics and evals, and new risks such as prompt injection need dedicated tests. Testers who combine solid automation habits with eval techniques are well placed for both.
What you will practise
- Generate test ideas and drafts from requirements with AI
- Use test agents to plan, generate and heal end-to-end tests
- Write property and rubric checks for non-deterministic output
- Add prompt-injection cases to the tests of AI features
Learning paths
- AI for test engineers
An AI course for testers: apply generative AI to everyday test automation, from AI-assisted test design to generating, healing and reviewing Playwright tests.
- Evals and safety for LLM features
Learn LLM evals and safety: catch regressions and attacks before users do, with error analysis, code-based evals, calibrated judges and prompt-injection tests.
Tutorials
- How to test LLM applications as a QA engineer
Contract tests on a scripted model, a golden set with pass-rate floors, a calibrated LLM judge and a regression gate.
- Exploratory testing with Playwright MCP
Give a coding agent a browser through Playwright MCP, run a time-boxed exploratory charter, record findings, and turn the confirmed ones into Playwright specs.
- Playwright test agents: planner, generator and healer
How Playwright's planner, generator and healer test agents work, how to set them up with Claude Code or VS Code, and how to review the tests they write for you.
- Getting started with AI test case design
Use a language model to draft test cases for a feature, prompt it for coverage rather than happy paths, and review its ideas like a tester before you automate.
Workflow recipes
- Generate Playwright tests with AI agents, then review them
Approve a test plan before any code exists, generate tests from it and review them like production code.
- Run an accessibility audit with an agent
Run an AI accessibility audit against WCAG 2.2 AA with Playwright, axe-core and an agent, add the manual checks scanners miss, and rank fixes by user impact.
- Fix flaky E2E tests with the Playwright healer, safely
Prove the flake, run Playwright's healer agent on a branch, check each change for red flags, keep a heal log and merge by hand.
Articles
- AI for QA engineers: where it helps and where it doesn't
Where it helps in test design, agent-written tests and self-healing, where it does not, and the testing skills worth building.
Tools for this skill
Applitools
Testing platform built on visual AI comparison, with no-code and SDK authoring.
Chrome DevTools for agents
MCP server and CLI for agents to debug live Chrome.
DeepEval
Open-source, pytest-style framework for evaluating LLM apps, RAG and agents.
Playwright
End-to-end testing framework for web apps, with built-in test agents.
Playwright MCP
MCP server that lets agents drive a browser through Playwright.
promptfoo
CLI for YAML-defined prompt and model evals, plus red-team scans for injection.
Qodo
AI code review and test generation across the IDE, pull requests and CLI.
Key terms
Words you will meet while learning this, defined in the glossary.
- Self-healing tests
Automated tests whose broken locators or steps are repaired automatically when the application under test changes, so fewer runs fail.