> For the complete documentation index, see [llms.txt](https://docs.qyrus.com/web-testing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qyrus.com/web-testing/build/parameterization.md).

# Parameterization

Parameterization runs one script many times, with different data each time. Instead of writing a login test for each customer, you write it once, mark the steps that change, and supply a table of values.

Each row of that table becomes one execution.

## Prerequisites

* A test script with steps. See [Test Steps](/web-testing/build/creatingsteps.md).

## Marking a step as parameterized

1. Open the script and click the **edit** icon at the top right of the panel on the right. Nothing below works until the step list is in edit mode.
2. Click **Parameterize** on the step you want to vary — the first icon in the row of controls at the end of the step.
3. The step's own input is replaced by a **Data Column \*** field. Type the name of the column that will hold this step's values.

   ![A step with its Data Column field](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-5061bca77b6a10daeec9218322d1f176fa71c3b9%2Fbuild-param-01.png?alt=media)
4. Repeat for every step that should change between runs, then **Save**.

The column name is the link between the step and your data. Whatever you type here has to match the column heading in the data exactly.

## The Parameter File tab

As soon as one step is parameterized, a **Parameter File** tab appears beside **Actions** in the right-hand panel. That tab is where the data comes from. It is not there before — if you cannot see it, no step in the script is parameterized yet.

There are two ways to supply data, controlled by the **Use new feature** toggle.

### With Use new feature on — the Test Data service

![The Parameter File tab using Test Data](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-dced05001e7a71f914bbe6cb356809d028961980%2Fbuild-param-02.png?alt=media)

The tab offers **Test Data** and **Create table**, and lists the parameterized files already available. Until you make one it reads "No parameterized files available".

This is the newer route, and it keeps the data inside Qyrus where it can be edited and reused. See [Test Data](/web-testing/build/testdata.md).

### With Use new feature off — the spreadsheet template

![The Parameter File tab using a template](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-f80ed6c90cfe1d0fd2f02c9478fedba58d178641%2Fbuild-param-03.png?alt=media)

Turning the toggle off gives the older three-step flow:

| Step         | What to do                                                                                      |
| ------------ | ----------------------------------------------------------------------------------------------- |
| **Step - 1** | **Download Template** — Qyrus builds a spreadsheet with a column for each Data Column you named |
| **Step - 2** | **Fill the data in the Template**                                                               |
| **Step - 3** | **Upload Template**                                                                             |

## How many times will it run?

The template has a mandatory `Test_Case` column. **One row per execution.**

Two rows named in `Test_Case` means the script runs twice — the first execution using the first row's values, the second using the second row's. A script with a parameterized **Username** step and two rows therefore signs in as two different customers, one after the other.

## Skipping a step for one row

Sometimes a step should run for most rows but not all. Put a `~` in that row's cell and the step is skipped for that execution only.

This is easier than maintaining two nearly identical scripts. A checkout test can skip the "apply discount code" step for the rows that have no code, and run it for the rows that do.

## Running a parameterized script

The run configuration screen has its own **Use new feature** toggle beside **Execution parameter file**. Set it to match how you supplied the data — on for Test Data, off for an uploaded template — then run as usual.

The report shows one execution per row.

## Parameterization inside functions

Steps inside a function can be parameterized the same way: open the function's steps, click **Parameterize**, and give the step a **Data Column**. See [Functions](/web-testing/advanced-features/functions.md).

## Where to go next

| To read about                          | Go to                                             |
| -------------------------------------- | ------------------------------------------------- |
| Where the data is stored and generated | [Test Data](/web-testing/build/testdata.md)       |
| Building the steps themselves          | [Test Steps](/web-testing/build/creatingsteps.md) |
| Running the script                     | [Dry Run](/web-testing/run/dryrun.md)             |
