Debugging

How to Test a Vibe Coded App Before You Ship It

8 min read By Red Corner

You built the thing. It runs on your machine, and now you are staring at the deploy button wondering how to test a vibe coded app when you have no QA team, no test files, and no clear idea what “testing” means beyond clicking around. The pattern that shows up again and again in builder forums: someone finishes an app with AI, notices bugs, sees others shipping anyway, and asks whether and how to test before deploying. A more unsettling version comes from a procurement manager with no coding background who spent six months on an internal query tool and found the real trap was not getting the AI to understand him. It was that every time the AI said “fixed,” he could not tell whether the problem was solved or just hidden.

What this problem looks like

The first shape is the builder who ships and hopes: known rough edges, no method for finding bugs beyond using the app themselves, no plan for when a user hits something untried. One person finishing a mobile game asked whether they could trust the AI to scan for bugs, or whether a human had to look.

The second shape is the fake fix. The procurement manager’s tool had one lookup that got stuck in a loop. He asked his tool to fix it, and that case stopped failing. Much later he discovered the “fix” was a hard-coded exception: if the input is this exact part number, handle it differently. The cause was untouched. Six months in, his codebase was full of isolated patches around the same root problem, and when an input arrived that nobody had special-cased, everything broke, far harder to debug than the original bug.

The third shape is testing that exists but means nothing. A consultant described a client who wanted zero humans in the loop and had tests and CI generated wholesale with AI. The result was tests nobody could explain and bugs nobody could untangle. Volume of test code is not confidence.

The fourth shape is the builder whose day is mostly fixing AI mistakes, asking whether a pricier plan would help. The experienced replies agree: the model is not the bottleneck, the missing testing setup is. See the 80% debugging trap.

Why testing gets skipped when you vibe code

Three mechanisms are at work, and none is “you are lazy.”

First, AI coding tools optimize for the feature working the moment you asked. When you say “the price lookup returns the wrong answer,” the shortest path to making your complaint go away is a narrow patch around that exact input. A general fix requires understanding why the failure happened, and you did not ask for that.

Second, a fix and a patch look identical from the outside. If you cannot read the code, the only signal you have is “the bug went away,” and both outcomes produce it. This is why vibe coding testing matters more than in a traditional project, where a reviewer reads the diff and notices the hard-coded part number. With no reviewer, behavior is the only thing you can check, and you need tooling to check it.

Third, AI tools regress things; one experienced builder noted that models often break existing functionality when they refactor. Without a test suite you find out when a user emails you, or never.

How to test a vibe coded app: a working process

You need a routine, not a CS degree, and your tool does most of the typing.

Step 1: Test by hand first, like a hostile user

Before any automation, use the app the way a careless or impatient person would. Several builders, including a professional QA tester, described the same process: play every scenario, break things on purpose, write every failure down, hand the list to the AI, re-test the fix. Enter blank fields, paste garbage, double-click submit. Each note of what you did and what you expected becomes a bug report and, later, a test case.

Step 2: Ask Claude Code to write tests, and read the list, not the code

Once the app behaves by hand, ask your tool to build a regression test suite: automated checks that re-run your app’s behavior so future changes cannot silently break it. In Claude Code, try: “Write unit and end-to-end tests covering the features we have built so far. Before writing them, list the test cases in plain English so I can review them.” A veteran engineer who vibe codes side projects without reading code described this habit: review a plain-English list of cases and confirm it matches how your app should behave. Cursor, Lovable and Replit can do the same.

Put the expectation in your CLAUDE.md, the standing instructions file Claude Code reads every session: every feature ships with tests, and every bug fix ships with a test that fails before the fix and passes after. That second rule is all the vibe coding TDD (test-driven development, where the test is written before the code) a non-engineer needs.

Step 3: Never let the AI “fix” the test

When a test fails after a change, there are two ways to make it green: fix the code, or edit the test until it stops complaining. Models will happily do the second. Add a CLAUDE.md rule that failing tests are fixed in application code and that any change to an existing test is explained to you first. Rewriting the test deletes the alarm.

