QTP Training Session6-Parameterisation

Embed Size (px)

Citation preview

  • 7/27/2019 QTP Training Session6-Parameterisation

    1/14

  • 7/27/2019 QTP Training Session6-Parameterisation

    2/14

  • 7/27/2019 QTP Training Session6-Parameterisation

    3/14

    3

    What is Parameterization

    When you test your application, you may want to check how it performs thesame operations with multiple sets of data. You can create a data-driven testwith a loop that runs n-times: each time the loop runs, it is driven by a

    different set of data. A parameter is a variable which replaces a recorded value in the script. At run time, Quick Test substitutes a value from a data source (Data Table)

    for the parameter. This is called parameterization.

  • 7/27/2019 QTP Training Session6-Parameterisation

    4/14

    4

    How to Parameterize

    Parameterization can be done by two methods:

    By clicking on the Parameterization icon

    By using Data Driver Wizard

  • 7/27/2019 QTP Training Session6-Parameterisation

    5/14

    5

    Global Sheets & Action Sheets

  • 7/27/2019 QTP Training Session6-Parameterisation

    6/14

    6

    Global Sheets & Action Sheets Contd.

    Global Sheet: Choosing Global sheet enables you to create a new column orselect an existing column in the Global sheet in the Data Table.You can usethe columns in the Global data sheet for Data Table output values or DataTable parameters in any action.

    Local Sheet: Each action also has its own sheet in the Data Table so that youcan insert data that applies only to that action.When you run your test,QuickTest inserts or outputs a value from or to the current row of the currentaction (local) data sheet during each action iteration.

  • 7/27/2019 QTP Training Session6-Parameterisation

    7/14

    7

    Parameterization - using Parameterization icon

    In the Keyword View, click in the Value column of the required step.

  • 7/27/2019 QTP Training Session6-Parameterisation

    8/14

  • 7/27/2019 QTP Training Session6-Parameterisation

    9/14

    9

    Parameterization - using Parameterization icon Contd..

    Click Ok button

    Following is the statement generated in the script after parameterizing theagent name

    Dialog("Login").WinEdit("Agent Name:").Set DataTable("p_Text",dtGlobalSheet)

  • 7/27/2019 QTP Training Session6-Parameterisation

    10/14

    10

    Parameterization - using Data Driver Wizard

    1. Display the action you want to parameterize.

    2. Choose Tools > Data Driver.

  • 7/27/2019 QTP Training Session6-Parameterisation

    11/14

    11

    Parameterization - using Data Driver Wizard Contd...

    3.Select the value you want to parameterize from the Constants list and clickParameterize. The Data Driver Wizard opens.

  • 7/27/2019 QTP Training Session6-Parameterisation

    12/14

    12

    Parameterization - using Data Driver Wizard Contd...

    4. Select the type of parameterization you want to perform: Step-by-stepparameterization or Parameterize all

    5. If you select Step-by-step parameterization, click Next. Parameterize the

    Selected Step screen opens.

    6. Click the Parameter Options button to set the parameterization options youwant to apply to this step. Click Finish.

  • 7/27/2019 QTP Training Session6-Parameterisation

    13/14

    13

    Parameterization - using Data Driver Wizard Contd...

  • 7/27/2019 QTP Training Session6-Parameterisation

    14/14

    14

    Parameterization - using Data Driver Wizard Contd...