Introduction


Global Parameter Test Data is one of the Test Data types present in Testsigma along with other types such as Run-time Test Data, Environment Test Data, 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 data that is available in all the Execution Environments, 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 Projects. 


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:


Select Project > Project Settings > Global Parameters


If you are creating Global Parameter for the first time, you may click on the Create button and you will be taken to Create Global Parameter page. If you have already created a Global Parameter, you will see a list of already created Global Parameter and a search box to filter them.


Global Parameters List


1. 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 Test Data Set name for more details about the Test Data Set.

3. Click on Edit icon next to Test Data 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 Test Data 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:



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

Note: This name will be displayed in the Global Parameter selection list while creating 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.


Test Data in JSON: Enter the Test Data data in JSON format here or Enter the Test Data data in Test Data Name-Value pair in the table below.


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


Delete Test Data: Click on this button to delete a Test Data Data row after selecting the checkbox on the row.


Test Data Name: Enter a Test Data Name that is used to identify the Test Data.


Test Data Value: Enter the value to be stored in the Test Data.



After entering all the required values, click on Create button to create the Test Data Set.


Usage


Please check the following document for usage of Global Parameters along with other Test Data types - Different types of test data and their usage in Testsigma


Example Use Case Scenario


For example,

Let us assume we have created the following Global Parameter Data Set:


Test Data Set Name: Usernames Set


Test Data Name

Test Data Value

gmail_username
testsigma_g
yahoo_username
testsigma_y



Let us take the example of Test Step template - type [testdata] in [ui_identifier]


1. Start typing the action you need to perform which in our case is type and a list of suggestions drops down.

2. Select the type [testdata] in [ui_identifier] template from the list.

3. 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('|').

5. The available Global parameters are shown in the suggestions list and we just need to select the required one.

6. Complete the Test Step by entering the UI Identifier details.

7. Enter all the other details and click on Create button to create the Test Step.


After that, you can select the Test Data Set named "Usernames Set" in the Global Parameter field while creating Execution.


Note: While creating an Execution you need to make sure that you select the same Global Parameter Set that is used in the Test Cases.



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.