AWS Builder Center
Kiro Doesn't Just Write Tests. It Proves Properties.

Kiro Doesn't Just Write Tests. It Proves Properties.

"All tests passed" has never meant "the code matches my intent." Kiro's property-based testing is the first feature I've used that takes that gap seriously, and it is honest about the part it still cannot close.

I have spent the better part of a year telling customers the same uncomfortable thing. "All tests passed" is not the same as "the code does what your spec said." A green suite tells you that the examples someone thought to write behave the way that someone expected. It says nothing about the cases nobody imagined, which is exactly where an AI agent, generating code fast against a fuzzy requirement, tends to be wrong.
Kiro shipped a feature that finally puts a name and a mechanism to that gap: property-based testing traced back to your requirements. It is the feature I now open with when someone asks me why spec-driven development is different from "autocomplete with a chat box." I am also going to show you the honest edge of it, because the title overstates what any tool can do, and that overstatement is half the lesson.

The lie inside a green checkmark

Here is the failure mode I see constantly. You write a requirement, "users can only claim a ticket once," and hand it to an agent. The agent writes the handler, writes three unit tests (claim once: ok; claim a missing ticket: 404; claim someone else's: 403), runs them, they pass. Ship it.
Then in production two requests race. Both read "unclaimed," both write "claimed," and one ticket gets claimed twice. No test caught it, because no human wrote the test for the case no human pictured. The suite was green and the code was wrong, and those two facts were never in tension, because example-based tests only ever check the examples you enumerate.
This is not a niche worry. It is the oldest known limit of testing. Edsger Dijkstra put it in 1970: "Program testing can be used to show the presence of bugs, but never to show their absence." Concurrency makes it sharper. As one plain summary of the race-condition problem puts it, "your tests pass because they never hit the exact interleaving that causes the bug." The interleaving that breaks the ticket handler is one specific ordering out of millions, and your three hand-written tests will essentially never sample it.
Most testing is example-based: concrete inputs, one expected output, written by hand. Your coverage is bounded by your imagination, and for AI-generated code it is bounded twice, because the agent's imagination is bounded by yours in the prompt.

From an example you wrote to a property that must always hold

Property-based testing (PBT) flips the direction. Instead of listing cases, you state a rule that must hold for all valid inputs, and the tool generates hundreds or thousands of random inputs trying to break it.
The idea is not new, and that maturity is a feature, not a footnote. It comes from QuickCheck, the Haskell tool Koen Claessen and John Hughes published at ICFP 2000, which "aids the Haskell programmer in formulating and testing properties of programs. Properties are described as Haskell functions, and can be automatically tested on random input." Every modern PBT library descends from that paper: Hypothesis in Python, fast-check in JavaScript and TypeScript (described by its own author as a framework "like QuickCheck"), and the Erlang version Hughes went on to commercialize at Quviq.
That commercial track record is the reason to take PBT seriously rather than as an academic toy. Hughes and his colleagues used QuickCheck to test AUTOSAR software for Volvo Cars. In their own account, they "translated over 3000 pages of textual specifications into QuickCheck models," tested many implementations against them, and this "resulted in over 200 issues which we raised with Volvo and the software vendors." Three thousand pages of spec turned into generated tests that found more than two hundred real problems. That is the scale of bug that example-based testing quietly walks past.
The single most useful mechanic in PBT is shrinking. When a random input triggers a failure, that first failing input is usually huge and noisy, a thousand-element list or a two-hundred-character string. Shrinking automatically reduces it to the smallest input that still reproduces the failure. Hypothesis describes exactly this: it "takes that example and cuts it down to size, simplifying it until it finds a much smaller example that still causes the problem." So instead of a wall of noise you get "it breaks on the empty list." The root cause is handed to you rather than excavated.

Traceability is the feature, not the tests

Plenty of libraries do PBT. What Kiro adds is the link back to the requirement, and that link is the actual product.
Kiro extracts properties directly from your EARS requirements. EARS (Easy Approach to Requirements Syntax) is not something Kiro invented. Alistair Mavin and colleagues at Rolls-Royce created it while analyzing airworthiness regulations for a jet engine control system, and published it at the IEEE Requirements Engineering conference in 2009. It constrains requirements to a small set of templates: a state-driven "WHILE," an event-driven "WHEN," an optional-feature "WHERE," and an unwanted-behavior "IF/THEN." Mavin's own materials note that this structure gives you "improved testability," because "the structured separation of conditions and responses makes it straightforward to derive test cases." A requirement like "WHILE a listing is active, WHEN an authenticated user opens it, THE SYSTEM SHALL display that listing" is already a property. The "for all authenticated users and all active listings" is the universal quantifier that PBT needs.
Kiro reads the requirement, decides which requirements can be turned into a testable property, and when you choose to run them, throws generated inputs at your implementation. Then it shows the property as a first-class object linked to its requirement and to the task. When a property test later fails, you are not staring at a red assertion in isolation, you are looking at "this generated case violates the property that came from Requirement 1.2." The failure points at intent, not just at code.
I did not want to take the vendor's word for this, so it matters that an outside engineer has tried the exact feature and written it up. Hironori Maruoka, at the consultancy Mamezou, tested Kiro's correctness feature in December 2025 on, of all things, a ticket-management state machine. His account lines up with the mechanics above and adds the part I find most convincing. The generator surfaced cases he had not specified: "issues that I had not considered as part of the specification were detected, such as consecutive spaces being normalized by HTML, and ambiguous handling of leading/trailing spaces or titles consisting only of spaces." His conclusion is the one worth quoting: "the value of PBT lies not in exhaustively trying all cases but in bringing to light inputs or assumptions that people had not anticipated." On traceability, he confirms that in the generated task file, "properties, requirements, tests, and implementation tasks are mapped, making it possible to trace why this test exists."
That closes the loop I care about:
  • Requirement: an EARS statement of intent.
  • Property: the machine-checkable universal form of that intent.
  • Generated cases: hundreds of adversarial attempts to violate it.
  • Failure: shrunk to a minimal reproducer, traced back to the exact requirement it breaks.
When a property fails, Kiro lets you chat through the fix and decide the right level to fix it at: the implementation, the test, or the requirement itself. That last option matters more than it sounds. Often a property failing means your requirement was ambiguous, and the fix belongs upstream in the spec.
One caveat, stated plainly: this is IDE-only today. The correctness feature ships in the Kiro IDE, not the CLI, Web, or Mobile, and property tests are optional by default. You focus on core implementation first and turn them on when you want the evidence. If your workflow lives in the CLI, this is not there yet.

The line the title does not cross

The honest part first, because it is the whole point. The documentation is more careful than my title. PBT gives you evidence of correctness, not a proof. It is explicitly not formal verification. Passing a thousand generated cases raises your confidence a lot. It does not guarantee the absence of bugs.
This distinction is real and worth holding precisely. Formal verification tools such as TLA+ (model checking) and Dafny (auto-active program verification) can certify that a property holds for every possible input, by mathematical proof rather than by sampling. PBT sits alongside them as a formal method that does not produce that certificate. A 2026 arXiv survey frames the taxonomy cleanly: formal verification is the subset of methods that "can produce and unequivocally certify mathematical proofs," and PBT is not in it. So the working engineer's version of my title is quieter: Kiro gathers strong, requirement-linked evidence, and tells you honestly that evidence is not proof.
With that stated, here is what changes:
  • "Tests pass" and "matches intent" are different claims, and now you can tell them apart. Example tests check enumerated cases. Properties check the universal rule behind them. For AI-generated code, where the gap between "compiles and passes" and "correct" is widest, that distinction is the safety rail.
  • A weak property is worse than no property, because it is green. A property that states the wrong invariant, or one too loose to constrain anything, passes while the behavior is broken. Writing the property forces you to say precisely what must always be true, which is real work, and it is exactly the work that surfaces a vague requirement before code exists.
  • Not everything maps to a property. Requirements dominated by external services or non-determinism do not cleanly become universal rules. Those still want example-based tests or mocking. PBT is a sharp tool for the invariant-shaped parts of your spec, not a replacement for the rest.
  • The traceability is the durable asset. Long after a specific test is rewritten, "this property came from this requirement" is what lets you reason about coverage at the level of intent instead of the level of assertions.
  • Use it to pressure-test the spec, not just the code. The highest-value moment I have had with it is a property failing and the correct fix being the requirement. That is the feature quietly doing requirements review for you.
I have stopped telling customers "the tests pass." I have started asking "which requirements have properties, and what did the generator try that you never would have?" That second question is the one that finds the double-claimed ticket before your users do.
Where in your codebase does a green suite give you false confidence, and which requirement, written as a "for all" rule, would a random-input generator break first?

Sources: Kiro documentation, Correctness with Property-based tests  (updated 2026-08-04), for availability, the "evidence not proof" limitation, EARS extraction, shrinking, and requirement traceability. Koen Claessen and John Hughes, "QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs," ICFP 2000 . John Hughes et al., "Testing AUTOSAR software with QuickCheck," ICST 2015  (the "3000 pages / 200+ issues" figures). Hypothesis documentation  for shrinking. Alistair Mavin et al., "Easy Approach to Requirements Syntax (EARS)," IEEE RE 2009 . Hironori Maruoka (Mamezou), "Getting Started with Property-Based Testing in Kiro"  (2025-12-17), independent hands-on review. The evidence-vs-proof taxonomy draws on a 2026 arXiv preprint, "Real-World Property-Based Tests as Lean Challenges" . The double-claimed-ticket scenario is my own illustration; the Dijkstra quotation is from his 1970 "Notes on Structured Programming."
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article