--- title: "Variables" url: https://docs.catalyst.zoho.com/en/devops/help/automation-testing/variables/ description: "Automation Testing enables you to execute efficient, automated API tests on function end-points or any third-party URL and resolve problem areas." last_updated: 2026-08-17T12:16:04Z service: DevOps type: general --- # Variables ### Introduction A variable is essentially a placeholder for a dynamic value that you might pass in your request. Storing a frequently used value as a variable and referring to it in your test cases makes it easier when you have to change its value, because you need not change it in each test case you have used it in. You can just edit the configured variable. You can configure different types of variables in Automation Testing that are used for different purposes. One way of using variables is defining and storing values for fixed parameters in the _Variables_ section, that you can easily refer to in your requests. This involves the following two types of variables: * **Global Variables:** The global variables is a single set of variables that you can define and store to be used in any of your test cases. These variables have a global scope, and can therefore be applied to all test cases. * **Environment Variables:** Environment variables help you categorize and configure values of the same keys for different environments. When you configure a [test plan](https://docs.catalyst.zoho.com/en/devops/help/automation-testing/test-plans) or perform an [instant run of a test case](https://docs.catalyst.zoho.com/en/devops/help/automation-testing/modules-test-cases/#manage-a-test-case-and-its-requests), you can choose the environment that must be used for the execution. The variables defined in that environment will be applied. These variables can also be used globally in all test cases. Another way of using variables in Automation Testing is extracting values received from the responses of individual requests in test cases, and assigning them to variables to pass them as parameters in the next requests in a chained set up. The scope of such variables defined within a request is only limited to that test case, and they cannot be referred outside of that test case. This method is discussed in detail with an example in the [Chain Requests section](https://docs.catalyst.zoho.com/en/devops/help/automation-testing/modules-test-cases/#chain-requests). #### An Example for Global and Environment Variables: You can store different values of one variable in each single environment. For example, the value of ZAID in Catalyst is different for the Development and Production environments. In that case, you can first create two environments named "Development" and "Production". You can then create a variable with the name "zaid" in both of these environments, and define its respective value in both separately. While configuring a test plan, if you choose _Development_, the value defined for zaid in the development environment will be applied, wherever you have used the variable zaid in your requests. ![](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_create_test_plan_3.webp) You can also define the same variable as a global variable, as well as in each environment separately. For example, you can create a variable _baseURL_ as a global variable and define its value as "https://globaltest.com". You can then create the same _baseURL_ variable in the Development and Production environments with the values "https://developmenttest.com" and "https://productiontest.com" respectively. Now, assume you refer to _baseURL_ as the request URL while [configuring the request of a test case](https://docs.catalyst.zoho.com/en/devops/help/automation-testing/modules-test-cases). If you choose _Development_ as the environment variables to use while performing an [instant run](https://docs.catalyst.zoho.com/en/devops/help/automation-testing/modules-test-cases/#manage-a-test-case-and-its-requests), the value https://developmenttest.com will be used as the request URL. If you choose _Production_, the value "https://productiontest.com" will be used. If you don't select any environment for the instant run, the global value "https://globaltest.com" will be used by default. #### Important points to remember: * Creating the same variable as a global variable and as different environment variables is assigning multiple values to the same key. * You can create a global variable, and have corresponding environment variables. If you create a new variable only in a specific environment, it will still be listed in the global variables section with the same value. * Global variables are used by default in a test plan or an instant run, when no environment is chosen. Only when you select an environment, the environment's values will override the global values of the variable. * The local variables you create inside a specific request can be declared directly by their names, and they must be [passed as parameter values](https://docs.catalyst.zoho.com/en/devops/help/automation-testing/modules-test-cases/#configure-a-request) in other requests in the \{\{\\}\} format. * You must pass the Global and Environment variables in the **\{\{$\\}\}** format inside a request. ### Create Global Variables You can create global variables in the following manner: 1. Click the **Variables** tab in _Automation Testing_, then click **Create Variable**. ![catalyst_pilot_create_variable_1](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_create_variable_1.webp) 2. Enter the names and values for the variables, then click **Save**. ![catalyst_pilot_create_variable_2](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_create_variable_2.webp) > **Note:** Variable names must not include spaces or start with a number. Variable names are also case-sensitive. You can also add multiple variables in bulk by clicking **Bulk Add** on the top-right corner. Define the variables in the `key:value` format in the pop-up window, then click **Save**.![catalyst_pilot_variable_bulk_add](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_variable_bulk_add.webp) All these variables will be added and listed. ![catalyst_pilot_variable_bulk_added](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_variable_bulk_added.webp) ### Create Environment Variables Before you create environment variables, you must create an environment. 1. Click **Environment Variables** from the _Variables_ section. 2. Enter a name for the environment in the pop-up window, then click **Create**. ![catalyst_pilot_env_variable_1](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_env_variable_1.webp) 3. You can now create variables in that environment in the same way you created Global variables. Enter the names and values of the variables, then click **Save**.![catalyst_pilot_env_variable_2](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_env_variable_2.webp) In an environment's section, all your global variables will be listed when you click the Name text box. You can select one of them to assign a different value for that variable for this environment, or you can type in the text box to create a completely new variable. This variable will also be listed in the global section. You can also add multiple environment variables in bulk by clicking **Bulk Add** on the top right corner, in the same as adding global variables in bulk. ### Manage Global and Environment Variables You can choose to open the global variables or a specific environment's variables, by clicking the drop-down on top. Select the necessary option. ![catalyst_pilot_variable_dropdown](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_variable_dropdown.webp) * **Edit an Environment's name:** Click the edit icon next to the environment's name. Make the changes in the pop-up window and click **Update**. ![catalyst_pilot_env_edit](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_env_edit.webp) * **Delete an Environment:** Click the delete icon next to the environment's name. Click **Yes** in the pop-up window. ![catalyst_pilot_env_delete](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_env_delete.webp) > **Note:** If you delete an environment or a Global or Environment variable, it might affect your configured test cases and result in data loss. Make sure that you proceed with caution. * **Delete a Variable:** You can delete a Global or an Environment variable by clicking the edit icon that appears when you hover over its name. ![catalyst_pilot_variable_delete_1](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_variable_delete_1.webp) Click **Yes** in the confirmation pop-up window. ![catalyst_pilot_variable_delete_2](https://catalyst-docs-development.zohostratus.in/images/help/automation-testing/catalyst_pilot_variable_delete_2.webp)