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

# Parameterization

Parametrization in API testing refers to the practice of using parameters or variables to make API requests and responses more flexible, reusable, and versatile.

It involves replacing specific values in API requests and responses with variables, which can be dynamically populated with different values during testing or execution. Parametrization enhances the flexibility and adaptability of your tests, allowing you to test various scenarios using a single set of test cases.

## Contents

* Parameterization
  * Create a Parameterized API
  * Execution & Reports
  * Make Individual Field Parameterized
  * Sample XML Template
  * Related Topics

***

## Create a Parameterized API:

In this guide, you'll learn how to perform parameterized API testing.

Step-1: Navigate to Functional Testing.

Step-2: Build a Test Script.

* Click on to getting started with building a Test Script

Step-3: Switch "Make API Parameterized" switch to on.

* This toggle is disabled if any of the following is true:
  * Database Assertion is on.

Step-4: After that, make sure to **save** the test and then click the **Parameter** button at the top-right and then Parameterized popup will get displayed.

Step-5: Then click on the **Download JSON** or **Download Excel** or **Download XML** button to download file.

Note :

* For SOAP API, **Download XML** will be displayed.
* For REST API, **Download JSON** will be displayed.
* For SOAP, GraphQL & REST API, **Download Excel** will be available.

Step-6: After downloading file open that file.

* Now fill the value in fields

Step-7: Now save the file and Upload template by clicking on the **Browse** button.

Step-8: After browsing the template, click the **Submit** button to upload template. Now we are all good to run the API Test.

Note :

* If scripts are parameterized in functional or performance or API process tests, make sure to save script once before downloading parameterized file.

***

## Execution & Reports

Ensure the tests have been saved before execution.

Step-1: Click the **Play** button at the top-right to execute this parameterized API test.

Step-2: Navigate to the reports by clicking the "Reports" button at the top-right as well and go to the "Test Result" tab.

Step-3: Find the test at the top, click **View Details**.

* Multiple reports are available on this page for each test case identified in the parameterization file as
* Test -1&#x20;
* Test -2&#x20;

***

## Make individual field as parameterized

* User can make an individual field as parameterized rather than making the whole API as parameterized.
* User will be able to make the following fields as parameterized:
  * Headers
  * Path Parameters
  * Query Parameters
  * Assertion on headers
  * JSON path assertion
  * Assertion on body
  * Schema validation

### Let’s see how it works!!!

Step 1: First, toggle on **Make API parameterized** from the info tab to use this feature.

Step 2: Then, go to the **Header & Params** tab.

Step 3: In this tab go to the Header or Path parameters or Query parameters, there’ll be one column as Parameterized.

Step-4: After that, make sure to **save** the test and then click the **Parameter** button at the top-right and then Parameterized popup will get displayed.

Step-5: Then click on the **Download JSON** or **Download Excel** or **Download XML** button to download file.

Step-6: After downloading file open that file.

* Now fill the value in fields

Step-7: Now save the file and Upload template by clicking on the **Browse** button.

Step-8: After browsing the template, click the **Submit** button to upload template. Now we are all good to run the API Test.

Step-9: Ensure the tests have been saved before execution. And click the **Play** button.

* Navigate to the reports by clicking the "Reports" button at the top-right as well and go to the "Test Result" tab.
* Find the test at the top, click **View Details**.
* Multiple reports are available on this page for each test case identified in the parameterization file as
  * Test -1&#x20;
  * Test -2&#x20;
  * Test -3&#x20;

***

## Sample XML Template

#### Sample XML Template

#### Sample XML Template when individual field as parameterized:

***

### Click here for API Process Parameterization

### Related topics

* API To DB Assertion
* Emailing & Downloading Report


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://newdocs.qyrus.com/api-testing/parameterization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
