Skip to content
Testsigma DOCS

Test Data

Environment Test Data


In Testsigma, you can handle and use specific sets of test data linked to different test environments with Environment Test Data. You can include this data in the specific environment where the app is tested, like server names, port numbers, and database credentials. Integrating this environment-specific data into test cases allows you to verify the app’s behaviour across different environments such as development, testing, staging, and production. This guide provides an overview of using Environment Test Data in Testsigma across test steps, ad-hoc runs, and test plans.


Prerequisites

Before you begin, ensure that you have referred to:


  1. Use NLP to create a new step in the Test Case and include a placeholder for test data. NLP

  2. Click the test data placeholder to replace it, and then select the *** Environment** from the Test Data Types dropdown menu. Test data

  3. Select Environment in the Environments overlay screen from the right-side panel. Environment in Test Step


  1. On the Ad-hoc Run page, click the right arrow before Additional Settings to reveal the feature.
  2. Select Environment from the drop-down list. Environment in Ad-hoc Run

  1. Navigate to the Test Plan Settings tab on the Create or Edit Test Plan page.
  2. In the Additional Settings section, select Environment from the drop-down list. Environment in Test Plan

You can effectively manage environmental variables, which ensures consistency across various environments.

Testsigma introduced a centralized master list of environment variables, where users can maintain a clean and organized list of Variables, streamlining the selection process during test authoring.

You can modify environment variable values directly on the Ad-Hoc Run page before execution.

Testsigma also automates the creation of new and updated keys across all environments, eliminating the need for manual replication and ensuring that changes are cloned consistently.


Add Keys & Values to all Environments Globally

Section titled “Add Keys & Values to all Environments Globally”
  1. From the left navigation bar, go to Test Data > Environments and click the Variables tab. Variables

  2. Click Add Variable. This opens the Add Environment Variable dialog. Add Variable

  3. Enter the Variable name and Value and click Create. Add Variables

  1. Once the Variable is added to the list, click Update. Update

  2. Verify the Variable added in the Environments. Verify Variable

  3. There will be a default indication with the letter D for all the Variables added globally. Default Indication

  1. From the Test Case Details page, click Run. This will open the Ad-Hoc Run overlay. Ad-Hoc Run

  2. Go to the Environment section and confirm the variables by clicking on Manage Variables. Manage Variables

  3. Update the changes and click Apply. New Changes

  4. Click on Run Now to execute the test with updated Environment and Variable. Run Now


Use Environment Variables to Select Test Data Values

Section titled “Use Environment Variables to Select Test Data Values”

Environment variables can filter test data sets by name during data-driven testing. This method provides flexibility and reusability, making your test cases more adaptable to different scenarios.

  1. Create an Environment and add the name-value pairs that match the set names and values in your Test Data Profile.

  2. On the Test Case Details page, click the Test Case Settings icon in the right navigation bar. Test Case Settings

  3. Select the Test Data Profile from the dropdown menu to associate it with the test case. Enable the Data-Driven toggle. enable data driven to use environment parameter

  4. Choose Parameters as the Filter type. Select Equals, Contains, Starts with or Ends with as the Comparison Metric from the dropdown menu. Choose Parameter Set Name from the dropdown. Parameters

  5. Type *| to open the Environment overlay and choose the Environment Parameter Name to add the filters. use environment variables to select test data values

  6. When you run the test case, it will execute using the specified filters.


  1. Navigate to Test Data > Environments.

  2. Click Environment for which you want to get Environment ID.

  3. The <ENV_ID> can be found in the URL of the Environment details page. Env ID