# Multiple environments

Run Endtest tests across dev, staging, and production environments with one click. Override URLs, credentials, and variables per environment safely.

Part of the Endtest documentation (Advanced). Canonical URL: https://endtest.io/docs/advanced/multiple-environments

---
## Introduction
    
You can use the same test suite for different environments (dev, staging, production, etc).
    
This can be achieved by using variables.
    
## Details
    
You can create a separate test case where you declare all or most of your variables.
    
![](https://app.endtest.io/images/endtest_set_variables_test_case.png)
    
 
    
Ideally, this test case should be the first test case in your test suite:
    
![](https://app.endtest.io/images/endtest_var_test_cases.png)
    
 
    
You can have separate test cases in which you declare the variables for each environment:
    
![](https://app.endtest.io/images/endtest_vars_different_envs.png)
    
 
    
And when you execute the test suite, you can just select which test cases to execute:
    
![](https://app.endtest.io/images/endtest_select_test_cases.png)
    
 
    
Declaring your variables in a single test case also comes in handy if you want to use those variables in different test suites, you just have to use the `Import Test Case` action to fetch them:
    
![](https://app.endtest.io/images/endtest_import_case.png)
    
 
    
In that situation, changing the environment can be done simply by editing that `Import Test Case` step and choosing a different test case that declares a different set of variables.
    

> **Note:** More details about variables can be found in the [Variables](https://endtest.io/docs/advanced/how-to-use-variables/) chapter.
