# Test and live

URL: /code/builders/startup/test-and-live · Id: `page:code/builders/startup/test-and-live`

> Every Startup runs in a test environment and a live one over one definition, and proves every Offer in test before launch.

Every [Startup](/business/nouns/startup) runs in two environments over one definition: `test`, where nothing real happens, and `live`, where [Customers](/business/nouns/customer) pay. A Startup proves every [Offer](/business/nouns/offer) in `test` before [launch](/business/nouns/startup/launch) opens `live`.

## One definition, two sets of records
Both environments share the definition: [Nouns](/business/nouns/noun), [Verbs](/business/nouns/verb), Offers, [Pages](/business/nouns/page), [Workflows](/business/nouns/workflow) and [Roles](/business/nouns/role). Every operational record, such as an [Order](/business/nouns/order), a [Message](/business/nouns/message) or a [Cost](/business/nouns/cost), belongs to exactly one environment and never crosses to the other.

`test` runs the latest merged [Change](/business/nouns/change); `live` runs the [Version](/business/nouns/version) last deployed. An edit is callable in `test` at once, while Customers in `live` keep the deployed build.

The key picks the environment: an `sk_test_` key reaches `test`, and an `sk_live_` key reaches `live`, at the same URL. [Environments](/code/cli/guides/environments) covers the developer contract.

## What test simulates
`test` runs every Verb for real, except the effects that reach the outside world.

| In `test` | What happens instead |
| --- | --- |
| Payments | Test cards charge in Stripe's test environment, and no money moves |
| Outbound messages | Reach only seed inboxes and the Startup's own team |
| Outside effects | [Domain](/business/nouns/domain) purchases, ad spend and filings run against simulators and record as `done` |
| [Human](/business/nouns/human) steps | Route to the owner, who signs as the test signer |
| [Agents](/business/nouns/agent) | Run for real, with real model calls |

Everything else matches `live`: [Permissions](/business/nouns/permission), [Limits](/business/nouns/limit), [Approvals](/business/nouns/approval), delay windows and [Events](/business/nouns/event). A refund over its Limit waits for an Approval in `test` exactly as it would in `live`.

A run in which Agents only pretend proves nothing. Model calls are real, so the test run exercises the same judgment Customers meet in `live`.

## The test run that admits Live
Test run passed is a [Live](/business/lifecycle/states/live) entry check. A sample Customer for each [Persona](/business/nouns/persona) completes every published Offer end to end. It finds the Offer, pays with a test card, receives the work, and confirms it.

Take a Startup that sells monthly accessibility audits of online stores. Its sample store owner signs up, pays $199 with a test card, and receives an audit of a seeded storefront. A second run disputes one finding, to prove the remedy works too.

The check holds only for the Version it ran against. A Change merged after the run makes it stale, and the run repeats before launch.

## Launch opens live
Launch waits for every Live entry check, then deploys the current Version to `live` and puts the Startup on its Domain. Before the first launch, every call with a live key returns [`not-live`](/code/api/errors/not-live).

Records never move. Customers and Orders from `test` stay in `test`, and `live` starts empty. From then on, `live` runs only what was deployed, and the previous Version stays one [revert](/business/nouns/change/revert) away.

## Numbers never mix
Every [Metric](/business/nouns/metric) counts `live` records only, and every figure from `test` carries a test label. A test Customer is never outside, so no test Order moves a Startup toward [Repeatable](/business/lifecycle/states/repeatable).

Resetting `test` data never touches `live`. A founder can wipe `test` and rehearse a launch as often as they like.

## Agents build, humans claim
An Agent can create a Startup, build it, and sell to test Customers with no human present. Every provisional Startup holds a no-money Limit until a verified owner takes responsibility for it.

A human sponsor [claims](/business/nouns/startup/claim) the Startup through one link, which opens its payment account and lifts that Limit. The Agent then launches, and the sponsor is the owner of record. [Sponsor an agent](/agents/sponsor) walks through the claim.

## Next
[Build and publish](/workflows/lifecycle/build-and-publish) lists the full launch checklist, and the [Lifecycle](/business/nouns/lifecycle) shows what happens after Live.