Skip to content
Guide

How to test an AI-built app before launch

Your app looks finished. Before real users arrive, here is how to prove the parts you cannot see work too, and how to keep them working after every prompt.

Sources checked October 24, 202612 min readHow we check our content

Updated October 24, 2026: Lovable now writes and runs small tests for rules you change on its own, and keeps frontend tests in a src/test folder; updated those details.

A white model of a cable-stayed bridge under a silver measuring arch
AI-generated illustration

To test an AI-built app before launch, list the four or five journeys your users cannot live without and prove each works in a real browser, with two separate accounts, on a staging copy rather than the live one.

Add checks for what a polished screen can hide: who can see whose data, what happens when a payment is declined or a button is clicked twice, and what a user sees when something fails. Then make those checks run automatically on every change, because an AI tool can break a working screen while fixing another one. As of October 24, 2026, Lovable writes and runs small tests for the rules you change, but most of its own testing tools run only when you ask for them, so the automatic part is still yours to set up.

How do you know an app works when you did not write its code? The method below applies to any app built with an AI tool, before real users arrive. Platform facts come from each vendor's documentation as of October 24, 2026, listed under Sources.

Why do AI-built apps need different testing?

Because nobody wrote the code line by line, nobody can say from memory what a change might have broken. When you prompt an AI tool to fix the pricing page, it may also edit a shared component that the checkout uses.

The fix looks fine, and the break shows up days later in a part of the app you did not look at.

AI-built apps also tend to look finished before they are. The screens are polished, so it is easy to assume the rules behind them are too. The parts that cause real damage are invisible on screen: data access, payments, emails sent twice, and errors that fail silently. Testing has to look there, not only at the pages.

What should you test first?

Start with the journeys that cost you money or trust when they break: signing up and signing in, the one action your product exists for, paying and failed payments, anything that sends messages to real people, and anything only an admin should do. For most apps that is a short list:

  • Sign up, sign in, sign out and reset a password.
  • The one action your product exists for: creating a project, booking a slot, sending a message.
  • Paying, upgrading, canceling and getting a failed payment.
  • Anything that sends email, texts or notifications to real people.
  • Anything an admin can do that a normal user must not.

Write each one as a single sentence with a clear result, such as "a new user signs up, confirms their email and lands on an empty dashboard". If you cannot say what success looks like, nobody can test it. These sentences become your end-to-end tests: scripts that drive a real browser through the whole journey, from the first click to the saved data.

Which tests matter for a first release?

Five kinds matter, roughly in this order: end-to-end journeys, access checks with two accounts, failure paths, a regression suite and visual regression. You do not need all of them on day one, but you need the first three before real users arrive.

TestWhat it provesWhen it runs
End-to-end journeysThe critical journeys work in a real browser, from click to saved dataBefore every release
Access checks with two accountsUser A cannot see or change user B's data, and a normal user cannot reach admin pagesBefore every release
Failure pathsDeclined payments, double clicks, slow networks and empty states behave sensiblyBefore every release
Regression suiteEverything that worked yesterday still works after today's changeOn every change
Visual regressionPages still look the way they did, pixel by pixel, unless you meant to change themOn every change

Unit tests for small pieces of logic are useful too, especially for prices, dates and anything with money. But for a founder deciding whether to launch, the journeys and the access checks carry most of the risk. If you expect a launch-day rush, also load-test before a traffic spike.

How do you test who can see whose data?

Create two ordinary test accounts and one admin account, and try to cross the lines between them. Sign in as user A and create something private. Sign in as user B and try to open it by its address, by guessing its id, and through the app's own search.

Then sign in as a normal user and open every admin page by typing its address.

A page that hides a button is not protection. The check must be enforced by the server or the database, so test the data, not only the screen. If your app runs on Supabase, its documentation, as of October 24, 2026, describes database tests written with pgTAP and run with the supabase test db command. Its row-level security example acts as one test user and checks that user sees only their own rows. It then switches to a second user and checks that user cannot change the first user's rows.

Bell, an AI email assistant whose system we engineered, shows the scale this can reach. Its case study states that 134 of its test files run against a real PostgreSQL database, and that tests act as one user against another's rows. You will not need that many for a first release. You do need at least one test per table that holds private data.

How do you test payments and failure paths?

In a sandbox, never with real cards. Stripe's documentation, as of October 24, 2026, describes a sandbox as an isolated test environment whose transactions do not move funds. It publishes test card numbers for successful payments and for declines, such as a generic decline or insufficient funds. Stripe's services agreement prohibits testing in live mode with real payment details.

Run every payment journey with a successful card, a generic decline and an insufficient-funds decline. Check what the user sees, what your database records and whether access was granted. Then try the failures nobody plans for:

  • Click the pay or submit button twice, fast.
  • Refresh the page in the middle of a payment or a save.
  • Close the tab before the confirmation appears, then come back.
  • Use the app on a slow mobile connection.
  • Open a new account with no data and check that every page still makes sense.

Each of these should leave exactly one record, one charge and one email. A prompt usually describes the happy path, so the code it produces may not handle the rest. These checks find out.

