Monday, April 11, 2011

CoolTuts - QTP - QTP Sample Questions

1. What does ChildObject Method Return
a. A Collection Object
b. A string true/false
c. A Boolean True/False
d. The Number of objects matching the child object descriptions
Ans: a

2. How can you make a test bypass the Object Repository during Test Run.
a. Turn the Object Repository Off
b. Use a programmatic Description
c. Delete all objects in all repositories
d. Add the Object in Object Repository Manager
Ans: b

3. When a test is run in Update mode, what options can you select? Select Three
a. the datatable
b. Check point properties
c. Test Object Description
d. Action Names in the test
e. Logical Names in the test
f. Active Screen Images and Values

4. What Object is used to read information from text file
a. Read
b. ReadLine
c. TextStream
d. FileStream
e. OpenTextFile

5. What can you use to handle unpredictable exceptions
a. A Do Loop
b. Recovery Scenario
c. If Then Else
d. Select Case Statemtn
Ans: b

6. You have just stopped recording steps into your tests. Your application under step is still up and visible on your screen. You now wish to add checkpoints into your test using the menu command, insert > Checkpoint from the toolbar. Which checkboxes are available to you? Select two
a. Text checkpoint
b. XML checkpoint
c. Bitmap checkpoint
d. TextArea checkpoint

7. Browser Navigation Timeout is in which tab of Test Settings
a. Properties
b. Resources
c. Web
d. Web Settings
Ans: c

8. How many tabs are present in Test Settings (File > Settings) window
a. 7
b. 6
c. 5
d. 8
Ans: a

9. Identify the Tabs in the Test Settings (File > Settings) Window
a. Properties, Run, Resources, Parameters, Environment, Web, Recovery
b. Properties, Run, Resources, Parameters, Environment, Web Settings, Recovery
c. Properties, Run, Options, Parameters, Environment, Web, Recovery
d. Properties, Run, Resources, Input Parameters, Environment, Web, Recovery
Ans: a

10.'Generate Script' is in which tab of Test Settings (File > Settings) window
a. Properties
b. Web
c. Resources
d. Recovery
Ans: a

11. The following are the main columns in the Keyword view
a. Item, Operation, Value, Comments
b. Item, Operation, Value, Documentation
c. Item, Operation, Property, Documentation
d. Number, Operation, Value, Documentation
Ans: b

12. For each object and method in an Expert view statement, a corresponding row exists in the Keyword view
a. True
b. False
c. There is a problem with the statement
d. None of the above
Ans: a

13. You can work with one or several function libraries at the same time
a. True
b. False
Ans: a

14. You can insert additional steps on the test objects captured in the Active Screen after the recording session
a. True
b. False
Ans: a

15. Active screen enables you to parameterize object values and insert checkpoints
a. True
b. False
Ans: a

16. A QTP user can increase or decrease the active screen information saved with the test.
a. True
b. False
Ans: a

17. The information pane provides a list of .... in the test.
a. Semantic error
b. Syntax error
c. Common errors
d. Logical errors
Ans: b

18. When we switch from Expert view to Keyword view, QTP automatically checks for syntax errors and shows them in the information pane.
a. True
b. False
Ans: a

19. If the information pane is not open, QTP automatically opens it incase a syntax error is detected
a. True
b. False
Ans: a

20. Is it possible to automate all the test cases?
Ans: No, it is not possible to automate all the test cases. We need to pick the test cases that can be automated.

21. Which QTP method can be used to get the value of an object property during runtime?
Ans: GetROProperty

22. Will SetTOProperty method make any change in the Object Repository?
Ans: No, it won’t make any change in the Object Repository. It will just affect the way QTP identifies the object during runtime.

23. How will you read the Test Object property using scripting?
Ans: We can use the “GetTOProperty” method.

24. What is the use of GetTOProperties method?
Ans: This method will be used for getting all the properties and their values of a Test Object.

25. How to use Object Spy if the required object is not visible (i-e window of the the object is not active)?
Ans: Maximize the window or bring it into the top active window while holding Ctl key after clicking the hand symbol button pointer in the Object Spy dialog box. Once the object is visible, release the Ctl key to use the object spy functionality.

26. How can we close the application process in task manager using QTP?
Ans:
1. CloseProcessByName:- Closes a process based on its name
SystemUtil.CloseProcessByName(applicationname)
2. CloseProcessById :- Closes a process according to its Process ID (PID)
3. CloseProcessByWndTitle :- Closes a task based on titile of the Window.

27. What will you do, If an object is not identified by the tool?
Ans: We use Virtual Object for identifying the object in the application.

1 comment:


  1. Nice Post. Testing is a process of executing a program in order to find any errors, missing requirement or gaps to the original requirements.
    Regards...
    Software Testing Training in Chennai | QTP Training in Chennai


    ReplyDelete