Preface

In 2024, when I first started exploring GenQA, I discovered that AI models, specifically Gemini and Claude, could help me generate test cases. Using my companies’ APIs and tokens, we built a connector that read user stories from Jira and used the models to generate test cases in tools like Xray.

But there was a problem: the trigger was manual. Later we scheduled the process with scripts and kept a manual validation step. That is when we realized we could save real time. The catch was that the test cases came out quite generic. We added more context to the models, and the results improved.

Next, we brought test automation into our GenQA process and saw the same pattern: without context, the output was generic or simply wrong. So we started working with the famous “agents,” and the process turned out to be far from simple. That was our first glimpse of what I now call Agentic QA, and it is the core idea behind this book. It also explains why so many GenQA implementations look generic and fail to scale.

That experience gave rise to several processes and many ideas for improvement. And as I have always told my teams, it is better to share knowledge so we can all get better together. This book is that knowledge, shared.

Who this book is for

This book is for QA engineers, SDETs, test leads and developers who already write automated tests and want to go beyond “asking a chatbot for test ideas.” You will get the most out of it if you:

  • can read and write TypeScript,
  • have used Playwright or another end-to-end testing framework,
  • are comfortable with Git and the basics of a CI pipeline.

You do not need a background in machine learning, and you do not need to commit to any particular AI vendor. Every agent in this book runs on Claude, GPT, Gemini or a local model by changing configuration, not code.

What you will build

Throughout the book you will build QA Crew, a team of AI agents that tests a small booking application. Each agent has one job, just like the people on a good QA team:

  • the Analyst turns user stories into risks and open questions,
  • the Designer turns those risks into test cases worth keeping,
  • the Executor writes and runs Playwright tests,
  • the Triager turns a red build into an actionable bug report,
  • the Reviewer checks the work of the other agents.

By the end, the crew runs in your CI pipeline, works from inside your IDE, and comes with evaluations that tell you whether you can trust it.

How this book is organized

  • Part 1 — Foundations explains what an agent is, gives it tools through MCP, and shows where QA fits in Spec-Driven and Organic Driven Development.
  • Part 2 — Building single QA agents builds the Analyst, Designer, Executor and Triager, one per chapter.
  • Part 3 — Multi-agent orchestration turns those agents into a team with hand-offs, reviews and a human in the loop.
  • Part 4 — Production and trust covers evaluation, CI/CD, cost, governance, and testing software that has AI inside.

The chapters build on each other, but each one ends with a tagged commit in the companion repository, so you can jump in at any chapter.

How to use the code

All the code lives in the companion repository, qa-crew. Clone it, check out the tag for the chapter you are reading (for example ch05-done), and follow along. Appendix A walks you through setting up Node.js, Playwright and API keys for the model providers you want to use.

If something is unclear, wrong or missing, tell me: reader feedback is how this book gets better, in the same spirit it was written.

Enrique A. De Coss