Environments Test Data is one of the Test Data types present in Testsigma along with other types such as Run-time Parameter Test Data, Function Test Data, and Random Test Data.
More details about Test Data Types is available in this article - What are the different types of test data supported in Testsigma?
When we need to use different test data across various Test Environments using a single Test Case/Test Suite, we can use Environments Test Data. Testsigma provides Environments Test Data for storing data specific to individual Executions.
Note: In remainder of the article, we will be referring Environments Test Data as Environments for brevity.
You can navigate to the Environments page by going to Test Development > Environments after selecting the corresponding Project.
If you have already created Environment Sets, you will see a list of already created Environment Sets and a search box to filter them as shown below:
Environment Sets List
Click on an Environment Set name for more details about the Environment Set.
1. If you are creating an Environment set for the first time, Click on + Create button to create a new Environment Set. Refer the Create Environment section given below for more details on creating Environments.
2. Click on Edit icon next to Environment Set name to edit the Environment set.
3. Click on Delete icon next to Environment Set name to delete/remove the Environment set.
Create an Environment
Clicking the Create button takes us to to the Create Environment page as shown below:
Enter values in the available fields as given below:
Parameter Set Name: Enter a name for the Environment Parameter Set.
Description: Enter details related to the Environment Parameter Set such as Test Data in the Set to be used.
Add Parameter: Click on this button to create an additional Parameter row.
Delete Parameter: Click on this button to delete a Parameter row after selecting the checkbox on the row.
Parameter Name: Enter a Parameter Name that is used to identify the Parameter.
Parameter Value: Enter the value to be stored in the Parameter.
After entering all the required values, click on Create button to create the Environment Set.
Example Use Case Scenario
Let us assume we need to execute the same Test Case for Production Server and QA Server considering that both the servers are running the same version of the Application and therefore, the features and functionalities are the same on both. We can accomplish that using Environments. Let us see how we can achieve this:
Create two Environment sets, one with URLs for QA and one for Production.
Environment Set Name: Testing URLs
Test Data Name
Test Data Value
Environment Set Name: Production URLs
Test Data Name
Test Data Value
Note: Please make sure to use the same Parameter names for both the Environment Sets.
For example, if the first set contains 'base_url', second set should also contains 'base_url'(mostly with a different value).
Let us take the example of a Test Case with a single Test Step - Navigate to [test data]
Assuming that the Test Case is already created, start by creating the Test Step.
1. In Create Test Step Wizard, start typing the action you need to perform which in our case is Navigate and a list of NLP suggestions drops down.
2. Select the Navigate to [test data] statement from the list.
3. Double click and delete the [testdata] part. As soon as the [testdata] part is deleted, a list of suggestions with different Test Data types that are available in the context is shown.
4. Select *|Environment| from the list and start entering the previously created Environment parameter name between the horizontal bars('|'). The available Environment parameters are shown in the suggestions list and we just need to select the required one. Let us try 'base_url'.
5. Click on Create button to create the Test Step.
Here's the created Test Case:
After that, you can create two Executions, namely 'QA Test Execution' and 'Production Test Execution'. While creating the Executions, select the corresponding Environment Set in the Execution Settings.
Below given is the 'QA Test Execution'.
And this one's for 'PRODUCTION Test Execution':
Note: While creating an Execution you need to make sure that you select the corresponding Environment Set for your purpose.
Now, when we are running 'Production Test Execution', it will take the Environment Parameter values from the 'Production URLs' and when we are running 'QA Test Execution', it will take the Environment Parameter values from 'Testing URLs'. We are using the same Test Case for different environments using the Environments.
Welcome to the era of #SmartTestAutomation !