1. Shipping with evidence¶
"The unit tests passed."
Most production incidents are preceded by that sentence. It is usually true. The unit tests did pass: they just weren't testing the thing that broke. The event was published with the wrong quantity. A consumer dropped a message it couldn't parse. A field the mobile app depended on disappeared from an API response. Another user's order became readable to anyone who knew its ID.
None of those are exotic. They live between the parts of a system, where unit tests don't look, and they are found by the kinds of testing that are slow, specialised and easy to skip under deadline pressure: contract testing, API flows with database checks, security testing, integration testing against a real message broker, load testing.
This book is about doing that testing routinely, with AI agents doing most of the work, and turning the results into a release decision you can defend.
Three ideas¶
Everything in the K11 QA system rests on three ideas.
1. Evidence, not assertions¶
When an AI agent writes a test, the test can look right and be wrong. It can assert the wrong value, select the wrong element, or pass because the thing it checks never happened. An agent that says "all tests pass" has told you very little.
So every K11 tool produces evidence: a report a person can check. A locator comes with proof that it matches exactly one element. A healed locator comes with a confidence score, the reasons for it and the runner-up it rejected. A failed API flow comes with the request, the response and the database row. A failed integration flow comes with the closest message that did arrive, and how it differed from what was expected.
Evidence is what makes AI-assisted testing trustworthy: you don't have to trust the agent, you can check its work.
2. A written policy, not a feeling¶
Given the evidence, someone still has to decide whether to release. Today that person reads several CI tabs, weighs things nobody wrote down ("is a medium security finding OK this close to the deadline?") and decides. Two people, or the same person on two different days, decide differently.
The K11 Release Gate replaces that with a written release policy: which evidence is required, how fresh it must be, who signs off, and what each kind of finding means. The same evidence under the same policy always gives the same decision. The policy is a file in your repository, reviewed and changed like code.
3. Four answers, not two¶
A pass/fail gate is too blunt. Teams react to it by making it lenient (so it rarely blocks) or by working around it (so it rarely matters). The K11 gate has four answers:
| Verdict | Meaning | Example |
|---|---|---|
| ๐ข Ship | Release | Required evidence present, nothing failing |
| ๐ก Ship with conditions | Release, and deal with the listed conditions | Evidence is getting stale; locators were healed and the heal needs approval |
| ๐ Needs a person | A named approver must look first | A contract change breaks a known, non-critical consumer; a performance regression |
| ๐ด Block | Don't release | Failed tests, a critical consumer broken, a high-severity security finding, missing required evidence |
Needs a person is the important one. It automates the clear cases in both directions and routes the uncertain ones to a named human with the evidence attached. This is risk-proportionate human-in-the-loop control, the subject of the K11 research on autonomous CI/CD quality assurance1: humans review what's genuinely uncertain, not everything.
What it looks like¶
On every pull request, the gate posts one comment and keeps it up to date:
Release gate: ๐ด Block โ PR #2
1 blocker(s), 0 needing a person, 0 condition(s). Policy K11 Shop release policy (.qa-mcp/release-policy.yaml).
Blockers
- 1 integration flow failed (
integration.failed, .qa-mcp/integration-report/integration-report.json)
- An order reserves stock through the inventory consumer: the inventory consumer reserves all 3 (expect_message): message on orders.events: 0 of 1 matching message(s) within 10s (2 message(s) on orders.events); closest:
$.qty: expected 3, got 2Evidence
Area Result SHA-256 API contract 0 breaking, 0 consumer(s) affected 817505d2cebfAPI functional tests 2/2 flows passed, 0 server errors 9dad2f5fdb91Security (API tests and scanners) 0 critical, 0 high, 0 medium; 0 API test(s) failed 0541e13b969bIntegration (messaging, jobs, databases) 3/4 flows passed; 2 published, 6 message checks, 2 job run(s) 186127450501Test suites (JUnit) 13 tests, 0 failed, 0 skipped f0311ec40f3aDecided by k11-release-gate-mcp 0.4.0, deterministically from the evidence and policy above.
The unit tests passed. The gate blocked anyway, and said exactly why. That pull request is open in the live demo, and Chapter 17 walks through it.
What this book covers¶
- Part I sets up the system and introduces the habit that makes AI-generated tests worth having: ask before you build.
- Part II covers each kind of testing in turn: web UI, mobile, API contracts, API functional tests, API security, integration and messaging, performance, and LLM applications. Each chapter ends with how its evidence reaches the gate.
- Part III is about deciding: the release policy, the GitHub Action that enforces it on every pull request, and the Claude Code agent that runs the whole process before you push.
- Part IV puts it into practice: a complete walkthrough, a plan for adopting it across a team, and troubleshooting.
-
K. Jadhav, "Autonomous CI/CD Quality Assurance Using LangGraph Multi-Agent Orchestration and Risk-Proportionate Human-in-the-Loop Control", International Journal of Engineering and Computer Science, 2026. doi:10.18535/ijecs/v15i06.5563 ↩