32.How to call an action to another action?
An action can be called in two ways −
Call to COPY of an Action: While copping the action (reusable and non-reusable actions), the action also copies checkpoints, parameterization, and the corresponding action tab in the Data Table of the calling test. In the Data Table of the calling test, you can do the modification to the copied action that modification would not give any affect to the other tests.
Call to an EXISTING Action: Here, You can make a call only to the “Reusable” actions. In the calling test, calls to an existing action will be in read-only mode. They can only be modified in the test in which they were created. It is easily manageable and can be used the same action in several test.
33.What is Test Fusion Report?
Test Fusion Report presents all features of a test application that comes in use while running the test. Test Fusion Report presents it-self as an organized tabular format. Also, it gives details of each and every step of the iterations, run-time data table and movie of the test run if selected.
34.What is a Run-Time Data Table, where to find and view this table in QTP?
The Run-time data table stores values, like; parameterized output, checkpoint values, output values, etc. It presents it-self with “xls” file extension and store it-self in the Test Results Folder. User can also access it from the Test Fusion Report.
35.What is the difference between check point and output value?
Check point is a verification point that generates a PASS or FAIL status by comparing a specified property the current value and the expected value.
An output value is a value recorded while running a test and can be stored in a particular location like; either in a Datatable or in a variable. Unlike Checkpoints, it doesn’t compare two values to generate PASS/FAIL status.
36.How can you handle exceptions in QTP?
In QTP, exceptions can be handled by using “recovery scenarios” and “On Error” statements.
To handle the exception in recovery scenario, you have to define three things −
Post Recovery Test-Run
To handle the exception by “On Error” statements – In the script, you have to use the “On Error Resume Next” and “On Error Go to 0” statement.
37.What is the difference between functions and actions in QTP?
In QTP, Actions are written VB scripting language which doesn’t return any values. Functions are written VB scripting language which returns single value.
Every Action contains its own Object Repository, Data table, Active screen, etc where as function does not.
Function can be called in action, but action can’t be called in function.
In QTP, functions are saved with “.vbs” extention where as actions are saved with “.mts” extension.
Action is internal to QTP whereas Function is just lines of code with some/none parameters and a single return value.
Actions are sometime reusable but sometime not whereas functions are always reusable.
38.In QTP, how to declare a variable?
Use DIM keyword before a variable name to declare a variable and use SET keyword before a variable name to assign value to the variable
“Dim weight”, here DIM keyword is used to declare weight variable.
Set weight = 40, here SET keyword is used to assign value “40” to the weight variable.
39.What is GetRoProperty?
GetRoProperty is a standard method of QTP that fetches property values of a run -time object.
40.What is smart Identification?
Sometimes, QTP is incapable in finding an object that matches to the corresponding object description. Or, sometime, QTP finds more than one objects match to the object description. So, to resolve this issue, QTP ignores the object descriptions and concentrates on the Smart Identification mechanism to identify the objects.
QTP’s Smart Identification mechanism uses two types of properties to identify the objects − Base Filter Property & Optional Filter Property.
Base Filter Property – A property of a specific test object class whose values changes when the real meaning of the original object changes.
Optional Filter Properties – It also helps in identifying the objects of a particular class whose properties change often, but if they are no longer applicable, you can ignore it.