The different types of Test data supported in Testsigma are:


  1. Raw Test Data
  2. Parameter Test Data
  3. Global Parameter Test Data
  4. Run-time Test Data
  5. Function Parameter Test Data
  6. Random Test Data
  7. Environment Parameter Test Data***

*** = Deprecated



1. Raw Test data

Raw Test Data is the most commonly used type of Test data in Testsigma. In fact, new users of Testsigma might be unaware of the numerous Test Data options available.

The Test data specified in the Test Steps directly is called Raw Test data.


For example, we specify the URL to navigate to at the beginning of Test Case using the template go to test data as shown below:

go to http://www.google.com


Here, the test data i.e URL is specified directly in the Test Step. This is an example of Raw Test Data usage.


There's an additional option available with Raw Test Data - the ability to provide blank values as Test Data. In order to use this functionality, we simply need to replace the test data part with the string '_blank'(without quotes). This will enter a blank value at the field where test data is passed.


For example, you can use the template type test data in ui identifier with blank test data as shown below:

type _blank in usernamefield


The above test step will enter a blank value in usernamefield Element.


2. Parameter Test data

The Parameter Test Data is used to store data that is to be used in a single Application Version and it is generally used for Data-driven Testing.

  • Parameter Test Data is stored and managed on the Test Data Profile page.
     
  • Its scope is limited to an Application Version.
  • Parameter Test data is invoked by using the @|Parameter| format where the string Parameter is replaced by the specific parameter name.


Example Use Case Scenario:

Multiple Login details are fed into a single Test step using a Test Data Profile that contains a set of usernames and passwords.

While using the command 'type [testdata] in [ui_identifier]' in a Test Step, [testdata] is replaced by "@|username|" where username is the name of the parameter in the Test Data Profile.


Note: Test Data Profile is selected while creating Test Case in the Test Data Profile selection.


The Test Step will be iterated as many times as there are rows of username parameter in the Test Data Profile.



Please refer this article for more details on performing Data-driven Testing - Data-driven Automated Testing using Testsigma



3. Global Parameter Test Data

The Global Parameter is used to store data that is to be used across Execution Environments.

  • Global Parameter is stored and managed on the Test Data Profile page.
     
  • Its scope is limited to a Project.
  • Global Parameter has the highest scope in Testsigma's set of Test Data.
  • The global parameter is invoked by using the *|Global| format where Global is replaced by the parameter name.


Example Use Case Scenario:

SQL database login details for the user is saved in global parameter and is available across Executions for the user.


Note: You can import the Global Parameters from other Projects if you need them in your new Project.


Please refer this article for more details on managing Global Parameters - How to Create/Edit/Delete Global Parameter Test Data?



4. Runtime Test Data

Runtime Test Data is used to store data obtained during the run-time i.e during the execution of Test Cases. 

  • Scope and life of Run-time Test Data is limited to the Test Case Execution.
  • It is quite different from above three types in that we don't have an interface to manage Runtime Test Data and it is unnecessary as well since the scope of Runtime Test Data is limited to Test Case Execution.
  • Store keyword is used to store Run-time data to user-defined variables.


Example Use Case Scenario:

Title of a webpage is checked before and after page reload using runtime data parameter.


Title of a Webpage is stored to a run-time data parameter named page_title using the 'Store title of the current page into a variable [test data]' command in Testsigma.

[test data] part is replaced by $|Runtime| where we replace Runtime by desired variable name i.e page_title.

After reloading the page, the page title is checked again using the 'The page title should be $|page_title|'


Info: In the above Test Case, we are storing the title of Google Home page into a runtime Test Data variable named pagetitle and entering the same using the variable in the next step.



Please refer this article for more details on using Runtime Parameters - How to use Runtime Test Data in Test Steps?




5. Function Parameter Test Data

Function Parameter is used to invoke the data returned from a Custom Function.

The Custom Function return data type is limited to 'String' data-type.

The Function Parameter is invoked by using the !|Function| format where Function is replaced by the Custom Function name.


Note: If your Custom Function has arguments, new fields for entering the arguments will be created below the Action Text box.  


Example Use Case Scenario:

A Web App calculating the EMI of your Personal Loan can be tested by creating a Custom Function in Testsigma. This Custom Function has a simple implementation of the data processing done by the Web App in Backend.


  • Both the Custom Function and the Web App does the same processing for the same input data. The Custom function calculates the EMI on one side and the Web App calculates the EMI on the other.
  • Data returned by the Custom Function is available using the Function Parameter in Testsigma.
  • This parameter is compared with the result from Web App.
  • If both values match, the Web App is functioning correctly.


6. Random Test Data

Random Test Data can be used to generate random values for usage in the Test Case execution.

  • It returns an alphanumeric block of data when invoked within a Test Case.
  • The Random data is invoked by using the ~|Random| format where ~|Random| is replaced by an integer value 1-256 which gets replaced by an alphanumeric character of the specified length during Test Case Execution.

            For example, ~|25| is replaced by a 25 character long alphanumeric string while execution.


Example Use Case Scenario:

An alphanumeric string of N random characters is supplied by Testsigma when it sees ~|N| in place of test data in the Test Step.



Info: In the above image, we are using random Test Data to enter a random 25 digit alphanumeric string in the Wikipedia search box.