> 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/better-coverage/choose-flow-branch-shapes.md).

# Choose Flow Branch shapes

Choose how Flow Branches join and split when one Flow should cover more than one path.

One [Flow](/getting-started/terminology.md) can cover several routes through your application. Shared [Test Steps](/getting-started/terminology.md) stay in one place. A [Flow Branch](/getting-started/terminology.md) is the join or split that creates those extra paths. Each unique path becomes its own [Test Case](/getting-started/terminology.md).

Most Flows use a later split: one [Open](/test-steps/starter/open.md), shared steps, then two or more onward paths. Other shapes help when the same journey should run in more than one browser, or when you want combinations in one Flow.

Use the **Flow Builder** for this walkthrough.

## Pick a shape

| Shape                    | What you build                                 | Use it when                                                             |
| ------------------------ | ---------------------------------------------- | ----------------------------------------------------------------------- |
| **Joined starts**        | Several Opens meet, then share steps           | The same journey should run in more than one browser                    |
| **Later split**          | One Open, then a split lower down              | One start, then two or more onward paths. This is the most common shape |
| **Join then split**      | Several Opens meet, then the Flow splits again | Two browsers, then two or more onward paths                             |
| **Layered combinations** | Join then split more than once                 | You want permutations, such as browser and journey together             |

[Condition](/test-steps/runner/condition.md) and [Tag Test](/test-steps/utility/tag-test.md) sit on a branch. They do not change the shape. Use Condition when a path should run only for a matching Runner, device, language, timezone, or Run Value. Use Tag Test when a Recipe, Schedule, or CI/CD call should pick the path by tag.

## Joined starts

Joined starts use more than one [Open](/test-steps/starter/open.md). The paths meet at a shared step, then continue together.

Use joined starts when the same checks should run in Chrome and Firefox.

![Open Chrome and Open Firefox joining at Touch, then Check displayed](https://2973996442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH10EEO19EDpBHNPowThh%2Fuploads%2Fgit-blob-dbbc9af31c586e4b434fbea839b9fb079664b5bf%2Fjoined-starts.png?alt=media)

1. Add an [Open](/test-steps/starter/open.md). Set **Runner** to `Chrome`.
2. Add a second Open with the same URL. Set **Runner** to `Firefox`.
3. Connect both Opens to the same next step, such as [Touch](/test-steps/action/touch.md).
4. Continue the shared path with [Check Displayed](/test-steps/check/check-displayed.md).

Each Open still starts its own Test Case. The shared steps run on every path. The same shape works for two starting URLs.

## Later split

A later split is one [Open](/test-steps/starter/open.md), shared steps, then a split. This is the most common Flow Branch shape.

Use it for smoke versus regression, account versus checkout, or any two journeys that share a start.

```mermaid
flowchart TD
  openChrome["Open Chrome"] --> touchGo["Touch go"]
  touchGo --> checkReady["Check displayed"]
  checkReady --> touchAccount["Touch account"]
  checkReady --> touchCart["Touch cart"]
```

1. Start with one Open. Set **Runner** to `Chrome`.
2. Build the shared steps.
3. Connect the last shared step to two next steps.

See [Build smoke and regression coverage](/better-coverage/build-smoke-and-regression-coverage.md) for tagging those paths.

{% hint style="info" %}
**Pro tip:** Start a multi-path Flow as a later split. Add a second [Open](/test-steps/starter/open.md) later and set **Runner** to `Firefox` when you need that browser too. That turns it into join then split.
{% endhint %}

## Join then split

Join then split is joined starts plus a later split. [Open](/test-steps/starter/open.md) in Chrome and Firefox meet, then the Flow splits again.

Use it when both browsers should share some steps, then follow different journeys.

```mermaid
flowchart TD
  openChrome["Open Chrome"] --> touchGo["Touch go"]
  openFirefox["Open Firefox"] --> touchGo
  touchGo --> checkReady["Check displayed"]
  checkReady --> touchAccount["Touch account"]
  checkReady --> touchCart["Touch cart"]
```

1. Build joined starts first: Open Chrome and Open Firefox into one shared [Touch](/test-steps/action/touch.md).
2. After the shared steps, connect two onward paths.

## Layered combinations

Layered combinations use join then split more than once. Paths meet and split again further down the Flow.

Use this shape when you want permutations in one Flow, such as two browsers, two journeys, and valid versus invalid details.

```mermaid
flowchart TD
  openChrome["Open Chrome"] --> touchGo["Touch go"]
  openFirefox["Open Firefox"] --> touchGo
  touchGo --> touchAccount["Touch account"]
  touchGo --> touchCart["Touch cart"]
  touchAccount --> checkShared["Check displayed"]
  touchCart --> checkShared
  checkShared --> enterValid["Enter valid details"]
  checkShared --> enterInvalid["Enter invalid details"]
```

Each unique path from an Open to an end is a Test Case. Shared steps stay shared, so you edit the common part once.

## Several shapes in one Flow

Flows often mix shapes. The steps stay common so the joins and splits stay easy to see. Open Chrome and Open Firefox are the joined starts.

```mermaid
flowchart TD
  openChrome["Open Chrome"] --> touchNav["Touch nav"]
  openFirefox["Open Firefox"] --> touchNav
  touchNav --> checkHeading["Check heading"]
  checkHeading --> touchAccount["Touch account"]
  checkHeading --> touchCart["Touch cart"]
  touchAccount --> checkProfile["Check profile"]
  touchCart --> checkCart["Check cart"]
  checkCart --> touchPay["Touch pay"]
  checkCart --> checkEmpty["Check empty"]
  touchPay --> checkPaid["Check paid"]
```

What each part is doing:

* Open Chrome and Open Firefox joining at Touch nav are **joined starts**.
* The split after Check heading is a **later split**. Together with the joined starts, that is **join then split**.
* The second split after Check cart is another later split. The Flow now holds joined starts, join then split, and a further split together.

Keep [Open](/test-steps/starter/open.md) at the start of every path. Use [Touch](/test-steps/action/touch.md) and [Check Displayed](/test-steps/check/check-displayed.md) for the steps you care about. Add [Condition](/test-steps/runner/condition.md) or [Tag Test](/test-steps/utility/tag-test.md) on a branch when that path needs a rule or a label.

## Related

* [Flow Builder](/platform/flow-builder.md)
* [DoesQA concepts](/getting-started/doesqa-concepts.md)
* [Build smoke and regression coverage](/better-coverage/build-smoke-and-regression-coverage.md)
* [Reuse steps with Step Groups](/better-coverage/reuse-steps-with-step-groups.md)
* [Condition](/test-steps/runner/condition.md)
* [Tag Test](/test-steps/utility/tag-test.md)
* [Open](/test-steps/starter/open.md)
* [Touch](/test-steps/action/touch.md)
* [Check Displayed](/test-steps/check/check-displayed.md)
* [Terminology](/getting-started/terminology.md)
