Monday, April 19, 2010

QTP Interview Questions and Answers - 6

21. What the differences are and best practical application of each.

Per Action Repository: For Each Action, one Object Repository is created.
Shared Repository: One Object Repository is used by entire application

22. Explain what the difference between Shared Repository and Per_Action Repository

Shared Repository: Entire application uses one Object Repository , that similar to Global GUI Map file in WinRunner
Per Action Repository: For each Action ,one Object Repository is created, like GUI map file per test in WinRunner

23. Have you ever written a compiled module? If yes tell me about some of the functions that you wrote.

I Used the functions for Capturing the dynamic data during runtime. Function used for Capturing Desktop, browser and pages.





24. What projects have you used WinRunner on? Tell me about some of the challenges that arose and how you handled them.

pbs :WR fails to identify the object in gui. If there is a non std window obk wr cannot recognize it ,we use GUI SPY for that to handle such situation.

25. Can you do more than just capture and playback?

I have done Dynamically capturing the objects during runtime in which no recording, no playback and no use of repository is done AT ALL.
-It was done by the windows scripting using the DOM(Document Object Model) of the windows.

27. 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.

28. What is the difference between check point and output value in QTP.

It is as follows:-
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]

29. IF we use batch testing in QTP, the result shown for last action only. In that how can i get result for every action.

u can click on the icon in the tree view to view the result of every action

30. 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 .......

31. 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.

32. How do you data drive an external spreadsheet?

u can use the foll. statements in QTP:
DataTable.ImportSheet "..\..\TestData\Input.xls",1,dtGlobalSheet
DataTable.ExportSheet "..\..\Results\Output.xls","Global"

for importing a file:

DataTable.Import "filename.txt"

(you have to write the path name also for eg:
DataTable.Import "C:\Documents and
Settings\mercury\Desktop\fly.txt")

for Exporting a file:

Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")

Set MyFile = fso.CreateTextFile("fileName.txt",True)

(Eg:Set MyFile = fso.CreateTextFile("C:\Documents and Settings\mercury\Desktop\flight.txt",True)

MyFile.WriteLine("Fly_From"&" "&"Fly_To"&" "&"Order_No"&" "&" Flight" )


C1=DataTable.Value(1,1)&" "
C2=DataTable.Value(2,1)&" "
C3=DataTable.Value(3,1)&" "
c4=DataTable.Value(4,1)
B=C1&C2&C3&c4
MyFile.WriteLine(B)

This is just an example
Note: To get the contents in diff column in Excel sheet give tab.

33. I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run command as well How do I do this?

U can still make the notepad open without using the record or System utility script, just by mentioning the path of the notepad "( i.e., where the notepad.exe is stored in the system) in the "Windows Applications Tab" of the "Record and Run Settings window. Try it out. All the Best.

By Jigar Gosai
Email: jigar.gosai@gmail.com


Cloud Testing
Cloud Testing

ISTQB Certification
ISTQB Sample Paper - 3
ISTQB Sample Paper - 2
ISTQB Sample Paper - 1

QC Certification
QTPCertification Sample Paper (HP0-M15) Dumps


QTP Certification
QTP Certification Sample Paper (HP0-M16) Dumps

QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 1
QTP Interview Questions and Answers - 2
QTP Interview Questions and Answers - 3
QTP Interview Questions and Answers - 4
QTP Interview Questions and
Answers - 5

QTP Interview Questions and Answers - 6

By Jigar Gosai
Email: jigar.gosai@gmail.com

1 comment: