Test Generation Gaps in Vibe Coding Sessions
AI-written tests mostly confirm the code, not the requirement.

Vibe coding creates a test generation gap when the process that writes the code also decides what counts as proof that it works. Verification confirms the implementation, leaving the requirement unverified. Closing that gap requires independent acceptance criteria, tests aimed at the boundaries the model overlooks, and verification that keeps pace with generation.
Why vibe coding shifts testing burden without shifting testing responsibility
Vibe coding promised to remove the bottleneck of writing code. In practice, it relocates that bottleneck to verification. Andrej Karpathy coined “vibe coding” in February 2025 to describe accepting AI suggestions, skipping diff review, and pasting errors back until the code runs. He explicitly framed it as suitable for weekend projects. The distinction is consequential because getting a program to run is a narrower task than establishing that it behaves correctly.
The intent-in, code-out, observe-and-reprompt loop compresses generation without similarly compressing the work of defining correctness. The KAUST/MAG Tech state-of-the-art review describes peer-reviewed field experiments in which far more tasks were completed per week, while team-level telemetry shows that code-review time rose sharply. Its explanation separates output volume from productivity. More generated code creates more work to assess, even when producing each change takes less time.
Tampere University’s multivocal literature review, published in the Journal of Systems and Software and covering 266 sources, describes developers shifting toward directing, supervising, and validating. Validation receives no equivalent tooling acceleration in that workflow. CloudBees’ State of Code Abundance 2026 findings reflect the resulting inversion, with more enterprise technology leaders naming reviewing, testing, and deploying as the bottleneck than naming writing code. Responsibility for correctness remains with the team even when authorship moves to an agent.

