# Understanding Runtime Parameters

Runtime Parameters are dynamic inputs that can be passed to test cases during execution. These parameters provide flexibility, allowing you to reuse test cases with varying values and conditions, without having to modify the test steps or scripts. They are essential for automating tests in different environments, with different data, and in various scenarios.

### What are Runtime Parameters?

Runtime Parameters are variables that you can set and use within your test cases during execution. They help in customising test runs based on specific inputs that are defined at runtime, rather than hardcoding values into the test scripts.

### Key Features of Runtime Parameters

* Dynamic Inputs: They can be provided at runtime and vary between executions.
* Test Reusability: Test cases can be reused with different sets of data.
* Environment Flexibility: You can run tests in different environments (e.g., UAT, Production) by passing different parameter values.
* Seamless Integration: Allows integration with data-driven testing approaches by dynamically feeding data into tests.
* Scalability: Easily scale your tests by running them with different parameter values without changing the core test logic.

### Creating Runtime Parameters in SimplifyQA

To use runtime parameters effectively, follow these steps:

#### 1. Create a Runtime Parameter

* Navigate to Test Management > Parameters.
* Click on '+ Parameter', then enter a name and select a parameter type as 'Runtime'.
* If you want the parameter keys to be unique, enable the "Make Unique" field and click 'Save'.

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

2. **Understanding the 'Make Unique' Field**

When creating a runtime parameter, selecting 'Make Unique' will open a dropdown with the following options:

This option is used to make the runtime parameter keys unique by appending below options:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><strong>OPTION</strong></td><td valign="top"><strong>DESCRIPTION</strong></td><td valign="top"><strong>EXAMPLE OUTPUT</strong></td></tr><tr><td valign="top">_TestcaseID</td><td valign="top">Appends the Test Case ID to the key.</td><td valign="top">testUser_12345</td></tr><tr><td valign="top">_UserID</td><td valign="top">Appends the User ID to the key.</td><td valign="top">testUser_56789</td></tr><tr><td valign="top">_UserID_TestcaseID</td><td valign="top">Combines User ID and Test Case ID.</td><td valign="top">testUser_56789_12345</td></tr><tr><td valign="top">_TestcaseID_UserID</td><td valign="top">Combines Test Case ID and User ID.</td><td valign="top">testUser_12345_56789</td></tr></tbody></table>

**Use case:** If multiple test cases run in parallel, enabling this feature ensures that each parameter remains unique, preventing duplicate runtime values.

3. **Using Runtime Parameters in a Test Case (For example)**

* Navigate to a Test Case: Go to Test Management > Test Cases and open a test case.
* For Example: Use 'Get Text and Store' action which fetches the text from UI and stores to runtime parameter.
  * Add a step to your test case where you need to capture a value dynamically.
  * Select the action: "Get Text and Store".
  * Provide a Runtime Parameter Name (e.g., CapturedOrderID).
* Use the Stored Parameter in another Step:
  * In a subsequent step, reference the runtime parameter as “CapturedOrderID”
  * Example Use Case – Capturing Order ID Dynamically

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><strong>STEP</strong></td><td valign="top"><strong>ACTION</strong></td><td valign="top"><strong>INPUT</strong></td><td valign="top"><strong>OUTPUT</strong></td></tr><tr><td valign="top">1</td><td valign="top">Navigate to Order Page</td><td valign="top">URL</td><td valign="top">-</td></tr><tr><td valign="top">2</td><td valign="top">Get Order ID from UI</td><td valign="top">XPath: //span[@id='orderID']</td><td valign="top">Store in ${CapturedOrderID}</td></tr><tr><td valign="top">3</td><td valign="top">Type Text or Validate Text</td><td valign="top">Input: ${CapturedOrderID}</td><td valign="top">-</td></tr></tbody></table>

This ensures that every order ID is dynamically captured and reused throughout the test.


---

# 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/understanding-runtime-parameters.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.
