# How Rehearsal works

> Projects, apps, tests, suites, runs, results and evidence, and how they fit together.

Source: https://rehearsal.dev/docs/how-rehearsal-works

A workspace holds your projects. A project holds the apps you test and everything Rehearsal keeps about them: tests, suites, runs, test accounts and files.

## The parts

| Part | What it is | Where you find it |
| --- | --- | --- |
| Project | A group of apps that make up one product, such as a shop and its admin. | The project menu at the top of the page |
| App | One thing you test. It has one address or more. | **Apps**, from the project menu |
| Environment | One address of an app: Production, Staging, Preview or Local. | Under each app on **Apps** |
| Test | A Playwright test that checks one flow, such as signing in. | **Tests** |
| Suite | A group of tests you run together. | **Tests**, under **Suites** |
| Run | One request to run tests: one test, several, or a suite. | **Runs** |
| Result | How one test ended in one run. | Inside the run |
| Evidence | The recording, screenshots and trace a test left in a run. | Inside the run, and on the test's page |
| Test account | An account Re:agent and your tests sign in with. | **Re:agent uses**, beside your chats |
| File | A file a test uploads, such as a CSV to import. | **Re:agent uses**, beside your chats |

## Tests and flows

Every test starts as a flow. A flow is what Re:agent did in a real browser: each step it took, and what proved the flow worked. Rehearsal writes a Playwright test from the flow and checks it twice. [From flow to test](https://rehearsal.dev/docs/tests/from-flow-to-test.md) explains how.

A new test is a **Draft**. It becomes **Approved** once it passes in a fresh browser, and only then can it run.

To change a test, you ask Re:agent. It walks the flow again and saves a new version. Runs keep using the old version until the new one passes in a fresh browser.

## Where a test runs

A test belongs to an app, not to one address. Each run says which address it checks.

When an app has one address, Rehearsal uses it. When it has more, Rehearsal asks which one before the run starts.

Rehearsal's browsers run on its servers. They reach an app on your computer only while the CLI connects it. See [Connect a local app](https://rehearsal.dev/docs/cli/connect-a-local-app.md).

## What a run keeps

A run writes down its tests, their versions and their addresses when it starts. A change you make to a suite or a test applies to the next run.

Each test in a run gets one result. The run page shows every result with its evidence, as [Read a run](https://rehearsal.dev/docs/tests/read-a-run.md) describes.

If a problem on our side stops a run, Rehearsal picks it up again and keeps the results it already has. A run it still cannot finish says **Could not run**, and it counts towards nothing.

## Who can do what

The Member role can see tests and runs and chat with Re:agent. Creating a test, changing one and starting a run need the **Manage projects** permission. Admins and owners have it, and a custom role can add it.

Your chats with Re:agent are private to you. A test you create belongs to the project, and everyone who can see the project can see it.

## Next steps

- [Create a test in chat](https://rehearsal.dev/docs/reagent/create-a-test.md) with Re:agent.
- [Run tests](https://rehearsal.dev/docs/tests/run-tests.md) from the app, your terminal or GitHub.
- [Read a run](https://rehearsal.dev/docs/tests/read-a-run.md) to see what each result means.