How the generative loop itself produces the illusion of test coverage
When a model generates tests from its own implementation, it can use the behavior it produced as the definition of success. A test may execute the relevant code and pass while never asking whether that code fulfills the team’s intent. High coverage then measures how much of the implementation was exercised.
Security makes the circularity particularly clear. A model that overlooks an insecure choice has no independent reason to generate a test challenging that choice. Repeating the generation loop does not necessarily correct the omission. The KAUST/MAG Tech review describes a peer-reviewed 2025 study in which researchers submitted secure code to an LLM for iterative refinement. Even when asked directly to improve security, the model added new vulnerabilities while patching obvious ones.
Session-to-session generation compounds this problem because the agent can reintroduce a bug without a persistent record of the correct behavior. A regression suite could preserve that record. But if tests merely follow each new implementation, they can absorb its changed assumptions. The system and its tests agree because they share a premise, while the intended behavior remains outside that agreement.
What vibe-coded apps actually look like at the edges the tests don't reach
Minitap describes a familiar surface pattern in vibe-coded applications. The first five minutes look impressive, and the happy path runs cleanly. Trouble appears in a form without validation, an error state that spins forever, or a network call without retry logic. These are failures to account for the conditions under which a visible feature must operate.
Architecture can fragment across sessions in the same way. A checkout flow written Tuesday might use async/await, while one written Thursday uses promise chains, with neither generation accounting for the other. Different syntax alone does not mean there is a defect. Session-by-session test generation can reproduce the same separation, leaving interactions between independently generated parts unexamined.
TestFort identifies a related instability in the interface. Small UI changes or prompt tweaks can affect several parts of an application, and selector-based tests may fail because the structure changed even when the feature still works. That noise complicates the distinction between a broken test and broken behavior. The Tampere review describes the broader quality problem as accepting code based on what it does without reading all of it. At the security boundary, skipped input validation and hardcoded secrets can therefore survive both the demonstration and tests derived from the same assumptions.
What production impact looks like when the gap reaches users
CloudBees found that a large majority of enterprise technology leaders reported an increase in production issues tied to AI-generated code. An equally large majority expressed confidence in that code’s production readiness. Those findings put confidence and outcomes in direct tension. They show why confidence alone is an inadequate release signal.
The “three-month black box effect” describes a project that felt fast to build but becomes difficult for anyone, including its builder, to explain or modify safely months later. Without tests encoding intended behavior at build time, later changes lack a durable reference. The original generation session may have produced working software without preserving the knowledge needed to maintain it.
That distinction links production reliability to maintainability. A suite that only confirms the current implementation provides little help when the team must decide whether a later change is legitimate or a regression. The missing artifact is a record of what the application was supposed to do, independent of how the agent happened to implement it.
Why running more tests and adding AI code review haven't closed the gap
CloudBees found that most engineering leaders had changed their testing approach in response to AI-generated code, most by running more tests. Yet production problems persisted despite that response. More tests cannot fix circular verification when they take their assumptions from the implementation.
AI code review addresses a different surface. Bug0 distinguishes reviewing a change for bad patterns, obvious logic errors, and security smells from watching an application complete a real user flow. A diff review cannot itself observe login, routing through three components, real authentication, and the final rendered result. A checkout flow can therefore be broken even after a good review. Neither test volume nor review status substitutes for runtime evidence across the system.
CloudBees found that 70% of engineering leaders considered maintaining their test suite a bigger burden than writing code. TestFort explains that traditional test design can struggle here because it needs clear requirements, architecture that stays stable, and logic that can be traced, which vibe-coded applications often lack. More scripts tied to structures that keep changing mean more repairs, without always finding more defects.
Formal verification provides a serious counterexample. Töpfer, Plášil, Bureš, and Hnětynka produced a valid adaptation manager within a few iterations in their Dragon Hunt case study by checking formally specified architectural and functional constraints without human code inspection. Fine-grained constraint violations supplied useful feedback where coarse metrics stalled. The finding supports independent specifications. Its scope is narrow, however, because a domain-expert-designed, formally specifiable system differs from an arbitrary production application with no formal specification.
The failure modes that matter most and how to test against each one specifically
Circular verification requires a source of correctness outside the implementation. The Test-Driven Model, or TDM, supplies that separation by defining tests and acceptance criteria before asking the AI to generate code. Its research treats tests as specifications, meaning precise constraints on generation. Human-authored acceptance criteria written before the session establish what the implementation must satisfy.
This sequence changes the role of a passing test. It becomes evidence against a prior requirement rather than agreement with a later interpretation of generated code. The constraint predates the implementation. That breaks the specific dependency that allows the implementation to define its own success.
Edge-case blindness calls for a different intervention. TestFort recommends exploratory testing before spending time on structured test cases because it does not assume that the team has already settled the structure and what the code should do. It also recommends testing full user flows and making edge cases a primary focus. For a team adopting this approach, the question changes from whether an isolated function returns its expected value to whether the user’s task survives error states, unexpected inputs, and concurrent activity.
Stable boundaries provide a useful starting point. Minitap identifies API contracts, database schemas, and third-party integrations as surfaces that hold even when a later prompt session rewrites internal components. Testing those boundaries can keep checks working as the implementation changes underneath them. This is a different objective from preserving selectors on a changing component tree. The test is anchored to an agreement between parts of the system.
Cross-session inconsistency requires tests at the seams between generated changes. Integration tests that check how Tuesday’s async/await code works with Thursday’s promise chains cover behavior that neither session may have taken into account. Research on automated verification pipelines also proposes provenance watermarks and traceability between requirements and test cases. The practical purpose is continuity across generation sessions. A requirement should remain connected to the tests that establish it, rather than disappearing into a succession of prompts and local fixes.
Security surface exposure needs an adversarial perspective from the start. TestFort recommends security testing from the first working version. Deliberately submitting malformed inputs, empty fields, oversized payloads, and concurrent requests probes conditions the happy-path implementation may never have considered. The omission is not repaired by asking the same model to confirm its original choices.
Maintenance collapse occurs when the generated UI changes faster than its tests can be repaired. Minitap identifies selector-based frameworks as a poor fit when an AI can rearrange the component tree overnight. Tests written in terms of behavior are more likely to keep working when the structure is rewritten. The distinction is between asking whether the user can complete a task and depending on the current structure used to present it.
Minitap’s autonomous agent takes that approach by reading the application from source, mapping test scenarios automatically, and running full regression suites on cloud simulators without scripts that need to be maintained. That capability addresses the maintenance mechanism directly. It does not, by itself, make implementation-derived scenarios independent acceptance criteria. Automation reduces the work of keeping verification executable, while the prior specification still defines what correct behavior means.
Bug0’s Passmark engine combines a forward-deployed engineer with AI-executed, self-healing tests. The engineer writes the tests, and a human verifies them before they gate release. This arrangement separates human judgment about expected behavior from automated execution and repair. The workflow uses AI to perform more testing while preserving responsibility for the test’s meaning and reducing the maintenance burden created by rapid code changes.
What the testing gap actually demands from teams adopting vibe coding at scale
Verification has to become a first-class output of the development session rather than work deferred until generation is complete. The organizational implication of TDM is therefore broader than test ordering. Acceptance criteria written before generation determine what the agent is constrained to produce and what the team can later defend as correct. That discipline gives supervision a concrete artifact.
The Tampere review’s account of developers moving toward directing, supervising, and validating places responsibility in that verification layer. It also calls for research into session-level workflow dynamics, safeguard mechanisms, long-term maintainability, and production use. With those questions still open, claims that the problem is already solved can only go so far. They ask whether safeguards keep working as the code changes again and again, beyond an agent producing a passing suite once.
CloudBees’ inverted bottleneck suggests where additional capacity can have greater leverage for teams already generating code quickly. Faster generation adds little if review, testing, and deployment remain constrained. Bug0’s formulation makes the operational requirement plain. Features generated in minutes cannot depend on tests that take days to write and break whenever the UI shifts. Verification must preserve an independent definition of correctness while moving at the speed of the code.
Sources
- Vibe Coding: Practice, Performance, Productivity, and Risk -A State-of-the-Art Review
Supplied the field-experiment findings on rising review time and the study showing an LLM added vulnerabilities when asked to improve secure code.
- Vibe Coding in Software Development: A Multivocal Literature Review
Provided the account of developers shifting toward directing, supervising and validating, the quality concern about accepting unread code, and the open research questions.


