Business tests — check your rules automatically
Business tests check that your app still follows your rules — "a requester can't approve their own purchase", "you can't issue more stock than you have", "customers only see their own bookings" — every time you change something. Each test is a short, typed list of steps (do this,
Beta — ready to use, but some details may still change.
Business tests check that your app still follows your rules — "a requester can't approve their own purchase", "you can't issue more stock than you have", "customers only see their own bookings" — every time you change something. Each test is a short, typed list of steps (do this, as this role) and checks (this record should now say that). Tests run on a private, throw-away copy of your app, so your real records are never touched and no email is ever sent.
When to use
- After you change a workflow, a permission or a field: run the suite and see at once whether a rule broke.
- Before publishing: turn on Require tests to pass so a failing rule blocks the release.
- When you start from a library app: its default tests show what the app guarantees, and keep guaranteeing it as you customize.
Where to find them
Open Tests in the builder's navigation (it may be under the More menu on small screens). You'll see your test suites, the result of each suite's last run and the run history.
- Run a whole suite or a single test.
- Open a result to see the step trace: every step, the role it ran as, what happened (success, refused, error), which workflows ran, which records were added or changed, and any email or notification that was captured (not sent).
- Results are Passed, Failed (the app didn't behave as expected), Error (the test couldn't run — for example it refers to a table that was renamed) or Skipped (it contains something that can't be checked automatically yet).
Everyone on the project can see tests and results; editors and above can run, add and change them.
Where tests come from
- Library apps. Apps created from Inventory Control, Purchase to Receive, Work Order Manager and Resource Booking & Equipment Rental include a default suite automatically: stock balances after receive/issue/transfer, no overselling, no duplicate receipts, no self-approval, senior approval above the threshold, completion blocked until the checklist and a photo are done, no double-booking, blackouts, customers limited to their own bookings. These suites are read-only — select Copy to make an editable version.
- Generate access tests. Builds one test per role from your current permission rules and page audiences ("Customer can read Bookings but can't delete them; can't open Dispatch Board"). Use it as a safety net: if a later change alters who can do what, the test fails. Regenerate it after an intended change.
- Describe a test. In the AI bar choose Test mode and describe the rule in plain language, for example "A technician can't approve work orders". The assistant proposes a typed test; you review it and save it — nothing is saved or run without you. See AI modes.
What a test contains
| Part | What it is |
|---|---|
| Name, id, requirements | A readable name, a stable id and (optionally) the requirement it proves. |
| People (identities) | Test users with a role — built-in or custom — and an optional email, e.g. manager = Approver, morgan@example.com. |
| Starting data | Either an empty copy or the library app's sample records, plus your own test records. Never your real records. |
| Steps | Create, update, delete or read a record as a role; run a workflow the way its button or form does (or directly when nothing on a page starts it); run a component's action; look up a record; set the test clock; check things midway. |
| Expectations | Each step is expected to succeed, be refused (the role isn't allowed or can't see that action) or end with an error — optionally containing a given message, such as "can't approve your own request". |
| Checks | Number of records; a field or status value; how many times a status changed to a value ("exactly one approval"); a sum, minimum, maximum, average or count; whether a role can read/create/update/delete a table or a record; whether a role can open a page; how many records a role can see; emails, notifications, API calls or webhooks captured. |
A check the runner can't verify automatically (for example "the form is accessible") is kept and shown as unsupported. The test is then Skipped — it is never reported as passed.
How the safe copy works
- Every test gets its own fresh, in-memory copy of your app. Tests never share data and never run in parallel.
- The copy has no connection to your database: test and live records stay exactly as they were.
- Emails, notifications, API calls and webhooks are captured in the result (recipient and subject) and never sent.
{{now}}and{{today}}use the test clock (a fixed time you can set), so date rules give the same result every run.- Steps run "as" a role with the same rules as the real app: page and button visibility, table permissions, own-record rules, read-only and hidden fields.
- Each test has a time limit and a limited number of steps.
Limits (beta)
- Loop steps in workflows and server actions nested inside a condition or loop aren't simulated yet — such steps are reported as unsupported.
- Browser-only actions (navigation, toasts, opening a modal) are not simulated; the trace lists them.
- A test refers to tables, fields, pages and workflows by name: after a rename, the test reports an Error listing what it can't find. Update the test (or copy and edit a library suite).
- Tests check rules and data, not appearance. Use Preview as a role to look at screens.
Troubleshooting
| Result | What to do |
|---|---|
| "The app doesn't have: table “…”" | A table, field, page or workflow was renamed or deleted. Edit the test, or copy the suite and update the names. |
| "Expected error, got success" | The rule the test protects no longer stops the action — check the workflow's conditions and stop steps. |
| "Expected success, got denied" | The role can't see the button or lacks the permission. Check page audiences and Users › Permissions. |
| Skipped — "unsupported" | The test uses a check or step the runner can't verify yet; it is listed, not passed. |