Active Topics Memberlist Calendar Search Help | |
Register Login |
One Stop Testing Forum : Types Of Software Testing @ OneStopTesting : Web Testing @ OneStopTesting |
Topic: Converting Your Test to a Data-Driven Test |
|
Author | Message |
tanushree
Senior Member Joined: 04Apr2007 Online Status: Offline Posts: 2160 |
Topic: Converting Your Test to a Data-Driven Test Posted: 31Oct2007 at 3:09am |
Converting Your Test to a Data-Driven Test
Start by opening the test you created in Lesson 7 and using the DataDriver Wizard to parameterize the test. 1 Create a new test from the lesson7 test. If WinRunner is not already open, choose Programs > WinRunner > WinRunner on the Start menu. If the Welcome window is open, click the Open Test button. Otherwise, choose File > Open and select the test you created in Lesson 7. The lesson7 test opens. Choose File > Save As and save the test as lesson8 in a convenient location on your hard drive. 2 Run the DataDriver Wizard. Choose Tools > DataDriver Wizard. The DataDriver Wizard welcome window opens. Click Next to begin the parameterization process. 3 Create a data table for the test. In the Use a new or existing Excel table box, type "lesson8". The DataDriver Wizard creates an Excel table with this name and saves it the test folder. 4 Assign a table variable name. Accept the default table variable name, "table". At the beginning of a data-driven test, the Excel data table you wish to use 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. 5 Select global parameterization options. Select Add statements to create a data-driven test. This adds TSL statements to the test that define the table variable name, open and close the data table, and run the appropriate script selection in a loop for each row in the data table. Select Parameterize the test and choose the Line by line option. When you select Parameterize the test, you instruct WinRunner to find fixed values in recorded statements and selected checkpoints and to replace them with parameters. The Line by line option instructs the wizard to open a screen for each line of the selected test that can be parameterized so that you can choose whether or not to parameterize that line. Click Next. 6 Select the data to parameterize. The first line-by-line screen opens. It refers to the Order Number radio button. In this test you are going to open a different fax order in each iteration and the Order Number radio button must be selected each time. Thus, for this script line, keep the selection, Do not replace this data, and click Next. The next line by line screen refers to the Order Number edit field. This is the field you want to change for each iteration. Note that the value, "4" is highlighted and listed in the Argument to be replaced box to indicate that this is the value selected for parameterization. Select A new column under "Replace the selected value with data from:" and type: Order_Num in the adjacent edit field. The New Column option creates a column titled "Order_Num" in the lesson8.xls table, and enters the value "4" in the first row of the column. Click Next and then click Finish. Your test is parameterized. Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
IP Logged | |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.