# Environment Variables

{% embed url="<https://www.youtube.com/watch?v=VIakLfguzsc>" %}
Ddosify Environment Variables Feature
{% endembed %}

Similar to Postman, the Ddosify Platform offers an Environment Variables feature that allows you to store constants in variables for convenient use within your test scenarios.

#### Environment Variable Creation

1. Navigate to the Environments listing page within the Ddosify App, and find the 'New' button situated at the top-left corner of the page.

   <figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FirMxODNnXMz6MeKgJRUN%2Fimage.png?alt=media&#x26;token=8f1e7f06-576d-4708-9f95-7b235a0468e5" alt=""><figcaption><p>Ddosify Environment Listing Page</p></figcaption></figure>
2. Assign a unique name to the new environment, which will be used to link the environment to a test. Next, create your name-value pairs. The values can be of various types, such as Number, String, or Array.

   <div><figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FDP05IM3R2TL40d3Ty7JM%2Fimage.png?alt=media&#x26;token=d51bd1bb-dede-46c9-91d3-edc17bf542d3" alt=""><figcaption></figcaption></figure> <figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2F5LvIsrdJcThHaVlzLOik%2FScreenshot%202023-04-17%20at%2019.00.41.png?alt=media&#x26;token=2cf1424c-97d1-4a70-b25c-045d54927d82" alt=""><figcaption></figcaption></figure></div>

#### Attach Environment into Tests

1. In the Ddosify App, go to the Test Suite and choose the Environment you previously created using the dropdown menu in the top-right corner of the Test Suite.

   <figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FShVDt5rrusoREzInsUoN%2Fimage.png?alt=media&#x26;token=224b82eb-2fc3-46c1-bdda-f3f77e55493a" alt=""><figcaption></figcaption></figure>
2. Utilize the `{{environmentVariableName}}` format to insert test data into one of the following locations: URL, headers, query parameters, or authentication.

   <figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2Fpfh3IEmAavCTnvsSzRWZ%2Fimage.png?alt=media&#x26;token=88c9c41c-d499-4563-9e1e-976de99f623b" alt=""><figcaption></figcaption></figure>
