# Test Configuration

Moropo uses the Maestro Open Source format for test configuration and [test steps](/creating-tests/commands.md).

When you start a new test in Moropo, Test Creator will automatically populate the only mandatory field (`appId`):

```yaml
appId: ${BUNDLEID}
---
- launchApp
```

*NB: if this is your first test, there is nothing else you need to do here. Proceed to* [*test steps*](/creating-tests/commands.md)*.*

## Tags

Use the `tags` configuration option to add tags to your test runs. These can then be used as a filter when setting up a test run.

```
appId: ${BUNDLEID}
tags:
    - regession
    - smoke
---
- launchApp
- inputText: ${MY_EMAIL}
```

## Environment Variables

Use the `env` configuration option to provide variables to your test. These can then be used in the steps with the `${MY_VARIABLE}` syntax.

```yaml
appId: ${BUNDLEID}
env:
    MY_EMAIL: example@moropo.com
    MY_KEY: 123
---
- launchApp
- inputText: ${MY_EMAIL}
```

## On Flow Start

The `onFlowStart` option can be used to run any [test steps](/creating-tests/commands.md) before the test starts. This is useful for running setup actions.

```yaml
appId: ${BUNDLEID}
onFlowStart:
  - runFlow: mySetup.yaml
  - setLocation:
      latitude: 51.45052532643149
      longitude: -2.594704204455719
---
- launchApp
```

## On Flow Complete

The `onFlowComplete` option can be used to run any [test steps](/creating-tests/commands.md) after the test has been completed, and will execute even if the main body of the test fails. This is useful for running clean-up operations that must be run even if the test fails.&#x20;

```yaml
appId: ${BUNDLEID}
onFlowComplete:
  - runFlow: myTeardown.yaml
  - stopApp
---
- launchApp
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.moropo.com/creating-tests/test-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
