· 7 min read

    How to Test an App You Did Not Write Line by Line

    A light three-layer routine for vibe-coded apps: manual click-throughs, a small automated test set, and asking the AI to attack its own work.

    testingvibe codingai generated codequality assurance

    AI coding tools can generate hundreds of lines in seconds. That speed is the point, but it creates a real problem: you are shipping code you have never fully read, written by a system that may have encoded its own assumptions into the output. You still need to know the app works. This guide gives you a light, repeatable routine for testing AI-generated code without spending days in review.

    If you are still figuring out what vibe coding is in the first place, the guide on what is vibe coding is a good starting point before you read further.

    Write Your Acceptance Criteria Before You Look at the Output

    The single most useful habit is to write down what the app must do before you read what the AI produced. These are your acceptance criteria, stated in terms of what a user or system is allowed to observe, not in terms of how the code works. When criteria come from the implementation itself, the AI can pass every test simply by reproducing its own assumptions.

    According to guidance from ContextQA's documentation on testing AI-generated code, independent acceptance checks are the core safeguard. That means covering four categories:

    • Normal paths, the happy flow a paying user follows
    • Denied paths, things the app must refuse, such as an unauthenticated request to a protected route
    • Boundary values, inputs at the edges of what is allowed
    • Deliberate defects, known failures you temporarily introduce to confirm that your tests actually catch them

    That last category matters more than it sounds. A test that never fails, even when you break something on purpose, gives you almost no confidence. Temporarily introduce an incorrect boundary condition or a bypassed permission, and confirm that the right test turns red. Then undo the break.

    The Three-Layer Routine

    Once your acceptance criteria exist, run three layers of checks in order. Each layer catches different classes of failure.

    Layer one: manual click-through of the main journeys. Open the running application and walk every core user journey from start to finish. Do not read the code while you do this. You are acting as a user who has no idea how the internals work. Note anything that looks wrong, slow, or missing. This layer catches UI failures, broken navigation, and state problems that code-level tests often miss.

    Layer two: a small set of deterministic automated tests. You do not need a comprehensive test suite. You need enough tests to tell you quickly when a change breaks a core behavior. Focus on authentication, permission boundaries, data persistence, and anything that touches payments. AI tools like Cursor can draft these tests, but read them before you trust them. Generated tests can encode the implementation's behavior rather than the intended behavior, so verify each one against your independently written criteria.

    Layer three: ask the AI to inspect its own work. Prompt the coding agent to look for edge cases, authorization failures, malformed input handling, state problems, and regressions in what it built. This is useful for surfacing test cases you had not considered. Be aware of the limit, though: the same model that wrote the code may share the assumptions and blind spots that produced it. AI self-review is not independent verification. Use the output as a checklist of things to test yourself against the running application, not as proof that the issues do not exist.

    ContextQA's documentation describes this combined approach as the practical baseline for teams working with AI-generated code.

    Test the Deployment, Not Just the Repository

    Local tests and CI tests check code-level behavior. They do not check whether your deployed app actually works. A separate deployment test can reveal failures in environment variables, routing configuration, build steps, and third-party integrations that never appear when running locally.

    After every significant change, deploy to a staging environment and repeat at least the manual click-through layer against the live URL. If you are building on Replit, the difference between a working Replit preview and a correctly configured public deployment is exactly where configuration failures hide. The same applies to any platform where the build and the runtime environment differ from your local setup.

    This is also why testing a vibe-coded app on the target machine is not a workaround or a cheat: it is the only way to confirm that the deployment itself works, separate from whether the code is correct.

    Watch Your AI Credit Budget

    Running repeated test-generation and repair loops uses AI credits faster than ordinary code completion. This is worth knowing before you start a testing session.

    According to pricing information reported by decidenavigator.com (prices checked November 2026 and subject to change), Cursor ranges from free to $200 per month per seat depending on the tier, with a shared first-party allowance separate from prepaid third-party credit. Claude Code, available through Anthropic's plans, starts at $20 per month for Pro and reaches $200 per month for Ultra, with plan-specific usage limits that vary by workload. GitHub Copilot starts at $10 per month for Pro and reaches $39 per user per month for Enterprise. Always verify current limits and prices directly with each vendor before committing to a plan.

    If you are on a metered plan, batch your test-generation prompts rather than running one small prompt at a time. Ask the AI to produce a full set of test cases for a feature in a single request rather than iterating back and forth.

    For teams doing code review on pull requests, a tool like CodeRabbit is positioned as an AI PR reviewer, with a free tier for public repositories and a paid plan reported at $30 per user per month (or $24 billed yearly) as of the same source above. It is not a substitute for end-to-end testing, but it can flag issues before code reaches a deployment.

    If you want to see how testing fits into a broader stack decision, the vibe coding tools directory has pricing and pros and cons for the main options.

    Cross-Feature Journeys Break More Often Than Individual Functions

    AI-generated changes can look correct in isolation and still break something across the app. Navigation, persistence, authentication, payment flows, and permission checks all depend on assumptions that span multiple files. When the AI changes a data model to satisfy one requirement, it may silently break a different feature that relied on the old shape.

    After any significant generation session, run your click-through not just for the new feature but for the journeys that touch adjacent parts of the app. If you are building a client portal, for example, check that existing authenticated users can still reach their data after a new signup flow was added. This kind of regression is exactly what a focused function-level test will miss.

    For builders working on client-facing apps, the guide on building a client portal with vibe coding walks through the kinds of cross-feature flows that need particular attention during testing.

    Common Questions

    How do you validate a vibe-coded project without spending days on review?

    Write acceptance criteria before reading the output, then run three layers: a manual click-through, a small set of automated tests covering the core journeys, and an AI-assisted inspection of its own work. The goal is not full coverage. It is enough signal to know the app does what you promised it would do.

    Does testing on the actual deployment count as real testing?

    Yes, and it is necessary. Local or CI tests check code behavior. Only a live deployment test can catch configuration, environment-variable, routing, and integration failures. These are different classes of problem and require different checks.

    What does testing vibe-coded work actually involve?

    It involves checking behavior against criteria you wrote independently of the implementation, covering normal paths, denied paths, boundary values, and deliberate defects. It also means verifying cross-feature journeys, not just individual functions, because AI changes can break adjacent flows while appearing correct in isolation.

    Can I use an AI tool to test another AI-generated app?

    You can use an AI agent to generate test cases and inspect the code for likely failure points. This is useful. It is not independent verification, because the reviewing model may share the same assumptions as the model that wrote the code. Always verify the agent's findings by running the actual application.

    Will test-generation loops eat through my AI plan?

    They can. Repeated generation and repair cycles consume credits faster than standard completion use. Batch your test-generation prompts, verify current plan limits with your vendor before a long session, and check whether your plan meters agent work separately from completions.