# Create and Utilise Parameters in your Test Case

Parameters in SimplifyQA enable dynamic and reusable test cases by replacing hardcoded values with flexible inputs. This enhances test efficiency, reduces maintenance efforts, and ensures adaptability across different data sets.

### Creating Parameters

There are two ways to create parameters in SimplifyQA:

#### Creating a Parameter from the Parameter Module in Test Management

1. Navigate to Test Management > Parameter Module

<figure><img src="/files/X96YtrnE3i6OUcOzWE1P" alt=""><figcaption></figcaption></figure>

2. Click on '+ Parameter', then enter a name and select a parameter type (both mandatory fields).

<figure><img src="/files/9QURJzE6PT3k9jqZbuQP" alt=""><figcaption></figcaption></figure>

2. Choose the appropriate scope:
   1. Local Parameters: Used within a specific test case.
   2. Global Parameters: Available across multiple test cases.
   3. Runtime Parameters: Used for dynamic values generated during execution.

<figure><img src="/files/je979eNPlgGszzi9ey6g" alt=""><figcaption></figcaption></figure>

2. Based on the selected type, additional optional fields will be displayed:
   1. Local Parameters: Assign it to a module, define minimum and maximum length, set a prefix and suffix, and add a description. Filling out fields like minimum and maximum length, prefix, and suffix is especially useful when using formulas for data generation, as these configurations guide how the data is dynamically created for the parameter.
   2. Runtime Parameters: Similar to local parameters, but also allows selecting a Unique ID type.
   3. Global Parameters: Requires an additional mandatory field – the default value.
   4. Protected Checkbox: For all parameter types, you can enable the Protected option by clicking the checkbox next to it. When enabled, this protects the data associated with the parameter—masking it with asterisks (`****`) in the Test Data window. Ideal for handling sensitive or confidential inputs like passwords or tokens.

<figure><img src="/files/s0hEmRgTPSje5PitB87a" alt=""><figcaption></figcaption></figure>

4. Click Save to store the parameter for future use.

#### Creating a Parameter while Editing a Test Case

1. Open a test case and go to the Test Steps section.
2. Click on a step, then click the "+" icon in the parameter field.

<figure><img src="/files/6CqVF8mfuqlDB4hwv8nO" alt=""><figcaption></figcaption></figure>

3. Fill in the required fields, including the parameter name, type, and other relevant details.
4. Click Save to add the parameter to the test case.

By defining and using parameters effectively, you can create flexible, data-driven test cases that are easier to maintain and scale.

### Utilising Parameters in a Test Case

Once a parameter is created, you can use it in test steps and formulas.

#### Using Parameters in Test Steps

* Click on the parameter field in the test steps to view a dropdown of available parameters. You can either select a parameter from the dropdown or start typing its name and choose it from the suggestions.

<figure><img src="/files/saZR980e6JEzpZqYZKG2" alt=""><figcaption></figcaption></figure>

#### Using Parameters in Formulas

* You can also call parameters in the Test Data module of a test case while adding a formula. To do so, call the equation and add double curly brackets ( **{{** ) inside the Parentheses. A dropdown will appear showing all available parameters, including Local, Global, and Runtime parameters.

<figure><img src="/files/ndCRkr1awEjQTyfkgVHW" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Learn more about [how to use formulas in test data](/test-data-management/generate-dynamic-data-using-formulas-to-optimise-test-data.md).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.simplifyqa.ai/introduction-to-parameters/create-and-utilise-parameters-in-your-test-case.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
