---
title: Reusing Tests and Organising Suites in Selenium IDE
description: The fastest way to make a recorded suite unmaintainable is to record
  the login ten times. When the login form changes, you fix ten tests. Selenium IDE
  has…
source_url:
  html: https://testingbot.com/resources/courses/selenium-ide/reusing-tests-and-suites
  md: https://testingbot.com/resources/courses/selenium-ide/reusing-tests-and-suites.md
---

Course

[Selenium IDE: Codeless Test Automation](https://testingbot.com/resources/courses/selenium-ide)

Chapter 6 of 10

1. [1 Selenium IDE Tutorial: Codeless Test Automation](https://testingbot.com/resources/courses/selenium-ide)
2. [2 Install Selenium IDE and Record Your First Test](https://testingbot.com/resources/courses/selenium-ide/install-and-record-your-first-test)
3. [3 Commands, Targets and Locators in Selenium IDE](https://testingbot.com/resources/courses/selenium-ide/commands-targets-and-locators)
4. [4 Assertions, Verifications and Waits in Selenium IDE](https://testingbot.com/resources/courses/selenium-ide/assertions-verifications-and-waits)
5. [5 Variables, store and Control Flow in Selenium IDE](https://testingbot.com/resources/courses/selenium-ide/variables-and-control-flow)
6. [6 Reusing Tests and Organising Suites in Selenium IDE](https://testingbot.com/resources/courses/selenium-ide/reusing-tests-and-suites)
7. [7 Run .side Files with selenium-side-runner](https://testingbot.com/resources/courses/selenium-ide/run-side-files-with-selenium-side-runner)
8. [8 Run Selenium IDE Tests on the TestingBot Grid](https://testingbot.com/resources/courses/selenium-ide/run-on-testingbot)
9. [9 Export Selenium IDE Tests to Code, and When to Graduate](https://testingbot.com/resources/courses/selenium-ide/export-to-code)
10. [10 Knowledge check](https://testingbot.com/resources/courses/selenium-ide/knowledge-check)

[Exit course](https://testingbot.com/resources/courses)

 Chapter 6 of 10 Beginner 6 min read 2 quick checks Updated Nov 2026 

# Reusing Tests and Organising Suites in Selenium IDE
On this page
1. [The run command](https://testingbot.com#the-run-command)
2. [Shared tests do not belong in a suite](https://testingbot.com#shared-tests-do-not-belong-in-a-suite)
3. [Suites](https://testingbot.com#suites)
4. [Parallel](https://testingbot.com#parallel)
5. [Persist Session: use with care](https://testingbot.com#persist-session-use-with-care)
6. [Where reuse stops](https://testingbot.com#where-reuse-stops)

The fastest way to make a recorded suite unmaintainable is to record the login ten times. When the login form changes, you fix ten tests. Selenium IDE has one tool against that, the `run` command, and one way to group tests, suites. This chapter covers both, plus the two suite settings that change how tests run: **Parallel** and **Persist Session**.

## The run command[#](https://testingbot.com#the-run-command)

`run` plays another test from the same project, in the same browser, as if its steps were pasted in at that point. Write the shared steps once as their own test and call it.

The shared test, named `Log in`:

| Command | Target | Value |
| --- | --- | --- |
| `open` | `/login` | |
| `type` | `id=username` | `${username}` |
| `type` | `id=password` | `${password}` |
| `click` | `css=.radius` | |

The test that uses it, `Log in and log out`:

| Command | Target | Value |
| --- | --- | --- |
| `store` | `tomsmith` | `username` |
| `store` | `SuperSecretPassword!` | `password` |
| `run` | `Log in` | |
| `assertElementPresent` | `css=#flash.success` | |
| `click` | `linkText=Logout` | |
| `waitForText` | `css=h2` | `Login Page` |

How it behaves:

- **The called test sees the caller's variables.** `Log in` reads `${username}` and `${password}`, which the caller stored. That is how you pass "parameters": store the values, then `run`. Variables the called test stores are visible to the caller afterwards, too.
- **The target is the test's name.** Renaming `Log in` breaks every `run` that calls it, so give shared tests a clear name early. A name that does not exist fails with `Can't run unknown test: ...`.
- **Keep the checks in the caller.** `Log in` only performs the login. Whether a login _should_ succeed (valid user) or fail (wrong password) is the caller's business, so the same shared test serves both.

## Shared tests do not belong in a suite[#](https://testingbot.com#shared-tests-do-not-belong-in-a-suite)

A test like `Log in` cannot run on its own: without `username` and `password` stored first, it types the literal text `${username}`. Keep it out of every suite. `selenium-side-runner` runs the suites of a project and skips tests that are in none, so `Log in` only ever runs when something calls it.

Six tests start by logging in, and the login form is about to get a "Remember me" checkbox that must be unticked. How should the suite be organised so that this is a one-place change?

 One shared `Log in` test outside the suites, called with `run` from all six after storing the credentials Record the login again in each test; recordings are cheap One suite with Persist Session, so only the first test logs in

With `run`, the new step goes into one test and all callers get it. A persistent session would make every test depend on the first one passing and on the order they run in.

## Suites[#](https://testingbot.com#suites)

A suite is a named list of tests, managed in the **Suites** tab: drag tests from **Available tests** into **Tests in suite**. A test can be in several suites. Our project has two:

- **Smoke** : the six tests that should pass on every deploy.
- **Variables and control flow** : the two tests from chapter 4.

Organise suites by when you want to run them (on every commit, nightly, before a release) or by area of the product, not by who recorded the tests. On the command line, `--filter Smoke` runs just the suites whose name matches (chapter 6).

Each suite has three settings:

| Setting | What it does |
| --- | --- |
| **Timeout** | a time limit in milliseconds, stored with the suite (`selenium-side-runner` does not use it; it has its own `--jest-timeout` per test) |
| **Parallel** | its tests may run at the same time, each in its own browser |
| **Persist Session** | all its tests share one browser session and one set of variables |

## Parallel[#](https://testingbot.com#parallel)

We ran the Smoke suite with `selenium-side-runner` both ways, with three workers (`-w 3`):

| Smoke suite | Run time |
| --- | --- |
| Parallel off | 21.2 s |
| Parallel on | 11.0 s |

With Parallel off, the runner plays the tests one after another however many workers you allow. With Parallel on, it starts up to `--max-workers` tests at once. Each test gets its own browser, so this only works when the tests are **independent** : none relies on data another one created, none changes something the others read (such as the same user's settings).

On a cloud grid, parallel tests count against your plan's concurrency. Starting more than your plan allows does not make the run faster; the extra sessions wait in a queue or are refused (chapter 7).

## Persist Session: use with care[#](https://testingbot.com#persist-session-use-with-care)

With **Persist Session** , the suite opens one browser and runs all its tests in it, in order, with shared variables. It looks attractive: log in once in the first test, and the next tests start logged in.

The cost is that every test now depends on the ones before it:

- If the first test fails, the others fail too, for reasons that have nothing to do with them.
- You cannot run one test on its own, because it relies on the state the earlier ones left.
- Reordering tests changes their results.
- It cannot be combined with Parallel.

Persistent sessions fit a genuine journey, such as "sign up, confirm, set a password, log in", split into steps you want reported separately. For everything else, leave it off and use `run` for the shared setup. The [flaky tests course](https://testingbot.com/resources/courses/flaky-tests/test-order-and-isolation) explains why tests that depend on each other's order become flaky.

You switch on Parallel for a suite. "Edit profile" now fails now and then; it passed every time before. What is the likely cause?

 Parallel runs use a different browser engine Another test in the suite changes the same user's profile at the same time Parallel suites ignore the `run` command

In sequence, the two tests never overlapped. In parallel they do, and both write to the same account. Give each test its own data (a different user) or keep that pair out of the parallel suite.

## Where reuse stops[#](https://testingbot.com#where-reuse-stops)

`run` reuses a whole test, with variables as an implicit way in and out. There are no functions with real parameters, no return values, and nothing shared between projects: two `.side` files cannot call each other's tests. When you find yourself copying the same shared tests into several projects, or storing five variables before every `run`, that is the structure code gives you for free. The [Page Object Model course](https://testingbot.com/resources/courses/page-object-model) shows what that structure looks like once you move to code.

[Previous · Chapter 5 Variables, store and Control Flow in Selenium IDE](https://testingbot.com/resources/courses/selenium-ide/variables-and-control-flow) [Next · Chapter 7 Run .side Files with selenium-side-runner](https://testingbot.com/resources/courses/selenium-ide/run-side-files-with-selenium-side-runner)

On this page

1. [The run command](https://testingbot.com#the-run-command)
2. [Shared tests do not belong in a suite](https://testingbot.com#shared-tests-do-not-belong-in-a-suite)
3. [Suites](https://testingbot.com#suites)
4. [Parallel](https://testingbot.com#parallel)
5. [Persist Session: use with care](https://testingbot.com#persist-session-use-with-care)
6. [Where reuse stops](https://testingbot.com#where-reuse-stops)

Certification

Earn the free, resume-worthy TestingBot Selenium IDE Certification for this course.

[How it works](https://testingbot.com/resources/courses/selenium-ide/certification)
