did you perform retesting(DATA DRIVEN test) using functions
with out using datatable methods

how can you perform retesting using functions

Answer Posted / amarendra kothuru

Generally, QTP exports uses Excel file for data
paramaterization.
Method 1)Prepare test data in Excel sheet and import into
QTP data table. Using DataTable methods, user can easily
parameterize data and access them through out the script.
DaTaTable Methods: Import, ImportSheet, Export,
ExportSheet, GetSheet, SetCurrentRow, SetNextRow etc...

E.g:
DataTable.Import "Excel file path"
testData = DataTable(columnName, Sheetname)
(or)
testData = DataTable(columnName, dtGlobalSheet)


Method 2)Prepare test data in Excel sheet. Instead of
importing Excel file/sheet into Test script, create an
Excel object in the script using CreateObject method. Using
Excel object methods user can able access data from excel
sheet.

E.g:
Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.WorkBooks.Open "Excel file path", false, false
Set currentWorkSheet = ExcelObj.ActiveWorkBook.WorkSheets
(1) 'first sheet
testData = currentWorkSheet.Cells(rownumber,
columnnumber).Value
ExcelObj.Application.Quit

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to capture dynamic values in load runner and how Each of the captured values are to be written to a text file (c:\temp\LoadRunner1.txt)

1727


What is synchronization? What are the ways you can synchronize?

641


what is key word driven frame work ? why it is called like that ? what is the diference between keyword driven and data driven frame work ?

1541


Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John

2160


What are test settings and global settings?

575






How QTP support all types of applications (platforms)?

4071


What is qtpro?

584


describe some problems that u had with automating testing tool?

1403


How to use actions in qtp ?

582


Can launch two instances of qtp on the same machine?

573


What is the difference between run time object and test object in QTP?

560


Explain the terms test and business component?

542


How to execute a winrunner script in quicktest professional?

550


How can I import environment from a file on disk?

531


what are all the fileds present in object repository?

1551