# Test your app

> How to install your app on a test platform before it is listed, and what to check before you submit it to everyone.

Source: https://developers-staging.foodpilot.tech/launch/testing

In this page you will get your app onto one platform to test it, then check it against what the review looks at.

## An app is installable once a version is approved

A platform offers an app only when the app is published, which happens when a version is approved. Until then, no platform can install it, whatever its visibility. There is no sandbox that installs drafts.

What you choose is **where** an approved version is offered:

| Visibility | Who can install it |
|---|---|
| `private` | Only the platforms you name, up to 100 |
| `unlisted` | Any platform, from a link, but it is not listed in the catalogue |
| `public` | Any platform, and it is listed in the catalogue |

The visibility you choose is applied when the version is released, not before.

## Test on one platform first

1. In the partner space, set the visibility to **private** and name your test platform.
2. Submit the version. The automated checks run at once and their results appear on the version: fix any `fail` before a reviewer looks at it.
3. Once it is approved, an administrator of your test platform installs the app.
4. When you are ready for everyone, change the visibility to `unlisted` or `public` and submit a new version.

## Checklist before you submit

- **Install.** Your `install_url` answers, redirects to the consent page, and your `redirect_url` exchanges the code. A reinstall after an uninstall creates a new installation: do not reuse the old tokens.
- **Tokens.** You refresh the access token before it expires (one hour) and store the new refresh token each time: the old one is revoked, and reusing it revokes the whole family.
- **Webhooks.** You verify every signature on the raw body, answer `2xx` within 5 seconds, and handle each event id once. Only a `2xx` counts as delivered.
- **Uninstall.** On `app/uninstalled` you stop calling the API for that installation and delete its data.
- **Embedded pages.** Your `app_url` answers `2xx` with a `Content-Security-Policy` whose `frame-ancestors` names the platforms' origins, never `*`.
- **Scopes.** You ask only for the scopes you use. A `product.details.tab` extension needs `read_products`.
- **Organizations.** You treat a `404` on a resource as "not granted to you": an app never learns what exists outside its organizations.
- **Rate limit.** You honour `429` and its `Retry-After`.

## Next

- [The review](/launch/review): what the checks and the reviewer look at.
- [Your listing](/launch/listing): what a version needs before it can be submitted.
