# Global Variables

Global variables are also known as predefined or initial variables. These variables are defined before the execution of test cases. A good example will be "baseURL" and it can be used in all the test cases. Each project in vREST will have its own set of variables. Further, these global variables are grouped under Environments. Few points regarding environments:

  1. A 'Default' environment is always available in each project. Users can define any common variables in this environment.

  2. For multiple environments like dev, staging, QA, prod, etc., the user can define custom environments for each.

  3. Custom environment inherits and overrides all the variables from the Default environment.

To define a global variable / environment, follow the steps below:

  • Go to the Configuration Tab, in the vREST NG application, and Click on the Environments / Variables section.
  • Now select the appropriate environment in which you would like to define the variable. If you are not sure, select the "default" environment.
  • Now, you can add multiple variables to the selected environment by clicking on and filling in the details (key and value).

Now you may use the above variable in the test case by using the format {{VARIABLE_NAME}}.