> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/guides/test-data-in-doesqa.md).

# Test data in DoesQA

DoesQA brings **Values**, the **Value Store**, and **Integration API steps** into the same Flow as your UI steps. Generate realistic user data, share environment config, and call your APIs to prepare a journey without a separate fixture library.

The most reliable tests use data from a working backend. The browser exercises your application while Integration steps create and verify state on real HTTP endpoints in the same Flow. When a third party must return canned responses, point Integration steps at **Mockoon** or **WireMock** and store the base URL in a Value.

## At a glance

| You need                                | DoesQA approach                                                                          |
| --------------------------------------- | ---------------------------------------------------------------------------------------- |
| Names, emails, numbers in forms         | [Built-in Values](/values/built-in-values.md) (`$testFirstName`, `$randomNumber`, …)     |
| Shared secrets and environment URLs     | [Account Values](/values/creating-values.md) under **Assets → Values**                   |
| Data that changes during the Test Case  | [Value Store](/values/value-store.md) at runtime (Store, Set, Calculate, …)              |
| Create or check backend state before UI | [Integration API steps](/test-steps/integration/post.md) (GET, POST, PUT, PATCH, DELETE) |
| Canned responses from a third party     | Mockoon or WireMock + Values for its base URL                                            |
| Unique inbox per Test Case              | [`$testEmail`](/values/built-in-values.md) and [Mail Test Steps](/test-steps/mail.md)    |

Heavy reliance on mocked responses can drift from production behaviour and add flake. DoesQA keeps setup on **Values** and **API steps** against your test environment so UI steps use data that matches what the application actually serves.

## Built-in Values

Built-in Values generate realistic test data when you type `$` in supported fields. The output is similar to what libraries such as **Faker** produce for names, emails, and numbers. Built-ins are native to DoesQA: pick a Value from the list when you build the Flow.

Two rules matter for every Flow:

| Prefix        | Behaviour                                                                          |
| ------------- | ---------------------------------------------------------------------------------- |
| **`test*`**   | Same value for the whole Test Case (for example `$testEmail`, `$testFirstName`)    |
| **`random*`** | New value each time you reference it (for example `$randomNumber`, `$randomEmail`) |

`$randomEmail` addresses use `@mock.does.qa` for form fill. For registration and mail journeys use [`$testEmail`](/values/built-in-values.md), which opens a real Test Case inbox.

Full lists and examples: [Built-in Values](/values/built-in-values.md).

## Account Values every test can use

Create shared data under **Assets → Values**:

* **String** for URLs, usernames, tokens
* **Number** and **Boolean** for flags and limits
* **Object** for JSON fixtures (feature flags, default payloads)

Overwrite Values per environment with [Run Recipes](/configuration/run-recipes.md), **Start Run**, [CI/CD](/configuration/ci-cd.md), or [DoesQA Run](/test-steps/express/doesqa-run.md). See [Run across environments](/better-coverage/run-across-environments.md) and [Value Store](/values/value-store.md) for which source wins when names match.

## Value Store as in-Flow fixture memory

During a Test Case, Data steps write to the Value Store. Common patterns:

* **Store** element text, attributes, cookies, or storage into a named key
* **Set Value** to build or overwrite data mid-journey
* **Calculate** or **Replace** to transform stored text
* **Check Value Store** or [**Check JSON Value**](/test-steps/check/check-json-value.md) to assert

Captured data stays available for the rest of that Test Case under the name you chose.

## API steps in the same Flow

[Integration API steps](/test-steps/integration/post.md) call HTTP endpoints from the hosted runner. Typical pattern:

1. **POST** to create a user or order. Set **Response Storage Name** to `createdUser`.
2. **Open** the app and fill the UI using `$testEmail` or fields from the stored response.
3. **GET** or **Check JSON Value** to confirm backend state.
4. **DELETE** to clean up when the journey finishes.

Walkthrough: [Test APIs in a Flow](/guides/test-apis-in-a-flow.md). Setup and teardown patterns: [Seed and clean up with API steps](/guides/seed-and-clean-up-with-api-steps.md).

### Fields inside stored JSON

When a step stores a JSON body, the Value is an **Object**. Later steps can use:

* **Dot notation** in supported fields, for example `$createdUser.id` in a URL or text field
* **`{{storageName}}`** in JSON bodies and headers for a whole stored Value
* [**Check JSON Value**](/test-steps/check/check-json-value.md) to assert part of the response
* [**Set Value**](/test-steps/data/set-value.md) to copy a nested field into a simpler name you reuse often

Pass tokens in **Headers** on the Integration step when the backend requires them.

## External mock servers (Mockoon, WireMock)

For dependencies that need canned JSON, run **Mockoon** or **WireMock** and store its base URL in an Account Value such as `$MOCK_API_URL`. Point Integration step URLs at that host, or point your application's API URL Value at the mock for test builds configured that way.

DoesQA calls the mock like any other HTTP API. You maintain stub definitions in the mock tool. Guide: [Use mock servers with DoesQA](/guides/use-mock-servers-with-doesqa.md).

## Related capabilities

| Feature                                                     | Use for                                             |
| ----------------------------------------------------------- | --------------------------------------------------- |
| [Block Hostnames](/configuration/block-hostnames.md)        | Control which third-party hosts load in the browser |
| [Set Header](/test-steps/runner/set-header.md)              | Add headers on the browser session                  |
| [Generate File](/test-steps/runner/generate-file.md)        | Upload files with `{{value}}` in JSON contents      |
| [HAR recording](/test-steps/utility/start-har-recording.md) | Review browser network traffic after a Run          |

## One Flow for data and UI

**Dynamic data**, **shared config**, and **API setup** live in the same product as the browser steps. Values and Integration steps prepare the journey; the UI path runs on the data your backend (or mock server) returns. For third-party dependencies, pair DoesQA with Mockoon or WireMock and keep stub definitions in the tool your team already uses.

## Guides

| Topic                               | Guide                                                                           |
| ----------------------------------- | ------------------------------------------------------------------------------- |
| Share Values in the Flow Builder    | [Share data with Values](/better-coverage/share-data-with-values.md)            |
| API login, store token, assert      | [Test APIs in a Flow](/guides/test-apis-in-a-flow.md)                           |
| Create and delete test data via API | [Seed and clean up with API steps](/guides/seed-and-clean-up-with-api-steps.md) |
| Mockoon or WireMock                 | [Use mock servers with DoesQA](/guides/use-mock-servers-with-doesqa.md)         |
| Email as dynamic test data          | [Email testing in DoesQA](/guides/email-testing-in-doesqa.md)                   |

## Related

* [Value Store](/values/value-store.md)
* [Built-in Values](/values/built-in-values.md)
* [Creating Values](/values/creating-values.md)
* [Data Test Steps](/test-steps/data.md)
* [DoesQA compared](/choosing-a-test-automation-approach/doesqa-compared.md)
