From Copilot to Crew: Why Agentic QA

In the preface I described how my teams went from “ask a model for test cases” to “build a team of agents.” That journey took months, and most of what we learned came from things that did not work. This chapter compresses those lessons into a map, so you can skip some of the detours we took.

By the end of this chapter you will:

  • understand the difference between a copilot, an agent and a multi-agent team,
  • know where AI agents genuinely help in testing today, and where they hurt,
  • have a mental model for working with agents as a test lead rather than as a typist,
  • meet QA Crew, the team of agents you will build in this book,
  • have the companion project running on your machine.

Four ways to use AI in testing

Most teams meet AI in testing through one of four doors. They look similar from the outside, but they solve very different problems.

The copilot: AI as autocomplete

A copilot sits inside your editor or chat window and responds to you. You write a prompt, a comment or half a test, and it suggests the rest.

In this book, copilot (lowercase) means a category of tool, not a specific product: any AI assistant that responds when you ask. GitHub Copilot is one example; Cursor, Claude Code and Codex are others, and all of them are excellent at this kind of work.

It helps to look at this from the way people actually use AI day to day. Many people, testers included, still use AI the way they use a search engine: they ask a question, read the answer and move on. “What are good test cases for a login page?” “Why does this selector fail?” That is copilot mode in its simplest form. It is useful, but the human does all the driving, and the AI only knows what the question tells it.

Agent mode is a different way of working. You hand the AI a goal, and it works on its own, usually in an isolated space such as a sandbox, a separate branch or a test environment. It reads files, runs commands and checks results until it finishes or needs you. Many of today’s tools, including GitHub Copilot, Cursor, Claude Code and Codex, offer both modes. The tool can be the same; the way of working is not.

This distinction matters because most teams that say they “use AI for testing” are still in the first mode. There is nothing wrong with that, but it explains why the results often feel generic: a question can only be as good as the context it carries.

The copilot is fast, cheap to adopt and genuinely useful. It writes boilerplate, suggests assertions, explains a stack trace and turns a description into a first draft of a test. Mark Winteringham’s Software Testing with Generative AI is a good guide to getting the most out of this way of working; this book starts where a single assistant stops.

But a copilot has three properties that limit it:

  1. It waits for you. Nothing happens until a human asks.
  2. It sees only what you show it. Its context is whatever is in the prompt or the open files.
  3. It does not check its own work. If the test it writes passes, the copilot has no way of knowing whether it passed for the right reason.

That third point is the one that bites testers. A test that passes for the wrong reason is worse than no test, because it creates confidence you have not earned.

The pipeline: AI as a scheduled step

The second door is what my teams built first: a script that runs on a schedule, reads user stories from the issue tracker, sends them to a model and writes the generated test cases into a test management tool.

This removes the first limitation. Nobody has to remember to ask. But it keeps the other two. The model still sees only the user story text, so the output is generic. And nobody checks the output except a human doing manual review, which quickly becomes the bottleneck.

We learned that adding context, such as acceptance criteria, API contracts, existing tests and past bugs, made the output dramatically better. That lesson is the seed of everything else in this book: the quality of AI-generated testing is bounded by the context the AI can reach.

The agent: AI that acts, observes and decides

An agent is a model running in a loop with access to tools. Instead of producing a single answer, it:

  1. reads the goal and the context it has,
  2. decides on an action, such as reading a file, calling an API, running a test or opening a page,
  3. observes the result,
  4. decides what to do next, and repeats until the goal is met or it decides to stop.

The difference is not that agents are smarter. It is that they can go and get context instead of waiting for you to paste it, and they can check results instead of assuming them. An agent that writes a Playwright test can run it, read the failure, look at the page and try again.

That is a big step, and it brings new problems. An agent can loop forever, spend a lot of money, take actions you did not intend or fix a failing test by weakening its assertion. Much of this book is about getting the benefits of agents while containing those risks.

The crew: many agents, each with one job

The last step is to stop asking one agent to do everything. In a real QA team, the person who analyzes requirements is not always the person who writes automation, and the person who reviews a test plan is deliberately not the person who wrote it.

A multi-agent crew follows the same logic. Each agent has a narrow role, its own instructions and its own tools. Agents hand work to each other through clear contracts, and at least one agent exists only to review what the others produced.

The table below summarizes the four approaches.

Approach Who starts it What it can reach Who checks the output
Copilot A human, every time What you show it You
Pipeline A schedule or trigger A fixed set of inputs You, manually
Agent A goal or trigger Whatever its tools allow The agent itself, partially
Crew A goal or trigger Each role’s own tools Dedicated reviewer agents, then you

None of these replaces the others. You will keep using a copilot while you write the code in this book. The goal is to know which tool fits which job.

Where agents help today, and where they hurt

It is easy to be either too excited or too cynical about agents. Both positions are expensive. Here is a more useful way to think about it, based on what we saw in practice.

Where agents help

  • Analysis at volume. Reading every user story in a sprint and flagging ambiguity, missing rules and contradictions is tedious for humans and well suited to an agent.
  • First drafts of test design. Given good context, an agent applies boundary values, equivalence partitioning and state transitions consistently and quickly. You still decide which cases are worth keeping.
  • Synthetic test data. Valid, invalid and edge-case data that respects your schema, without copying production data.
  • Turning specs into runnable tests. With access to the app and to your page objects, an agent can go from a test case to a working Playwright test faster than most humans.
  • Triage. Reading logs, traces and recent commits to classify a failure as a product bug, a test bug, an environment problem or flakiness.

