How to use data driver wizard?

How to use data driver wizard?

We can use the DataDriver Wizard to convert our entire script or a part of our script into a data-driven test. 

For example : Our test script may include recorded operations, checkpoints, and other statements that do not need to be repeated for multiple sets of data. We need to parameterize only the portion of our test script that we want to run in a loop with multiple sets of data.


>>>>> To create a data-driven test :


    > If we want to turn only part of our test script into a data-driven test, first select those lines in the test script.

    > Choose Tools - DataDriver Wizard.

    > If we want to turn only part of the test into a data-driven test, click Cancel. Select those lines in the test script and reopen the DataDriver Wizard. If we want to turn the entire test into a data-driven test, click Next.

    > The Use a new or existing Excel table box displays the name of the Excel file that WinRunner creates, which stores the data for the data-driven test. Accept the default data table for this test, enter a different name for the data table, or use.

    > The browse button to locate the path of an existing data table. By default, the data table is stored in the test folder.

    > In the Assign a name to the variable box, enter a variable name with which to refer to the data table, or accept the default name, table.

    > At the beginning of a data-driven test, the Excel data table you selected is assigned as the value of the table variable. Throughout the script, only the table variable name is used. This makes it easy for you to assign a different data table .

    > To the script at a later time without making changes throughout the script.

    > Choose from among the following options:

       A. Add statements to create a data-driven test : Automatically adds statements to run your test in a loop : sets a variable name by which to refer to the data table ; adds braces ({and}), a for statement, and a ddt_get_row_count statement to our test script selection to run it in a loop while it reads from the data table ; Adds ddt_open and ddt_close statements.

         B. To Our test script to open and close the data table, Which are necessary in order to iterate rows in the table. Note that we can also add these statements to our test script manually.

         C. If we do not choose this option, we will receive a warning that our data-driven test must contain a loop and statements to open and close our datatable.

         D. Import data from a database : Imports data from a database. This option adds ddt_update_from_db, And ddt_save statements to our test script after the ddt_open statement.

         E. Note that in order to import data from a database, either Microsoft Query or Data Junction must be installed on our machine.  We can install Microsoft Query from the custom installation of Microsoft Office. Note that Data Junction is not automatically included in our WinRunner package. To purchase Data Junction, contact our Mercury Interactive representative. For detailed information on working with Data Junction, refer to the documentation in the Data Junction package.

         F. Parameterize the test : Replaces fixed values in selected checkpoints and in recorded statements with parameters, using the ddt_val function, and in the data table, adds columns with variable values for the parameters. > Line by line : Opens a wizard screen for each line of the selected test script, which enables we to decide whether to parameterize a particular line, and if so, whether to add a new column to the data table or use an existing column when parameterizing data.

         G. Automatically : Replaces all data with ddt_val statements and adds new columns to the data table. The first argument of the function is the name of the column in the data table. The replaced data is inserted into the table. 

    > The Test script line to parameterize box displays the line of the test script to parameterize. The highlighted value can be replaced by a parameter. The Argument to be replaced box displays the argument (value) that we can replace with a parameter. We can use the arrows to select a different argument to replace.

           Choose whether and how to replace the selected data :

         * Do not replace this data : Does not parameterize this data.

         * An existing column: If parameters already exist in the data table for this test, select an existing parameter from the list.

         * A new column : Creates a new column for this parameter in the data table for this test. Adds the selected data to this column of the data table. The default name for the new parameter is the logical name of the object in the selected. TSL statement above. Accept this name or assign a new name. 

    > The final screen of the wizard opens.

         A. If we want the data table to open after we close the wizard, select Show data table now.

         B. To perform the tasks specified in previous screens and close the wizard, click Finish.

         C. To close the wizard without making any changes to the test script, click Cancel. 


By:UMANG
Date:2031-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related TESTING Subjective Links

TESTING Subjective interview questions and answers for experienced and fresher