All faqs about qtp,testing,automation which are a must for testing professional
Following are some important questions:-
Q.1.How can we associate a function libraries with a test?
Ans-In the test settings Dialog box go to the resources tab and click on the add button.Quick test displays a browse button enabling you to browse to a function library in the file system ,after adding the function library click apply button and then ok.
Q2.What is Quick test application object?
Ans-Quick test application object simply provides an object from which we can access all other objects, methods and properties of the quick test automation object model.
Q3.What is automation?
Ans-Automation is a Microsoft technology that makes it possible to access software objects inside one application from other applications. These objects can be easily created and manipulated using a scripting or programming language such as VBScript or VC++. Automation enables you to control the functionality of an application programmatically.
Q4.What are the different type of trigger event type that will trigger the recovery operation?
a) Object State
b) Test Run Error
c) Application Crash
Q5.What is the difference between GetROProperty and GetTOProperty?
Returns the current value of the test object property from the object in the application.
object.GetROProperty (Property, [PropertyData])
Returns the value of the specified property from the test object Description.
Q6.How to copy file from one location to another?
Ans- Dim FileSys
FileSys.CopyFile “C:\Documents and Settings\Guest\My
Documents\accounts\accounts.xls”,”C:\Documents and Settings\Guest\My
Q7.How to use the Create text file method to create and open a text file?
Ans- Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.
MyFile.WriteLine("This is a test.")
Q8.When to use descriptive programming?
a)When the objects in the application are dynamic in nature and need special handling to identify them at run time.
b)When the Object repository is getting large and it decreases the performance of QTP.
c)When modification to an object repository is required but the OR is either read only or it is located in a shared OR.
d)When we want to take action on a large number of similar or uniform objects.
Q9.Why breakpoints are inserted into the script?
Ans-To cause the execution to switch from normal mode to debug mode.
Q10.What is recover scenarios?
Ans-QTP recovery scenarios provides a method for scripts to recover from different types of runtime error conditions.This is required for unattended test case execution.