Active TopicsActive Topics  Display List of Forum MembersMemberlist  CalendarCalendar  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin


 One Stop Testing ForumTypes Of Software Testing @ OneStopTestingWeb Testing @ OneStopTesting

Message Icon Topic: Converting Your Test to a Data-Driven Test

Post Reply Post New Topic
Author Message
tanushree
Senior Member
Senior Member
Avatar

Joined: 04Apr2007
Online Status: Offline
Posts: 2160
Quote tanushree Replybullet 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 IP Logged
Post Reply Post New Topic
Printable version Printable version

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



This page was generated in 0.234 seconds.
Vyom is an ISO 9001:2000 Certified Organization

© Vyom Technosoft Pvt. Ltd. All Rights Reserved.

Privacy Policy | Terms and Conditions
Job Interview Questions | Placement Papers | Free SMS | Freshers Jobs | MBA Forum | Learn SAP | Web Hosting