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

What are the types of object repository in qtp?

569


what are the mandatory properties for a tex boxc (scenario?)

1531


Explain how to use QTP to check broken links on a page?

589


explain keyword driven framework with banking domain?

1565


Have you done batch testing in qtp? If yes how you are doing?

509






what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent

1341


What is the file extension of the code file in qtp?

563


What is standalone database?

1751


What is the difference between analog and low level recording?

626


What is RTM (require ment tracebulity marix) fromate?

1534


How can I change object description or check point values in qtp?

559


Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?

1362


How do you perform Regreession Testing?

1465


Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know

1409


How many types of Automation frameworks are there in UFT? Describe them.

562