Can Lovable test your app for you?

Partly. As of October 24, 2026, Lovable's documentation describes four ways to verify an app. Browser testing lets the agent click buttons, fill forms and take screenshots in a real browser. Frontend tests use Vitest, React Testing Library and jsdom to check UI behavior in isolation.

For backend functions, the agent can call a function directly with chosen inputs, and edge tests use Deno's built-in test runner to check backend rules over time.

Three limits matter for a launch. First, the documentation says most of these tools run only when you ask for them. The exception is small tests Lovable writes on its own when you add or change a rule, such as a price, a limit or a permission; it runs the tests covering that change before reporting the work as done. The agent may suggest or start browser testing while it investigates, but verification does not run silently in the background. Second, browser testing has listed weak spots. It cannot use canvas or drawing tools, custom file-upload widgets and drag and drop are less reliable, and it is not reliable for subtle visual details. Third, signed-in testing needs Lovable's built-in backend (Cloud). If your app uses its own Supabase project or another sign-in provider, browser testing can only check pages that need no sign-in.

So use these tools while you build: ask Lovable to verify a journey after each change you make. Frontend tests are files in your code, usually .test.ts or .test.tsx files in the project's src/test folder, and Lovable can sync your code to GitHub. So a developer can add them to the automatic suite described below. But treat Lovable's on-request checks as a helper during design, not as the safety net for production. A safety net has to run even when nobody remembers to ask.

Should someone review AI-generated code before launch?

Yes, because tests and reviews catch different things. A test proves a journey works. A review asks whether the code should look the way it does: a secret key in the browser code, a database rule that lets too many people read a table, a new package nobody chose, a payment step that trusts what the browser says.

Have someone other than the person who prompted the change read it before it is merged. Asking the AI tool to review its own work is a useful first pass, but it is not a second opinion. On GitHub, the review happens in the pull request, next to the test results.

How do you make tests run on every change?

Put the tests in the code repository and let a CI/CD service run them on every push. GitHub's documentation, as of October 24, 2026, describes GitHub Actions building and testing the code as you commit it. It shows the result of each test in the pull request, so you can see whether a change introduces an error.

That turns your test list into a regression testing suite: every journey that worked before is checked again, automatically, every time the code changes. Add visual checks too. Playwright, a common browser-testing tool, can compare each page with a saved reference screenshot and fail when they differ. Its documentation notes that rendering varies with the operating system, browser version, hardware and settings. So run these checks in the same environment that made the reference screenshots.

How do you know the app is ready to launch?

The app is ready when its critical journeys, two-account access checks and payment tests all pass, the tests run on every change and block a failing release, you have rolled back a staging release, and someone is alerted to live errors. That is, when you can answer yes to each of these without checking by hand:

  1. Every critical journey has an end-to-end test, and all of them pass.
  2. Two-account access tests pass for every table and page with private data.
  3. Payments pass with success and decline test cards, and a double click creates one charge.
  4. The tests run on every change, and a failing test blocks the release.
  5. You have released a change to staging and rolled it back.
  6. Someone is alerted when the live app throws errors.

If any answer is no, that is your launch list. Fix the missing items before launch day, because after launch every bug costs a real user. Testing answers only part of the bigger question our guide covers in full: is your Lovable app production-ready?

Plans start at $2,999 a month paid annually, $3,999 a month billed quarterly, or $4,999 month to month; Growth is custom. See pricing. To see where your app stands first, take the free production-readiness check: 22–35 questions, a score out of 100 and the three risks to fix first. If these tests turn up something already broken or exposed, our vibe-coding rescue starts by finding the real cause before changing anything.

Sources

Each platform fact above comes from one of these pages, checked on October 24, 2026. We review this page every 30 days.

Common questions

Can I test an AI-built app without writing code?

You can do the first pass by hand: walk through each critical journey, use two test accounts to check data access, and run payments with test cards. To repeat those checks on every change, someone has to turn them into automated tests in the repository.

Does Lovable test my app automatically?

Mostly not. As of October 24, 2026, Lovable's documentation says it automatically writes and runs small tests only for the rules you add or change; its other verification tools run only when you ask for them. The agent may suggest or start browser testing while it investigates a problem, but verification does not run silently in the background.

How many tests does an app need before launch?

There is no fixed number. Aim for one end-to-end test per critical journey, one access test per table or page with private data, and payment tests for success and decline. Coverage of the risky paths matters more than the count.

Should I ask the AI to write my tests?

It can draft them quickly, but read what each test checks. Generated tests often assert that a page loads rather than that the right data was saved for the right user. A test that cannot fail does not protect you.

Which bugs are hardest to catch by clicking through the app?

Data that one user can see or change when they should not, and actions that happen twice, such as a double charge or a repeated email. Both look fine on screen, which is why they need tests rather than a visual check.

More on this: Production architecture & security · Lovable app not working in production? How to make it production-ready

Built something in Lovable you want people to rely on?

We are the engineers who take it the rest of the way — secured, tested, released and supported.