> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noqa.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# App State Management

> Managing app state before and during tests.

Getting your app into the right state before a test is often the hardest part. Here are four approaches that work well with noqa.

## Deeplinks

Use deeplinks to skip navigation and land directly on the screen you want to test. Instead of writing a flow that taps through multiple screens to reach a specific state, you can open a deeplink as the first instruction and start the test from the right place.

## Login flows

If most of your tests require a logged-in user, set up a reusable login flow and reference it at the start of each test case.

You can put credentials directly in the instructions — the agent will use them as written:

```
Sign in with test@example.com / Test1234.
```

If many tests share the same credentials, add them to **App context** once so you don't repeat them in every case.

## Build flavors

Use a dedicated test build with pre-seeded data, mock services, or feature flags that put the app in a specific state. This avoids having to set up state through the UI on every run and makes tests more reliable and faster.

## Cheat menus

For games and complex apps, a hidden debug or cheat menu is one of the most effective tools for testing. It lets you skip levels, unlock items, set game state, or fast-forward time — giving the agent a known starting point without having to play through the game to get there.

## None of these are available?

That's fine. The test will go through the initial app flow every time — onboarding, login, or whatever the app requires on a fresh launch. Create a reusable flow for that starting sequence and reference it at the beginning of every test case that needs it. This way the flow is written once and stays consistent across all your tests.
