BLOG
BlogGuides

It works in preview and breaks in production. Test the live address

AI app builders blur preview and production, so the version you clicked through is not the one users get. Test the deployed address after every deploy instead.

Two different apps with the same name#

The app in your builder's preview pane and the app at your public address are built and run differently. A rescue agency that assesses Lovable apps puts it bluntly: preview and production run on different infrastructure, and the same classes of error come up in nearly every app they see: environment variables missing at deploy time, database connections dropping, sign-in breaking.

A hosting company's write-up on why AI-built apps break after deploy gives the tell: "Cannot read properties of undefined" in the logs usually means an environment variable that existed locally does not exist in production.

So a click-through in the preview proves the preview. It says little about the address you send to customers.

Test what users get#

A Testsy test is saved with your live address. Every run opens that address in a fresh Chrome, with no cookies, no saved session and no local environment, which is the position a new user is in.

Open https://myapp.example.com.
Sign up with this run's email address and confirm it from the email.
Create a first project named "QA check" and open it.
Reload the page and check "QA check" is still there.

Four lines cover the parts that break most often between preview and production: the page loads, sign-up reaches the email provider, the database saves, and the session survives a reload.

A passed run: every check with the value it was decided on, the replay and the video.
A passed run: every check with the value it was decided on, the replay and the video.

Run it after every deploy, not once#

The preview-to-production gap opens again with every change to the environment: a new variable, a new domain, a rotated key. So the test belongs after each deploy:

  • From the app. Press Run after you publish. One run, a few minutes.
  • From your pipeline. If the app is in GitHub, the GitHub Actions workflow runs your tests after each deploy and fails the build when a check fails.
  • From your coding agent. Connected over MCP, the agent runs the saved test after it deploys and reads the verdict itself.
  • Every night. A schedule runs it on its own and emails you if it fails.

Previews too, when you want them#

If your host gives each change its own preview address, the same test can start there instead of at the saved address: --url on the command-line tool, target-url in the GitHub Action, or url over the API. See Test every Vercel preview before you merge.

What the test cannot reach#

The address has to be reachable from the internet. An app running only on your own computer cannot be tested yet, and a site behind bot protection may report the run as Blocked, which is not counted against your plan. Network and allow-listing explains how to let the tester in.

Start with one#

Paste your live address into New test and describe sign-up, one save and one reload. The free trial has 10 runs.

This post is part of Testing an app you built with AI.

Filed underWebAI-built appsReleases and regressions