Skip to content

"Binding" Data Files within Scenario Validations - Bind Summary tab

Once you have successfully completed ‘Parameterization’ of your Test Scripts (that you needed to parameterize), you can proceed to validate the Scenarios (that you have already certified to run successfully against all testing contexts of interest) in a “Data-Driven” mode.

Script Assembly within a Scenario – Picking Parameterized or Non-Parameterized Scripts

If you have already certified/validated your Scenario, you have to edit your Scenario’s “Script Assembly” to replace the “Non-Parameterized” Test Scripts within the Assembly with “Parameterized” version of your Test Scripts.

You can do this by simply by:

  • Going to “Edit” mode of your Test Script
  • Removing the Test Scripts from the “Selected Scripts” grid (only those that you want to replace w/ their parameterized versions)
  • Using the + icon with the mouse over “Pick Parameterized” in the “Script Library” grid for the same Scripts, 
  • Re-ordering the Test Scripts in the correct order within the “Selected Scripts”  grid.
  • Click “Save as WIP & Validate” button

 
 Screenshot below shows the “Selected Scripts” after the assembly is completed with the parameterized Test Scripts. 


Note: Worksoft SaaS currently also allows you to do a “Single-Click” switching the “Non-Parameterized” flavor of your Test Scripts with their “Parameterized” equivalents. You do NOT have to follow the instructions provided above in this article of the document to remove the 'Non-Parameterized' versions of the (applicable) Test Scripts from the current Assembly and then manually adding back the 'Parameterized' versions of the same scripts to the Assembly and then re-sequencing them in the correct order. 

Binding Data File(s) to your Scenario

When you click on “Save as WIP & Validate” button, Worksoft SaaS will give you an opportunity to pick the “Data File” that has the data you want used for your “Data-Driven” execution.



The table on the top left hand side lists the number of Scripts that need a “Data File” binding. In the Health Insurance Calculator testing automation context, there are 3 Test Scripts that are parameterized (linked to the Data Definition “Premium & Penalty Calculator – Expected Output by Test Input”) that you need to assign (feed) a “Data File” for Worksoft SaaS to read the rows of test data from.

In the bottom portion of the “Bind Data” tab / screen, you also can see (in blue font) the BEGIN and the END for the DATALOOP. All Test Scripts within this BEGIN and END will iterate during Data Driven Test.

You just have to feed (assign) the Data File by pulling down values from the “Data File” drop-down to right of the “DATALOOPBEGIN”.

Once you assign a “Data File” if there are no more Test Scripts that need Data File Binding, the scenario listing in the bottom get collapsed automatically, and the top-left hand side table on the screen shows a green checkmark that tells you that you are now ready to proceed further.

Most importantly you will now see “Proceed to Testing Context” button on the top right hand side. You should click that button.


Only first 3 rows of your Data File get used during Scenario Validations

Please note that for Scenario Validations, Worksoft SaaS only runs the tests using the first 3 data rows from your Data File even though your Data File bound to the Scenario being validated has more rows.

This limitation of 3 rows being used for Scenario Validations allows you to rapidly finish (re)certification of your Scenarios (remember, you have certified the Scenarios previously without parameterized Test Scripts), but this time, you have certified them in the context of “Data-Driven” execution. 

When you include these Scenarios in Test Run Definitions and bind Data Files,  and execute those Run Definitions in a “Data-Driven” mode, then all rows from the bound Data File will be iterated through.

Options that control Data Driven Mode of Execution

There are several options for you to choose from that drive and/or control the Data-Driven execution of your Scenarios.




Even though your Test Scenario includes one ore more “Parameterized” Test Scripts, you can execute your Scenario Validation using the “Non-Parameterized” version of your Test Scripts, by simply checking off the checkbox “Disable Data-Driven Execution”.

If you choose to execute your Scenario Validation in a “Data-Driven” mode, then you have two options that control the test execution especially when your Test Scripts experience same/consistent errors for N consecutive data rows (N can be chosen by you) from your bound Data File. This feature will help you not have run-away tests in Worksoft SaaS that iterate through hundreds of data rows potentially in your Data File even though there is something wrong in your scripts or parameterization (attribute binding) or even worse your AUT (Application Under Test) has changed without you realizing it. It will also help you not use up your existing capacity (of testing units) you have within your Worksoft SaaS Subscription.
  • The first option (radio button) if chosen will abort ONLY Data Loop within which the N consecutive failures occurred but the test execution will move to the first test script outside and beyond the loop
  • The second option (radio button) if chosen will abort the entire test scenario
Once you bind the Data File(s), you can proceed to create/select the Testing Context(s) upon/using which you want your Data Driven tests to run, and proceed to schedule your test (validate) and while it executes watch how Worksoft SaaS 'magically' iterates through the data sets of your Data File.

For Run Definitions as well you have to Bind the Data Files and then schedule their execution on one or more Testing Contexts.

Feedback and Knowledge Base