'Introduction


Parameter Test Data is one of the Test Data types present in Testsigma along with other types such as Global Parameter, Function Parameter, Runtime 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 perform a data-driven Test Execution, we can make use of parameter Test Data. Parameter Test Data can be managed in the Test Data Profile page and you navigate to the page by going through:


Applications > Select Application > Select Versions > Test Data


Usage of Parameter Test Data


Before we proceed, we need to create a Test Data Profile from which the Test Data is to be fed to the Test Steps for data-driven testing.

Please refer this article for more details on creating a Test Data Profile - How to create Test Data Profile?


We have created a sample Test Data profile as shown below:


After creating a Test Data Profile, we need to add the Test Data Profile to our Test Case.

Please refer this article for more details on creating a data-driven Test Case - How to create a data-driven Test Case?


We have created a sample Test Case as shown below:


As shown in the above image, make sure that the Data-Driven button is toggled and the respective Test Data Profile is selected.


Now we can start creating data-driven Test Steps.

Let us take a sample scenario to explain in detail about the usage of Parameter Test Data.


Example Scenario

We will be doing the following steps in our Test Case:


1. Go to OrangeHRM Homepage at http://opensource.demo.orangehrmlive.com/

2. Enter the username in the username field

3. Enter the password in the password field

4. Click on the Login button


We can make the above steps data-driven i.e we can enter multiple username-password pairs and try to log in with that. Let us see how that is done below:


Creating the Test Case will take us to the Test Case details page.


1. Click on the create Test Step button to begin. Start by entering type into the Action Text input field, select type testdata template from the suggested list of commands, and replace testdata with the Page URL as shown below:

type http://opensource.demo.orangehrmlive.com/



2. To enter the username in the username field, start by entering type into the Action Text input field, select type testdata in ui identifier template from the suggested list of commands, and replace testdata with username and ui identifier with usernamefield as shown below:

type username in usernamefield



3. To enter the password in the password field, start by entering type into the Action Text input field, select type testdata in ui identifier template from the suggested list of commands, and replace testdata with password and ui identifier with passwordfield as shown below:

type password in passwordfield


Note: In the above two steps, we are replacing the testdata part with our desired variable names and the ui identifier part with the ui identifier name for the input fields.


4. Start by entering click into the Action Text input field, select click ui identifier if visible template from the suggested list of commands, and replace ui identifier with loginbutton as shown below:

click loginbutton if visible



The UI Identifiers used in the task are:

usernamefield with an id = 'txtUsername'

passwordfield with an id = 'txtPassword'

loginbutton with an id = 'btnLogin'