Skip to content

Executing tests using Data Driven Testing by Data Files

This article is a part of the Self-paced Learning Series for the Course: First-Hand Experience of Worksoft SaaS.

Please refer to the link for more details on the Course.
 
 Mapping the Worksoft SaaS feature to the Course Context :: Lesson 7:: Topic 1


1. Executing tests using Data Files
In the previous Lesson, we parameterized Test Scripts to UDV's and passed the test data of Test Case 1 & 2 from the UDV after each Test Case execution.

Now, we will parameterize the values of Test Script to Data Definitions and pass the test data of Test Cases 1, 2 & 3 from the Data File after each Test Case execution.

Here, we will create a Data Definition (which is a pre-requisite to creating your Data Files), it can be created Manually or by Bulk import (after designing the structure for multiple Data Definitions)

Once the Data Definition is ready, we can download the Data Definitions file that acts as a template where the Data Definition attributes act as column headers and can be used to populate the test data accordingly.
       
2. Practice
Clone the first Test Script for this activity: 
  1. Go to Test Scripts and Clone 'Enter & Submit Inputs for HICC - State = NJ Zip = 08817 Age = 45 Income = $20000' and make the following changes:
  2. Change the Test Script name to 'Enter & Submit Inputs for HICC (Parameterized with Data Attributes)'
  3. Select the Data Definition 'HICC - Inputs and Expected Outputs' by clicking on the attachment icon.
  4. Expand instructions with the below Values and bind the respective attributes in the value field
  5. Age : Delete 45 --> In the below field 'Select an attribute in the bound data definition Bind to Age' select 'Age'
  6. Income: 20000 --> In the below field 'Select an attribute in the bound data definition Bind to Income' select 'Annual Income'
  7. Zipcode: 08817 --> In the below field 'Select an attribute in the bound data definition Bind to Zipcode' select 'Zipcode'
  8. Save the test script
Clone the second Test Script for this activity:
  1. Clone another Test Script 'Verify Results of the HICC - State = NJ Zip = 08817 Age = 45 Income = $20000' and make the following changes:
  2. Update the Test Script name to 'Verify Results of the HICC (Parameterized with Data Attributes)'
  3. Select the Data Definition 'HICC - Inputs and Expected Outputs' by clicking on the attachment icon.
  4. Expand instructions with the below Values and bind the respective attributes in the value field
  5. Calculate Result Header: You are eligible for a subsidy. --> In the below field 'Select an attribute in the bound data definition Bind to Age' select 'Calculate_Result_Header'
  6. Premium : $1,021 --> In the below field 'Select an attribute in the bound data definition Bind to Premium' select 'Annual_Premium'
  7. Penalty : $200 --> In the below field 'Select an attribute in the bound data definition Bind to Penalty' select 'Annual_Penalty'
  8. Save the test script
Clone the Scenario for this activity:
  1. Go to Scenario and clone the Scenario ' Perform data inputs and verify results for HICC (Data-driven by UDV)
  2. Update the Scenario name to 'Perform data inputs and verify results for HICC (Data-driven by Data Files)
  3. Delete the existing Test Scripts
  4. Assemble the Parametrized Test Scripts - Enter & Submit Inputs for HICC (Parameterized with Data Attributes) & Verify Results of the HICC (Parameterized with Data Attributes & Navigate to HICC Inputs Screen
  5. Go to view Data Loops, Click on 'Add' under Action for Sequence 1 (Starts at: 1-- Enter & Submit Inputs for HICC (Parameterized with Data Attributes)), select End Loop 3--Navigate to HICC Inputs Screen. Click OK
  6. Click on save as WIP and Exit
Clone the Run Definition for this activity:
  1. Go to Run Definition clone the  Verify HICC calculations (Data-driven by UDVs)' and make the following changes:
  2. Update the RD name to 'Verify HICC calculations (Data-driven by Data File)'
  3. Delete the existing Scenario
  4. Assemble the new Scenario SCE- Perform data inputs and verify results for HICC (Data-driven by Data Files) with predecessor and successor
  5. Click on Continue
  6. In Configure Bindings field, Select the Data File "HICC - 1 Zipcode/state in 3 States" in the data binding screen
  7. Click on the proceed to Testing Context Screen
  8. Select any of the testing context that was created earlier as part of this course
  9. Execute the RD - Verify HICC calculations (Data-driven by Data File)
Please Note:
  • To maintain a clear Learning history, we have followed the best practice of cloning all the entities before getting into the core action steps.
     


Feedback and Knowledge Base