Sequential execution
Run flows in a specific order using executionOrder for dependent test scenarios.
By default, there is no guaranteed order between flows. This is intentional because testing Flows in isolation ensures they are robust and not dependent on side effects from previous tests.
However, there are scenarios, particularly in Goal-Driven Apps, where you need to validate a strict sequence of events (e.g., creating an account, then verifying a profile, then placing an order). In these cases, you can use the executionOrder configuration.
Configuring the sequence
To force an order, add the executionOrder block to your config.yaml. You can identify Flows using either their file name (without the .yaml extension) or the name property defined inside the Flow itself.
# config.yaml
executionOrder:
flowsOrder:
- signup_flow # Step 1
- verify_email_flow # Step 2
- complete_profile # Step 3When you configure executionOrder, Astra Scout will:
- Put the flows listed in
flowsOrderfirst, in the specified order. - Run any other discovered flows after them. Their relative order is not something to rely on.
continueOnFailure is not supported
Maestro's continueOnFailure flag, which cancels the rest of the sequence when one flow fails, is not read by Astra Scout. A failed flow does not cancel the flows that follow. If a flow cannot work without the previous one, nest the setup it needs with runFlow instead.
Best practices and isolation
Even when running in sequence, you should treat your Flows as isolated units. A good rule of thumb is:
Each Flow should be able to run on a completely reset device.
WARNING
Do not rely on one Flow leaving the app in a specific state for the next one.
If you need to ensure a specific state (e.g., being logged in), use a Hook or a Nested Flow at the start of your test.
| Requirement | Recommendation |
|---|---|
| Logic dependency | Use runFlow to nest the required setup inside the test. |
| Simple ordering | Use executionOrder in config.yaml. |
Example: Partial sequencing
If you have five Flows (A, B, C, D, E) but only care that A and B run first, you can use the following configuration for the executionOrder:
executionOrder:
flowsOrder:
- flowA
- flowBAstra Scout runs A, then B, and then C, D, and E, which you should treat as being in any order.
Next steps
Now that you have defined how and when your tests run, learn how to view the results:
- Test reports and artifacts: See what Astra Scout records for each run.
- AI test analysis: Use AI commands to find UI and logic issues.
