Introduction


Global Parameter Test Data is one of the Test Data types present in Testsigma along with other types such as Run-time Parameter Test Data, Environment Parameter Test Data(Deprecated), Function Test Data, Parameter 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 store Global Test Data that is available across multiple Execution Environments in a single Execution, we need to use a Test Data that has global scope. That is why we have Global Parameter Test Data. Testsigma provides Global Parameter Test Data for storing data specific to individual Executions.


Note: In rest of the article, we will be referring Global Parameter Test Data as Global Parameter for brevity


Navigation


You can navigate to the Global Parameter page by going to:


Test Development > Global Parameters


after selecting the corresponding Project.


If you have already created Global Parameter Sets, you will see a list of already created Global Parameter Sets and a search box to filter them as shown below:


Global Parameters List


1. If you are creating Global Parameter for the first time, Click on + Create button to create a new Global Parameter. Refer the Create Global Parameter section given below for more details on creating Global Parameter.

2. Click on a Parameter Set name for more details about the Global Parameter Set.

3. Click on Edit icon next to Parameter Set name to edit the Global Parameter. Refer the Edit Global Parameter section given below for more details on editing Global Parameter.

4. Click on Delete icon next to Parameter Set name to delete/remove the Global Parameter. Refer the Delete Global Parameter section given below for more details on deleting Global Parameter.


Create Global Parameter


Clicking the Create button takes us to to the Create Global Parameter page as shown below:



Enter values in the available fields as given below:


Parameter Set Name: Enter a name for the Global Parameter Set. This name is used to identify the Global Parameter Data Set.

Note: This name will be displayed in the Global Parameter selection list while creating/editing an Execution in Create Execution page.


Description: Enter details related to the Global Parameter Set such as Test Data in the Set to be used.


Add Parameter: Click on this button to create an additional Parameter Data row.


Delete Parameter: Click on this button to delete a Parameter Data 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 Parameter Set.


Usage


Example Use Case Scenario


For example,

Let us assume we need to execute the same Test Case for Production Server and QA Server considering that both are running the same version of the Application and therefore, the features and functionalities are the same on both. We can accomplish that using Global Parameters. Let us see how we can achieve this:


Create two Parameters sets, one with URLs for QA and one for Production.


Parameter Set Name: Testing URLs


Test Data Name

Test Data Value

base_url
https://qa.google.com
users_page_url
https://qa.google.com/users


Parameter Set Name: Production URLs


Test Data Name

Test Data Value

base_url
https://prod.google.com
users_page_url
https://prod.google.com/users




Let us take the example of a Test Case with a single Test Step - Go 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 Go and a list of NLP suggestions drops down.

2. Select the Go 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 *|Global| from the list and start entering the previously created global variable name between the horizontal bars('|'). The available Global 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 Global Parameter Set in the Execution Settings.


Below given is the 'Production Test Execution'.



And this one's for  'QA Test Execution'




Note: While creating an Execution you need to make sure that you select the corresponding Global Parameter Set for your purpose.


Now, when we are running 'Production Test Execution', it will take the Global Parameter values from the Global Parameter Set that is linked to that Execution(Production URLs) and when we are running 'QA Test Execution', it will take the Global Parameter values from its Global Parameter Set(Testing URLs). We are using the same Test Case for different scenarios using the Global Parameters.


Edit Global Parameter


Click on the Edit icon to edit existing parameter Set as it would lead you to the next page.

Edit page would appear as below:



Edit the Required information on fields.

Click on Update page will redirect to Global Parameter page with success message.


Delete Global Parameter


1. Click on delete icon to delete existing Global Parameter.

2. Confirm Delete popup by selecting the checkbox and clicking on Delete button.