Reusable sequences let you define a common flow once and use it inside other sequences. This helps you reduce duplication, keep shared logic consistent, and update repeated steps in one place.

## When to use reusable sequences

Reusable sequences are useful when the same flow appears in multiple tests, for example:

- signing in before different user journeys
- navigating to a shared starting point
- creating or searching for a record in a standard way
- reusing a common API or business flow across projects

## Why this helps

Using reusable sequences can help you:

- reduce maintenance effort across multiple sequences
- keep shared logic consistent
- build larger test flows from smaller, easier-to-manage parts
- speed up authoring when the same steps are needed more than once

## Before you start

- Make sure the sequence you want to reuse already exists.
- Keep shared sequences in a folder structure that is easy for your team to find and manage.
- If the reused sequence is part of a larger test flow, run a preview after adding it so you can confirm the full sequence still behaves as expected.

## Add a reusable sequence to another sequence

1. Open the sequence where you want to reuse an existing flow.
2. Add a `Run sequence` step.
3. Select the sequence you want to reuse.
4. Save your changes.
5. Run a preview to validate the full sequence before using it in a timeline.

## Typical example

A common pattern is to create one sequence for `Sign in` and reuse it in multiple larger sequences, such as:

- `Sign in` + browse catalog
- `Sign in` + create record
- `Sign in` + submit request

In this setup, you maintain the sign-in logic once and reuse it wherever it is needed.

## Best practices

- Use reusable sequences for stable, repeatable parts of a workflow.
- Give shared sequences clear names so they are easy to identify.
- Keep reusable sequences focused on one purpose instead of making them too broad.
- Validate parent sequences with a preview run after making changes to a reused sequence.
- Review copied or imported assets if your workflow includes nested reusable sequences.

## Validate before running load

Leapwork Go supports preview runs so you can verify that the full sequence works before using it in a larger execution. This is the safest way to confirm that the parent sequence and the reused sequence work together as expected.
