> For the complete documentation index, see [llms.txt](https://kerno.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kerno.gitbook.io/docs/guides/test-a-user-flow.md).

# How to Test a User Flow

Learn how to map the key journeys through your app, test one end to end, and re-check it after a code change.

### Introduction

A user flow is a journey a person takes through your product, such as signing up and creating a first project. Kerno tests it end to end, across every entry point it crosses, and checks that the outcome actually happened. See [User flows](/docs/core-concepts/user-flows.md) for the concept.

In this guide, you will map your key flows, test one, and re-check it after a code change.

### Prerequisites

Before you begin, you will need:

* Kerno set up, with your environment ready and calibrated. See [How to Configure the Kerno Test Environment](/docs/guides/start-the-environment.md).
* Your application running.

### Step 1. Mapping your flows

Your agent usually maps your flows with you right after calibration. To map them, or to add more later, ask:

```
Map the key user flows in this app with Kerno.
```

Your agent asks which journeys matter most, then records the flows you confirm in your own words. Recording a flow runs nothing yet.

### Step 2. Testing a flow

Pick a journey and ask your agent to test it:

```
Use Kerno to test the checkout flow.
```

Kerno plans one test that walks the steps in order and checks the outcome at the end. If the journey needs an account or credential Kerno doesn't have yet, Kerno may ask you for it through your agent.

### Step 3. Approving the plan

Kerno always shows you the plan before it writes the test. Read it through and check that the steps and the expected outcome match the journey you meant, then approve it, or tell your agent what to change.

Once you approve, Kerno writes the test, checks that it passes twice in a row, and runs it against your application. If the journey breaks, the result shows the step where it failed.

### Step 4. Re-checking after a change

After you change code, ask your agent to review it:

```
Use Kerno to validate the entry points and flows my changes affected.
```

Kerno reports which flows your change touches, and your agent re-runs them along with the affected entry points' tests. When a journey changed on purpose, tell your agent, and Kerno plans the flow's test again for your approval.

### Next Steps

Your first flow is tested, and it is re-checked whenever you review a change that reaches it. Map the rest of your key journeys the same way, and see [How to Review your Code Changes](/docs/guides/validate-code-changes.md) for reading the results of a review.
