Skip to content

Create a flow ​

Every way to create a flow in Astra Scout, side by side, and which one to use.

A flow is a test saved as a YAML file in the workspace; each line in it is a step. There are seven ways to create one, and all of them produce the same kind of file. They can be mixed: start from the sample, add a step with the Inspector, then ask the AI to extend it.

Help > Ways to Create a Flow opens this page from the app.

Which way should I use? ​

  • New tester, no YAML yet: edit the sample flow, then add steps with the Inspector.
  • Maestro YAML is familiar: create a file with New File… and write it.
  • A fast first draft: describe the flow to the AI chat.
  • New app, not sure what to test: let Explore walk the app and suggest flows.
  • Working in a terminal: use the scout plugin from your AI CLI.
  • A specific situation (clipboard, gallery, downloads): copy from Examples and recipes.
WayBest forNeedsPage
Sample flowThe first flowNothingRun flows
New File…Writing YAML yourselfNothingRun flows
InspectorAdding one step from the real screenA connected deviceInspector
AI chatA fast draft from a descriptionAn AI CLI, signed inAI assistant
ExploreFinding what to test in a new appA connected device and an AI CLIExplore app
TerminalWorking outside the appThe scout plugin in an AI CLIThe scout plugin
ExamplesA known tricky situationNothingExamples

Edit the sample flow ​

A new workspace starts with first-flow.yaml.

  1. Open the workspace. In the Files navigator, click first-flow.yaml. It opens in the editor.

    The workspace window with the Files navigator and the editor

  2. Read the flow. It launches the app picked in the toolbar (appId: ${APP_ID}), starts with launchApp and clearState: true, and takes a screenshot. The steps that start with # are comments.

  3. Remove the # in front of a commented step, such as assertVisible, and replace the example text with text the app shows.

  4. Pick the app in the app picker (it reads No App until one is chosen) and a device in the device picker.

  5. Save with Cmd+S and click Run Test (Cmd+R).

  6. Watch the steps in the runner. A passed run shows green checks on the lines of the editor and in the runner.

    The sample flow after a passed run: marks in the editor gutter, the steps in the runner and the device mirror

The sample is only written into a folder that has no .yaml file yet.

clearState on an iOS device

clearState: true uninstalls and reinstalls the app. On an iOS device this needs a team build in use. Without one, the run stops as Blocked with the code APP_FILE_REQUIRED. See Builds. On a simulator it works without extra setup.

More: Run flows.

Create a file with New File… ​

  1. Open the New File sheet in any of these ways:

    • Click the Add (+) button at the bottom of the Files navigator and choose New File….
    • Right-click a folder, or an empty space in the Files navigator, and choose New File….
    • Choose File > New File… (Shift+Cmd+N).
  2. The sheet title is Choose a template for your new file. Click a template tile, then click Next. Double-clicking a tile skips Next.

    TemplateWhat it creates
    Mobile testA .yaml flow
    JavaScript fileA .js file
    Text fileA file with the exact name you type
    Tracking CatalogA tracking spec. It is always created in tracking-specs/, whatever folder you chose.

    The New File sheet with four template tiles

  3. Enter a name. For Mobile test, also check the App ID. It starts as ${APP_ID}, the app picked in the toolbar. Click the arrow beside the field to use another value:

    • App Picked in the Toolbar (${APP_ID}) puts ${APP_ID} back.
    • Recently used lists App IDs used before.
    • On connected device lists the apps installed on the connected device. It shows only when a device is connected.

    The line at the bottom of the sheet shows the folder where the file will be created. Click Previous to go back to the templates.

    The New File sheet with the name, the App ID and the folder

  4. Click Create. The file opens in the editor.

  5. Write the steps. With Autosave on (the default), the file saves automatically after a short delay. Otherwise press Cmd+S.

More: Run flows and Writing flows.

Add steps with the Inspector ​

  1. Connect a device and open a flow in the editor.

  2. Turn on Device > Inspect Elements (Option+Cmd+I) and hover over the device screen. The line under the mirror shows the element under the pointer.

  3. Right-click the element you want. A menu of commands for that element opens.

    The main window with the device column open and Inspect Elements on

  4. Choose Insert into Editor to add the step, or Insert & Run to add it and run it at once.

Both are disabled when no file is open in the editor. Insert & Run is also disabled when no device can run the step.

More: Inspector.

Ask the AI chat ​

  1. Switch the left sidebar to AI assistant with the switch at the top of the sidebar.

  2. Click New Conversation and pick an AI from its menu. Only AIs that are installed and signed in can be picked.

  3. Describe the flow in the text box, for example "open the app, sign in with test@example.com and check that the home screen is shown". Change the model in the model menu next to the text box. Press Enter to send.

  4. When the reply has YAML, the code block shows whether it is valid and has icon buttons. Hover over a button to see its name:

    • Try Run runs the flow on the device without saving it.
    • Create New File saves it as a new file in the workspace.
    • Insert into File adds it to the open flow.
    • Apply to File compares it with the open flow and applies the accepted changes.
    • Copy copies the YAML.

    A conversation with a YAML block and its action buttons

One AI CLI must be installed and signed in. See Set up an AI CLI.

More: AI assistant.

Let Explore find flows ​

  1. Connect a device and choose Device > Explore the App… (Shift+Cmd+E). The Explore app window opens.

  2. Choose the app, a persona (the kind of user the AI plays) and optionally a goal.

    The Explore app window before starting, with the app, persona and goal

  3. Click Start Exploring in the toolbar of the window and wait for the exploration to end.

  4. Open the Flows tab. It lists a suggested flow for each journey.

  5. Tick the flows to keep and click Save N selected flows (N is the number of ticked flows). Nothing is saved unless ticked.

    The Explore app window after an exploration

More: Explore app.

Write from a terminal ​

This way needs an AI CLI that runs in Terminal.

  1. Install the scout plugin into the AI CLI (Claude Code, Codex or Gemini CLI) and run /scout:setup.
  2. Keep Astra Scout running with a device connected.
  3. Ask the CLI to write a flow, for example "write a flow that signs in and checks the home screen". It uses the plugin's write-flow skill.
  4. The skill reads real text and ids from the screen, validates the flow, asks before overwriting a file, saves it and tries it.

More: The scout plugin.

Copy from Examples and recipes ​

  1. Open Examples and find the situation needed.
  2. Copy the YAML from the page.
  3. Create a file with New File… and paste it, or paste it into a flow that is already open.
  4. Change the appId and the texts to match the app, then run it.

More: Examples overview.

After you have a flow ​

  • Run it and read the result: Run flows.
  • Check the analytics events your app sends: Tracking: where to start. In the editor, right-click an action line and choose Add Event Check… to add the event check there.
  • A line that calls another flow with runFlow or runScript opens that file with Cmd-click, or from the Open file name item of the line-number menu.