Integrating ECATT & MERCURY QTP Part -4

Welcome to the fourth weblog of integrating QTP and ECATT which shows step by step procedure of creating the QTP scripts and later transforming to ECATT script. ECATT scripts are more powerful scripts as they are based upon object oriented methodology.But here we are concentrating on QTP and creating a parmeterize script. When we test our applications, we may want to check how the application performs the same operations with multiple sets of data. For example, suppose we want to check how our script responds to ten separate sets of data. We could record ten separate tests, each with its own set of data. Alternatively, We can create Data Table parameters so that our test runs ten times, each time using a different set of data.Thus we need to Parameterize our script. Step 1: Start QTP with SAP addin and click record button.Provide the server details as shown on which we need to record or create the script. Step 2: We are going to create a script for va03 i.e. a script which will be used for checking the existence of sales order.Enter tcode VA03. Step 3 : Press enter button after providing an existing sales order no.Also,click the button as usual or normally we do to check all the values. Step 4: Now just log off and come back to QTP screen .Press stop button. Here you can notice all the steps which are recorded as shown below. Step 5: Now as we have recorded for sales order no 246 so we have to expand all the steps here and just focus on the line where we have this value. Once we reached here double click on 246 value. Step 6: After clicking we get a pop up like this. Now just instead of constant click option Data table and give name for our parameter sorder_no. Check the global sheet and press enter. Step 7 : Notice the sorder no parameter is created on the bottom of screen under data table view. To provide more values in line 2 and 3 enter more values which we want to test say 123 and 567 etc as shown in the figure. Note: if it is off then goto menu and from drop down of view select DATA TABLE. Step 8:Now just click the run button or press F5.Provide the destination location for the log.The result log is shown below. For iteration 1 it is passed and 2 and 3 it didn’t because sales order no 123 and 567 doesn’t exist. This way we can check more no. of values.