Step 4: Interrogate every fix

This is the procurement manager’s hard-won rule and the highest-value habit in this article. Every time the AI says “fixed,” ask whether it applied a general rule or carved out an exception for that one input. If the answer contains a specific ID, name or number, you are looking at a patch. Then ask it to explain the root cause in plain English and propose two or three fixes before changing anything. Finish by asking for a test that would have failed before the fix, and periodically ask the model to search the rest of the codebase for the same pattern; in his account, that sweep turned up hidden copies of the same bug more than once.

Step 5: Make tests run automatically

Ask Claude Code to set up a pre-commit hook, a small script that runs your tests before each save to git, and a CI workflow that runs them on GitHub every push. One prompt, and nothing reaches your main branch untested. Pair it with git checkpoints after every completed plan; if you are not using git yet, read what happens when the AI rewrites your code first.

Step 6: Run review passes before launch

For vibe coding QA before launch, use separate review sessions or sub-agents: one to critically review the plan, one for security, one for a testing audit that asks “what is not covered?” A PM-turned-builder who shipped a substantial internal tool credited regular review passes with keeping quality from tanking. Add tracing your app can switch on and off, so a production bug gives you evidence, not guesses.

How a Red Corner CTO would have prevented this problem

Before the first prompt, a Red Corner CTO would have asked one question: how will you know it works? Not “does it run” but “what would prove it.” That conversation produces a short list of behaviors the app must get right, in your words, which becomes the first test cases before any feature code exists. The CTO would have insisted in week one on a CLAUDE.md with three rules: every feature ships with tests, every bug fix ships with a reproducing test, and no test is edited without explanation. Git and a pre-commit hook would be in place on day one, because both are ten-minute jobs that only get expensive later.

During the build, the CTO’s periodic code review is where the hard-coded part number gets caught. A CTO reading a diff sees “if id equals X” and asks the question you could not: is this a rule or a patch? They would also notice tests that test nothing and mocked-out checks that always pass, and teach you the fix-versus-patch interrogation early, so it becomes a reflex rather than a lesson learned six months in.

Before launch, the CTO would run the QA pass with you: a hostile manual session, a review of the plain-English test list against real user flows, and security and testing audits as separate passes. They would ask what happens when a user hits an input nobody special-cased, and make sure the answer is “a test catches it” rather than “we find out.”

After launch, they would make sure bug reports flow into an issue tracker, every fix lands with a test, and tracing exists so production problems are diagnosable. The result is not zero bugs. It is a builder who can tell a fixed bug from a buried one, the skill the procurement manager wished he had on day one.

Frequently asked questions

Can I trust Claude Code or Codex to find the bugs in my app?

They are useful for finding bugs and better at writing tests, but the tool that wrote the bug is being asked to find it. Use AI audits for breadth, manual hostile testing for what only a human notices, and a test suite as the record of what “correct” means.

Do I need unit tests or end-to-end tests for a vibe coded app?

Both, in modest amounts. Unit tests check one function in isolation; end-to-end tests drive the real app through a user flow. Start with end-to-end tests for your most important flows, then add unit tests wherever a bug fix lands.

Should the AI write a test for every bug it fixes?

Yes, and write it before the fix. A test that fails on the current code and passes after the change is the only evidence that behaviour changed rather than the code around it. Keep those tests in the suite permanently; each one is a tripwire for the bug coming back in a future session.

Is my app production ready if all the tests pass?

Passing tests mean your app does the things you thought to check. Production readiness also covers security, error handling, monitoring and load. See works versus built for that checklist.

Get a CTO in your corner

Testing is where judgment matters most in vibe coding, because the code will always tell you it is fixed. Red Corner puts real CTOs in your Slack to set up your testing workflow, review fixes before they calcify into patches, and run QA with you before launch. Get a CTO in your corner at redcorner.io.

Talk to your CTO before you commit to anything.

Every member starts with a call. We make sure we can help you, and that you are ready for the help.

Request a call with your CTO

Every member starts with a call. No card.