About Environments
In ReadyAPI, an environment is a set of parameters that match certain configuration for your tests. An environment includes API endpoints, authentication profiles for REST, SOAP, and GraphQL services, database connection settings, custom project properties, and parameters of connection to JMS servers.
By switching an environment, you can quickly change properties of your test without the necessity of changing them manually.
Note: | Environments can include only project properties. Test suite properties and lower-level properties will not be available. |
Create environment
-
To open the Environments editor, select Configure Environments from a drop-down list on the ReadyAPI toolbar:
-
In the editor, click
to add an environment:
Note: If you do not have created environments, click Add Environment. -
Specify a name for the new environment.
-
Select the setup options you need.
-
Select Empty if you do not want to specify specific options.
-
Select Copy endpoints & credentials from the project if you want to use the project’s endpoints and credentials in the new environment.
-
-
Click OK.
![]() |
In ReadyAPI 1.9 or earlier, using services or interfaces with identical names can cause issues. Please update to ReadyAPI 3.3 to make sure your services have unique identifiers. |
Configure environment
To configure environments, select Configure Environments from a drop-down list on the toolbar:
Change API endpoints, project properties, JDBC connections, and JMS servers for different environments by using the corresponding tabs:
Toolbar
Use the buttons on the Environments editor toolbar to add, remove, or modify environments.

Icon | Option | Description | ||
---|---|---|---|---|
![]() |
Add | Adds a new environment. | ||
![]() |
Remove | Deletes the selected environment. | ||
![]() |
Rename | Renames the selected environment. | ||
![]() |
Clone | Creates a copy of the selected environment. | ||
![]() |
Sort | Sorts environments alphabetically. | ||
![]() ![]() |
Move Up Move Down |
Moves the selected environment up or down in the list. The order of environments will also be changed in the Environments drop-down.
|
Note: | You can also right-click an environment and select one of the above-mentioned commands. |
Switch between environments
To switch between environments, use one of the following commands:
-
Use the drop-down list on the control bar:
-
Double-click an environment in the Environments editor.
-
Right-click an environment in the Environments editor, and select Set Active.
-
Use the
<project name>.setActiveEnvironment(<environment name>)
code line in the setup or teardown script, or in the Groovy script test step:Groovy
// Replace the project and environment names with those you need
def proj = testRunner.testCase.project.workspace.getProjectByName("Sample Project")
proj.setActiveEnvironment("Test Environment")
Set environments in command line runners
You can also force ReadyAPI to switch the environment while running tests with the SoapUI test runner, LoadUI test runner, or security test runner:
-
In GUI – On the Overrides tab, select the environment you need in the Environments drop-down list.
Note: If you need to override the Endpoint, Username, and Password values, do this with the -e
,-u
, and-p
command-line arguments. See Command-Line Arguments for details. -
In command line – Specify the environment you need by using the
-E
argument, for example:"-ETest Environment"
See Also
Testing APIs
Starting ReadyAPI Tests by Using Command-Line Runners