Testing on a branch

Preview and publish a branch, the switches that connect it to main's email, realtime and jobs, its private files, and what lives on main only.

A branch runs on its own data and its own copies of the keys, so you can try anything in its preview. Its settings decide how much of the real world it reaches: by default, none of main's users, mail or jobs.

Preview and publish a branch

A branch's preview works like main's. To test it the way visitors will use it, Publish this branch (in the menu beside Merge in the top bar) publishes it to an address of its own. The live app on main doesn't change. A domain or app store connection set up on a branch is removed when the branch is deleted.

On a branch, the screens for publishing, analytics and SEO are the branch's: its analytics are visits to its own address, and its site name is the branch's name. A merge doesn't carry these settings; set the live app's on main.

Branch settings

Open the branch's Project Settings › Advanced. Each switch is shown only when the branch's code uses it, and only the branch's creator or the project owner can change one. All are off when a branch is made.

SwitchOff (the default)On
Send emailThe app sends nothing. Each message is kept in the branch's test inbox, under Email logs, so you can still read sign-in codes and reset linksMail is delivered to real inboxes
Receive main's emailNone of main's incoming mail reaches the branchEvery email main receives also runs the branch's email handler. If the branch replies while Send email is on, the customer gets two replies
Run scheduled jobs on this branchThe jobs copied from main don't runThe branch's published app runs them on their own schedule, so a job that sends email or calls another service does it twice: once on main and once here
Queued jobsTasks main had waiting when the branch was made never run here. Tasks the branch's own code queues always runThose waiting tasks run on the branch too
Receive main's realtime messagesThe branch has its own live channelsMessages on main's channels reach the branch's users
Send realtime messages to mainMain's users never see the branch's messagesThe branch's messages reach main's users. Who's online is shared only with both realtime switches on

Scheduled jobs run only on a published app, like main's. To run one job once without publishing, use Run now on the job, or ask your assistant to run it.

An ordinary branch holds real data and keys

A full-copy branch has your real users' rows and, unless you gave test values, your real keys. With Send email on, its sign-in codes and receipts go to real people. Use an isolated branch when that must not happen.

Own private files only

A branch reads the stored files of the branch it was made from. That suits a branch that continues the project, but not a test branch that must not hold the real project's private files, such as contracts, ID scans or exports. Turn on Own private files only in the branch's settings: the parent's private files are no longer listed, read or copied on the branch. Public files, such as the images and other assets the app shows, still come from the parent, so the app looks the same.

Private files the branch had already opened were copied into it and stay; delete the ones you don't want in Storage. The switch takes up to a minute to apply and can be turned off again. An isolated branch never reads its parent's private files, so it has no such switch.

Things that behave differently on a branch

  • A public file changed on the branch can show its earlier content for up to a minute, because files are cached.
  • Payments: an id stored in a full copy of main's data refers to main's payments, so looking it up from the branch may find nothing.
  • Fixed outbound IP is shared with main and can't be changed on a branch.
  • Credits: AI credits used on a branch show as the branch's in its project settings, and are paid by the project's payer like main's.