---
title: 'AI Test Automation: A Hands-On Course: Free Online Course'
description: 'A hands-on AI test automation course: drive a browser with Playwright
  MCP, generate and heal tests with agents, triage failures, and run the reviewed
  suite on a cloud grid. What AI does well and where it fails.'
source_url:
  html: https://testingbot.com/resources/courses/ai-test-automation
  md: https://testingbot.com/resources/courses/ai-test-automation.md
---

Course

[AI Test Automation: A Hands-On Course](https://testingbot.com/resources/courses/ai-test-automation)

Chapter 1 of 9

1. [1 AI Test Automation: A Hands-On Course](https://testingbot.com/resources/courses/ai-test-automation)
2. [2 Set Up an Agent with Playwright MCP](https://testingbot.com/resources/courses/ai-test-automation/set-up-playwright-mcp)
3. [3 From Test Plan to Playwright Test with an Agent](https://testingbot.com/resources/courses/ai-test-automation/generate-tests-from-a-plan)
4. [4 Playwright Test Agents: Planner, Generator and Healer](https://testingbot.com/resources/courses/ai-test-automation/playwright-test-agents)
5. [5 Self-Healing Tests: When Healing Hides a Regression](https://testingbot.com/resources/courses/ai-test-automation/self-healing-tests)
6. [6 AI for Failure Triage: Traces, Logs and Privacy](https://testingbot.com/resources/courses/ai-test-automation/ai-failure-triage)
7. [7 Run AI-Written Suites on TestingBot](https://testingbot.com/resources/courses/ai-test-automation/run-on-testingbot)
8. [8 Guardrails for AI in a Test Suite](https://testingbot.com/resources/courses/ai-test-automation/guardrails)
9. [9 AI Test Automation Quiz](https://testingbot.com/resources/courses/ai-test-automation/knowledge-check)

[Exit course](https://testingbot.com/resources/courses)

 Chapter 1 of 9 Intermediate 7 min read 1 quick check Updated Nov 2026 

# AI Test Automation: A Hands-On Course

A hands-on AI test automation course: drive a browser with Playwright MCP, generate and heal tests with agents, triage failures, and run the reviewed suite on a cloud grid. What AI does well and where it fails.

## What you will learn

1. AI Test Automation: A Hands-On Course
2. [Set Up an Agent with Playwright MCP](https://testingbot.com/resources/courses/ai-test-automation/set-up-playwright-mcp)
3. [From Test Plan to Playwright Test with an Agent](https://testingbot.com/resources/courses/ai-test-automation/generate-tests-from-a-plan)
4. [Playwright Test Agents: Planner, Generator and Healer](https://testingbot.com/resources/courses/ai-test-automation/playwright-test-agents)
5. [Self-Healing Tests: When Healing Hides a Regression](https://testingbot.com/resources/courses/ai-test-automation/self-healing-tests)
6. [AI for Failure Triage: Traces, Logs and Privacy](https://testingbot.com/resources/courses/ai-test-automation/ai-failure-triage)
7. [Run AI-Written Suites on TestingBot](https://testingbot.com/resources/courses/ai-test-automation/run-on-testingbot)
8. [Guardrails for AI in a Test Suite](https://testingbot.com/resources/courses/ai-test-automation/guardrails)
9. [AI Test Automation Quiz](https://testingbot.com/resources/courses/ai-test-automation/knowledge-check)

[Continue where you left off](https://testingbot.com#)

## Earn the TestingBot certification for this course

Pass the exam and run the course suite on TestingBot. Free, with a public link you can add to LinkedIn.

[How it works](https://testingbot.com/resources/courses/ai-test-automation/certification)On this page
1. [What people mean by "AI test automation"](https://testingbot.com#what-people-mean-by-ai-test-automation)
2. [What stays human](https://testingbot.com#what-stays-human)
3. [What this course does and does not claim](https://testingbot.com#what-this-course-does-and-does-not-claim)
4. [Course map](https://testingbot.com#course-map)

_Last reviewed November 2026 against @playwright/test 1.65.0, @playwright/mcp 0.0.85 and @testingbot/mcp-server 1.2.0._

"AI test automation" is used for at least five different things, and most articles about it mix them up. This course separates them, runs each one on a real project, and shows the output as it came back: the parts that worked, the parts that did not, and what each run cost. It is written for engineers who already write automated tests (or are willing to learn Playwright alongside it) and want to know where a language model actually helps.

The short version, which the rest of the course backs up with runs you can repeat: an AI agent is a fast, tireless junior who drafts tests, explores pages and proposes fixes. It does not know what your application is supposed to do. Deciding that stays with you.

## What people mean by "AI test automation"[#](https://testingbot.com#what-people-mean-by-ai-test-automation)

**1. Coding assistants that write test code.** You describe a scenario, an LLM writes a Playwright, Selenium or Cypress test, you review it and commit it. The test that runs in CI is ordinary deterministic code; the AI was only involved while you wrote it. This is the most useful category today, and the one this course spends the most time on.

**2. Agents that drive a real browser.** Through the Model Context Protocol (MCP), an agent such as Claude Code, GitHub Copilot in VS Code or Cursor gets tools like "navigate", "click" and "read the page". It can explore an app, reproduce a bug report or check that a fix works, and it can turn what it did into test code. Playwright MCP is the common way to do this; chapter 1 sets it up.

**3. Self-healing tests.** When a locator stops matching, something proposes or applies a replacement. Done at authoring time, as a diff a person reviews, it saves real maintenance work. Done silently at runtime it can turn a genuine regression into a green build. Chapter 4 shows both outcomes from the same tool.

**4. Visual AI.** Screenshot comparison that tries to ignore rendering noise and only flag differences a person would care about. Useful, and out of scope here: it is a different discipline with its own failure modes.

**5. Failure triage.** Feeding the error, logs and trace of a failed run to a model and asking "why did this fail, and is it the app, the test or the environment?" Chapter 5 covers what to send, what not to send, and how to check the answer.

Two more terms you will meet. _Codeless_ or _natural-language_ tests store the prompt instead of code and let a model interpret it on every run. _Autonomous testing_ usually means an agent that decides by itself what to test. Both move the AI from authoring time to run time, which makes results harder to reproduce and review. This course focuses on keeping the AI at authoring time and the test code deterministic, and chapter 7 explains why.

## What stays human[#](https://testingbot.com#what-stays-human)

An automated test has two halves: the steps that drive the application, and the **oracle** that decides whether the result is correct. Models are good at the first half. The second half needs knowledge that usually is not on the screen: the requirement, the pricing rule, the legal text, what the customer was promised.

Chapter 3 shows this happening. We gave a test generator a shop page whose banner says "Free shipping on orders over 20 EUR", then added two bags at 12.50 EUR each. The page charged 4.95 EUR shipping. The agent noticed the contradiction and mentioned it in its chat reply, then wrote a test that asserts the 4.95 EUR. The test passes, and it will keep the bug in place until someone reads the assertion and disagrees with it.

Risk is the other human job. What breaks most often, what costs the most when it breaks, what a regulator will ask about: none of that is in the DOM. Use the agent to cover more ground, and decide yourself which ground matters.

An agent explores your checkout page and generates a test asserting "Total: 31.95 EUR". Before you merge it, what do you most need to check?

 That the test passes three times in a row That the locator for the total uses a role instead of a CSS class That 31.95 EUR is what the pricing rules say the total should be, not just what the page showed That the agent used the most capable model available

An agent that explores a page asserts what it saw. If the page was wrong, the test locks the bug in and passes. Stability and good locators matter too, but a stable test that checks the wrong value is worse than no test.

## What this course does and does not claim[#](https://testingbot.com#what-this-course-does-and-does-not-claim)

Every code sample in this course was run. The agent runs used Claude Code 2.1 with a Sonnet model, because that is what we had at hand; the Playwright Test Agents also support VS Code with Copilot, Codex and opencode, and the MCP servers work with any MCP client. Where a step was not run in a given client, the text says so.

Agent output is not deterministic. When we say "the healer marked the test as fixme", that is what happened in our run, on that day, with that model. Run the same prompt yourself and you may get a different result, which is itself one of the lessons. The dollar amounts quoted are what Claude Code reported for each run at list price; your costs depend on model, plan and how much the agent explores.

Nothing here says TestingBot uses AI to run or repair your tests. TestingBot is where the finished suite runs (chapter 6). It also has AI features of its own: AI Insights explains failed tests, and there is an MCP server for agents. Both are described where they fit, and only as far as their documentation and our own runs show.

## Course map[#](https://testingbot.com#course-map)

Every chapter builds on one small project: a Playwright suite for the TodoMVC demo at `demo.playwright.dev/todomvc`, plus a one-page shop used to break things on purpose.

1. Set up an MCP-capable agent with Playwright MCP and drive a real browser
2. From test plan to test: generating Playwright tests, and the checklist for accepting them
3. Playwright Test Agents: the planner, generator and healer, run end to end
4. Self-healing tests: when healing is right and when it hides a regression
5. AI for failure triage: error context, traces, logs and privacy
6. Running the reviewed suite on TestingBot, and what the TestingBot MCP server can do
7. Guardrails: prompts in the repo, secrets, cost, CI policy and reviewing diffs
8. A knowledge check

You need Node.js 20 or newer, an MCP-capable AI client, and for chapter 6 a TestingBot account. If Playwright itself is new to you, the free [Playwright course](https://testingbot.com/resources/courses/playwright) teaches the test runner from scratch. AI helps more once you can judge the code it writes.

The free certificate at the end needs a passed exam and a practical task: an agent-generated, human-reviewed Playwright suite of at least three tests that passes on the TestingBot grid on at least two browser configurations.

[Next · Chapter 2 Set Up an Agent with Playwright MCP](https://testingbot.com/resources/courses/ai-test-automation/set-up-playwright-mcp)

On this page

1. [What people mean by "AI test automation"](https://testingbot.com#what-people-mean-by-ai-test-automation)
2. [What stays human](https://testingbot.com#what-stays-human)
3. [What this course does and does not claim](https://testingbot.com#what-this-course-does-and-does-not-claim)
4. [Course map](https://testingbot.com#course-map)

Certification

This course has a free, hands-on certificate.

[How it works](https://testingbot.com/resources/courses/ai-test-automation/certification)

## Other free courses

- [Visual Regression Testing Tutorial A free, hands-on visual regression testing course: screenshot baselines with Playwright, stable screenshots...](https://testingbot.com/resources/courses/visual-regression-testing)
- [Selenium with Python and pytest A Selenium Python tutorial built on pytest: setup with Selenium Manager, locators, explicit waits, fixtures...](https://testingbot.com/resources/courses/selenium-python)
- [Playwright Tutorial: Zero to CI A hands-on Playwright tutorial in TypeScript: locators, auto-waiting, fixtures, auth, debugging, parallel r...](https://testingbot.com/resources/courses/playwright)
- [Page Object Model and Framework Design Learn the Page Object Model in Selenium and Playwright, then grow it into a test automation framework that ...](https://testingbot.com/resources/courses/page-object-model)

[Browse all courses](https://testingbot.com/resources/courses)
