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
What are the types of object repository in qtp?
what are the mandatory properties for a tex boxc (scenario?)
Explain how to use QTP to check broken links on a page?
explain keyword driven framework with banking domain?
Have you done batch testing in qtp? If yes how you are doing?
what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent
What is the file extension of the code file in qtp?
What is standalone database?
What is the difference between analog and low level recording?
What is RTM (require ment tracebulity marix) fromate?
How can I change object description or check point values in qtp?
Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?
How do you perform Regreession Testing?
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
How many types of Automation frameworks are there in UFT? Describe them.