Where agents hurt

  • False confidence. An agent rewarded for green builds will find ways to make the build green. Some of those ways are wrong.
  • Generic output without context. This is the most common failure of GenQA initiatives, and it is the reason so many of them look impressive in a demo and fail to scale.
  • Cost and latency. Every loop costs tokens and time. An agent that explores without a budget can be slow and expensive.
  • New flakiness. Models are not deterministic. The same input can produce a different test tomorrow, and that variability can leak into your suite.
  • Safety. An agent with write access to a real environment can do real damage. Agents in this book only act on test environments, and side-effect tools are always explicit.
An icon indicating this blurb contains a warning

The most dangerous agent is one that is allowed to change a test’s assertions in order to make it pass. In Chapter 8 you will build a Triager that is explicitly forbidden from hiding a product bug, and in Chapter 12 you will measure whether your agents are really catching defects.

You are the test lead now

The biggest change in agentic QA is not technical. It is your role.

When you use a copilot, you are the one writing, and the AI types faster. When you work with a crew, the agents do most of the typing and you lead the team. Your job shifts toward:

  • setting the goal and the quality bar, such as what “done” means for this feature and which risks matter most,
  • curating context, making sure agents can reach specs, contracts, past bugs and conventions,
  • approving decisions, such as the test plan, the tests worth keeping and the bugs worth filing,
  • evaluating the team, measuring whether the agents are getting better or worse.

This is the same shift that happens when a strong individual contributor becomes a lead. The skills that made you a good tester, such as curiosity, skepticism and risk thinking, become more valuable, not less. You apply them to a team that happens to include agents.

Lisa Crispin and Janet Gregory made the case years ago, in Agile Testing, that quality belongs to the whole team, not to the testers alone. A crew of agents makes that idea more true, not less: the agents join the team, and the team still owns the result.

The pattern for the rest of the book is simple: agents propose, humans decide. Every chapter will show you where the human checkpoint belongs.

Meet QA Crew

Throughout this book you will build QA Crew, a team of five agents that tests a small booking application. Each agent gets its own chapter.

Agent Job Chapter
Analyst Turns user stories and specs into risks and open questions 5
Designer Turns risks into test cases worth keeping 6
Executor Writes and runs Playwright tests, and iterates until they pass for the right reason 7
Triager Turns a failing run into a classified, actionable bug report 8
Reviewer Checks the work of the other agents before a human sees it 10

In Part 3 you will connect them with an orchestrator, add approval gates and expose the whole crew as MCP tools, so you can call it from your IDE. In Part 4 you will evaluate it, run it in CI and use it to test a feature that has AI inside.

Two design principles hold for every agent you build:

  1. Vendor-agnostic. Every agent talks to models through a thin abstraction, so switching between Claude, GPT, Gemini or a local model is a configuration change. You will build that abstraction in Chapter 2.
  2. Tools through MCP. Agents reach the browser, the file system and the booking API through the Model Context Protocol, an open standard. The same tools also work from coding assistants such as Claude Code, Cursor, Copilot and Codex. You will build them in Chapter 3.

Setting up the companion project

Every chapter builds on the same repository. Let’s get it running.

What you need

  • Node.js (a current LTS version)
  • Git
  • An API key for at least one model provider, or a local model runtime
  • About 15 minutes

Appendix A covers each of these in detail, including how to keep API costs low while you follow along.

Clone and install

1 git clone https://github.com/enriquedcs/qa-crew.git
2 cd qa-crew
3 git checkout ch01-start
4 npm install
5 npx playwright install

Start the booking app

The system under test is a small booking application with a REST API and a web UI. It runs locally and resets its data every time it starts, so you can break it freely.

1 npm run app

Open the URL printed in the terminal and create a booking or two to get a feel for the app.

Run the baseline suite

The repository includes a small, hand-written Playwright suite. This is the “before” picture: what a typical team has before any AI gets involved.

1 npm test

All tests should pass. Take a moment to read them in tests/baseline/. In the next chapters, QA Crew will analyze the same app and propose what these tests are missing.

An icon indicating this blurb contains information

If a test fails on a clean checkout, the problem is almost always the browser install or a port already in use. Appendix A lists the common fixes.

Summary

  • A copilot waits for you and sees only what you show it. A pipeline removes the waiting but keeps the context problem. An agent can fetch context and check results. A crew splits the work into roles and adds review.
  • The quality of AI-generated testing is bounded by the context the AI can reach. That is why so many GenQA efforts produce generic results.
  • Agents help most with analysis, test design, data, conversion of specs into tests, and triage. They hurt through false confidence, cost, non-determinism and unsafe actions.
  • In agentic QA, your role shifts from writing every test to leading a team: setting the bar, curating context, approving decisions and evaluating results. Agents propose, humans decide.
  • QA Crew is the team you will build: Analyst, Designer, Executor, Triager and Reviewer, vendor-agnostic and connected through MCP.

In the next chapter, you will open the box and build your first agent loop from scratch in about 150 lines of TypeScript.