What is a Run-Time Data Table? Where can I find and view this table?
-In QTP, there is data table used , which is used at runtime.-In QTP, select the option View->Data tabke.-This is basically an excel file, which is stored in the folder of the test created, its name is Default.xls by default.
How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the difference between them? how to handle script issues?
Yes, there's an in-built functionality called "Step Generator" in Insert->Step->Step Generator -F7, which will generate the scripts as u enter the appropriate steps.
What is the difference between check point and output value.
An outPut value is a value captured during the test run and entered in the run-time but to a specified location. EX:-Location in Data Table[Global sheet / local sheet]
Types of properties that Quick Test learns while recording?
(a) Mandatory (b) Assistive . In addition to recording the mandatory and assistive properties specified in the Object Identification dialog box, QuickTest can also record a backup ordinal identifier for each test object. The ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description (objects that have the same values for all properties specified in the mandatory and assistive property lists). This ordered value enables QuickTest to create a unique description when the mandatory and assistive properties are not sufficient to do so.
Differences between QTP & Winrunner?
(a) QTP is object bases Scripting ( VBS) where Winrunner is TSL (C based) Scripting.(b) QTP supports ".NET" application Automation not available in Winrunner(c) QTP has "Active Screen" support which captures the application, not available in WR.(d) QTP has "Data Table" to store script values , variables which WR does not have.(e) Using a “point and click” capability you can easily interface with objects, their definitions and create checkpoints after having recorded a script – without having to navigate back to that location in your application like you have to with WinRunner. This greatly speeds up script development.
Few basic questions on commonly used Excel VBA functions.
common functions are:Coloring the cellAuto fit cellsetting navigation from link in one cell to other saving
How does Parameterization and Data-Driving relate to each other in QTP?
To datadrive we have to parameterize.i.e. we have to make the constant value as parameter, so that in each iteraration(cycle) it takes a value that is supplied in run-time datatable. Through parameterization only we can drive a transaction(action) with different sets of data. You know running the script with the same set of data several times is not suggestable, & it's also of no use.
What is the difference between Call to Action and Copy Action.?
Call to Action : The changes made in Call to Action , will be reflected in the orginal action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script(Action)
How to verify the Cursor focus of a certain field?
Use "focus" property of "GetRoProperty" method"
If you have any quarries/feed back catch me on - knowthetesting@gmail.com
Thank you
Ram
Showing posts with label Runtime Data table. Show all posts
Showing posts with label Runtime Data table. Show all posts
Sunday, April 11, 2010
Interview Questions Part 6
How to Import data from a ".xls" file to Data table during Runtime.
Datatable.Import "...XLS file name..."DataTable.ImportSheet(FileName, SheetSource, SheetDest) DataTable.ImportSheet "C:\name.xls" ,1 ,"name"
How to export data present in Datatable to an ".xls" file?
DataTable.Export "....xls file name..."
Syntact for how to call one script from another? and Syntax to call one "Action" in another?
RunAction ActionName, [IterationMode , IterationRange , Parameters]Here the actions becomes reusable on making this call to any Action.IterationRange String Not always required. Indicates the rows for which action iterations will be performed. Valid only when the IterationMode is rngIterations. Enter the row range (i.e. "1-7"), or enter rngAll to run iterations on all rows.If the action called by the RunAction statement includes an ExitAction statement, the RunAction statement can return the value of the ExitAction's RetVal argument.
How to export QTP results to an ".xls" file?
By default it creates an "XML" file and displays the results
How the exception handling can be done using QTP
It can be done Using the Recovery Scenario Manager which provides a wizard that gudies you through the process of defining a recovery scenario. FYI.. The wizard could be accesed in QTP> Tools-> Recovery Scenario Manager.
How many types of Actions are there in QTP?
There are three kinds of actions:non-reusable action—an action that can be called only in the test with which it is stored, and can be called only once. reusable action—an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.external action—a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.
Analyzing the Checpoint results
Standard Checpoint :By adding standard checkpoints to your tests or components, you can compare the expected values of object properties to the object's current values during a run session. If the results do not match, the checkpoint fails.
How to handle Run-time errors?
On Error Resume Next : causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure.Using "Err" object msgbox "Error no: " & " " & Err.Number & " " & Err.description & " " & Err.Source & Err.HelpContext
What are the different scripting languages you could use when working with QTP ?
Visual Basic (VB),XML,JavaScript,Java,HTML
How to handle dynamic objects in QTP?
QTP has a unique feature called Smart Object Identification/recognition. QTP generally identifies an object by matching its test object and run time object properties. QTP may fail to recognise the dynamic objects whose properties change during run time. Hence it has an option of enabling Smart Identification, wherein it can identify the objects even if their properties changes during run time. Check this out-If QuickTest is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then QuickTest ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object. While the Smart Identification mechanism is more complex, it is more flexible, and thus, if configured logically, a Smart Identification definition can probably help QuickTest identify an object, if it is present, even when the recorded description fails.The Smart Identification mechanism uses two types of properties:Base filter properties—The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link's tag was changed from to any other value, you could no longer call it the same object. Optional filter properties—Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.
Explain the keyword createobject with an example.
Creates and returns a reference to an Automation objectsyntax: CreateObject(servername.typename [, location])Argumentsservername:Required. The name of the application providing the object.typename : Required. The type or class of the object to create.location : Optional. The name of the network server where the object is to be created.
If you have any quarries/feed back send me mail on - knowthetesting@gmail.com
Thank you
Ram
Datatable.Import "...XLS file name..."DataTable.ImportSheet(FileName, SheetSource, SheetDest) DataTable.ImportSheet "C:\name.xls" ,1 ,"name"
How to export data present in Datatable to an ".xls" file?
DataTable.Export "....xls file name..."
Syntact for how to call one script from another? and Syntax to call one "Action" in another?
RunAction ActionName, [IterationMode , IterationRange , Parameters]Here the actions becomes reusable on making this call to any Action.IterationRange String Not always required. Indicates the rows for which action iterations will be performed. Valid only when the IterationMode is rngIterations. Enter the row range (i.e. "1-7"), or enter rngAll to run iterations on all rows.If the action called by the RunAction statement includes an ExitAction statement, the RunAction statement can return the value of the ExitAction's RetVal argument.
How to export QTP results to an ".xls" file?
By default it creates an "XML" file and displays the results
How the exception handling can be done using QTP
It can be done Using the Recovery Scenario Manager which provides a wizard that gudies you through the process of defining a recovery scenario. FYI.. The wizard could be accesed in QTP> Tools-> Recovery Scenario Manager.
How many types of Actions are there in QTP?
There are three kinds of actions:non-reusable action—an action that can be called only in the test with which it is stored, and can be called only once. reusable action—an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.external action—a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.
Analyzing the Checpoint results
Standard Checpoint :By adding standard checkpoints to your tests or components, you can compare the expected values of object properties to the object's current values during a run session. If the results do not match, the checkpoint fails.
How to handle Run-time errors?
On Error Resume Next : causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure.Using "Err" object msgbox "Error no: " & " " & Err.Number & " " & Err.description & " " & Err.Source & Err.HelpContext
What are the different scripting languages you could use when working with QTP ?
Visual Basic (VB),XML,JavaScript,Java,HTML
How to handle dynamic objects in QTP?
QTP has a unique feature called Smart Object Identification/recognition. QTP generally identifies an object by matching its test object and run time object properties. QTP may fail to recognise the dynamic objects whose properties change during run time. Hence it has an option of enabling Smart Identification, wherein it can identify the objects even if their properties changes during run time. Check this out-If QuickTest is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then QuickTest ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object. While the Smart Identification mechanism is more complex, it is more flexible, and thus, if configured logically, a Smart Identification definition can probably help QuickTest identify an object, if it is present, even when the recorded description fails.The Smart Identification mechanism uses two types of properties:Base filter properties—The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link's tag was changed from to any other value, you could no longer call it the same object. Optional filter properties—Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.
Explain the keyword createobject with an example.
Creates and returns a reference to an Automation objectsyntax: CreateObject(servername.typename [, location])Argumentsservername:Required. The name of the application providing the object.typename : Required. The type or class of the object to create.location : Optional. The name of the network server where the object is to be created.
If you have any quarries/feed back send me mail on - knowthetesting@gmail.com
Thank you
Ram
Subscribe to:
Posts (Atom)