Skip to content

Parameterizing a Test Script with a 'Data Definition' for enabling data-driven testing

Quick Links:

Click on the links below to jump to the relevant section of interest to you:

Significance of assigning a 'data definition' to a test script:

For you to understand the significance of assigning a data definition to a test script, you must first read about the extensive support Worksoft SaaS offers for 'data-driven testing'. 

The 'data-driven testing' feature in Worksoft SaaS offers you a very powerful but easy way to “increase” and/or “dynamically change” your test coverage by using a smaller number of automation assets (test scripts, test scenarios and test run definitions). To read more about this powerful feature, click here.

Worksoft SaaS offers to its customers a variety of simple-to-use but very powerful instruments to help you structure and maintain the “data” that you want to use to drive “test coverage” within your automated test executions (of both test scenario validations and the test run definition executions), separate from the test script logic.  One of the most important instruments is the 'Data Definition'. Data definitions will help you 'define' the “structure” of your “data” that you want to feed into your automated test executions dynamically at run time.

Assigning a 'data definition' to  a test script on the edit test script screen:  

One of the steps in the process to convert your tests into data-driven tests is the assignment of a data definition to the test script(s) that you want to run in a data-driven fashion. To get familiarized with the complete process, click here.

To assign a data definition to the test script, you have to have the test script in 'edit' mode. To assign a 'data definition' for the test script, just click on the clip icon with a superscript 'A' that appears within the top right hand side controls above the test script name, and a drop-down of data definitions shows up. Choose the right data definition and once done 'save' your changes on the main screen.
                                                         

Viewing the 'data definition binding' of a test script on the edit/view test script screen:    

To view the data definition that a test script is assigned to, if any, just mouse over on the clip icon with a superscript 'A' that appears within the top right hand side controls above the test script name.

                                                                                                                                                     
The tooltip on mouse over provides you visibility into the name of the data definition (along with its status).

Please note that the color of clip icon and the color of the superscript A provides a visual cue to you on whether or not any data definition is assigned to the data-definition and whether or not any test instructions in the test script have parameterized their 'targets' or 'values' using 'attributes' from that data definition.
  • If the clip icon and the superscript A is grey, then no data definition is currently assigned to the test script.
  • If the clip icon is blue and the superscript A is black, then a data definition is currently assigned and at least one of the test instructions in the test script have parameterized their 'targets' or 'values' using the 'attributes' of the data definition that the test script is assigned to
  • If the clip icon is blue and the superscript A is red, then a data definition is currently assigned but none of the test instructions in the test script have parameterized their 'targets' or 'values' using the 'attributes' of the data definition that the test script is assigned to  

Editing the 'data definition' assignment of a test script on the edit test script screen:  

To change the data definition assignment for a test script, you have to have that test script in 'edit' mode. To change the data definition assignment of the test script, just click on the clip icon with a superscript 'A' that appears within the top right hand side controls above the test script name, and a drop-down of a drop-down of data definitions shows up. Choose the right data definition and once done 'save' your changes on the main screen.

To change the data definition directly click on the clip icon with the superscript 'A'.

                                                                    

           

Viewing the 'data definition binding' of a test script on the test scripts' home screen:  

You can view the data definition that a test script is assigned to or parameterized with on the test scripts' home screen, within the 'My Favorites' view and the 'Script Library' view.

Just click on the clip icon with a superscript 'A' on the bottom right hand side within the cells of the 'Test Script' column, and the tooltip shows you the name of the data definition, if any, that the script is assigned to or parameterized with.


If you want to drill down to see the specific data definition on the data definition home screen, just click on the clip icon with a superscript 'A'.

Searching for (finding) a test scripts that are parameterized with a 'data definition' :


The Test Scripts home screen allows you to search for or filter the test scripts listed within the 'My Favorites' view or the 'Script Library' view based on the 'data definition' assigned to the test script. To learn more, click here

Feedback and Knowledge Base