SlideShare uma empresa Scribd logo
1 de 33
For more QTP Scripts, visit www.ramupalanki.com


                         QTP FAQS
 1. What are the Features & Benefits of Quick Test pro (QTP)..?
 Operates stand-alone, or integrated into Mercury Business process Testing and
 Mercury Quality C enter. Introduces next-generation “Zero-configuration”
 Keyboard Driven testing technologies in Quick Test Professional 8.0 – allowing for
 fast test creation, easier.

 2. Differences between QTP 6.5 and 8.2 what are extra features in 8.2?
 Multimedia Add-in is available in QTP 6.5. Multimedia Add-in is not available in
 QTP 8.2. Parameterization is the extra Features in QTP 8.2. compared to QTP 6.5.

 3. How to handle the exceptions using recovery scenario manager in
 QTP?
 There are 4 trigger events during which a recovery scenario should be activated.
 They are A pop up window appears in an opened application during the test run.
 A property of an object changes its state or value.

 4.What is the use if Text output value in QTP?
 Output values enable to view the values that the application takes during run
 time. When parameterized, the values change for each iteration. Thus by creating
 output values, we van capture the values an object in runtime.

 5. How to use the object spy in QTP 8.0?
 To view the Run time objects and Test objects properties and       Methods of an
 object.


 6. What is the extension of the object repository files in QTP?
 Two types of Object repository there are shared repository (extension .tsr) and
 Action repository(extension .mtr)


 7. Explain the concept of object repository & how to QTP recognizes
 objects?
 With QTP 8.2, there available QTP plus, setup. It provides Repositories Merge
 Utility. The Object Repository Merge Utility enables user to merge Object
 repository files into a single Object repository file. To recognizes a object using
 properties.


 8. What are the properties you would use for identifying a browse &
 page when using descriptive programming?


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 For Browser we will have to user title, html id property to identify the browser
 and web page.


 9. What are the scripting language you could use when working with
 QTP?
 QTP supports vb scripts scripting language.


 10. Give me an example where you have used a COM interface In your
 QTP project?
 Com interface appears In the scenerio of front end and backend foreign in you
 are using oracle as back end and front end as VB or any language then for better
 compatibility we will go for an interface of which COM will be one amoung those
 interfaces.


 11. Few basic questions on commonly used Excel VBA functions.
 Common functions are: Creatinf a sheets and assigning values to sheets and
 coloring the cell Auto fit cell setting navigation from link in one cell to other
 saving.


 12. Explain the keyboard create object with an example.
 Create object: Creates and returns a reference to an Dynamic object. Example:
 Ser Excel sheet = Create Object(“Excel.Sheet”)


 13. Explain in brief about the QTP Automation Object Model.
 To pre-configure test settings before executing the QTP test.




 14. How to handle Dynamic Object in QTP?
 User GETRO property we will handle the runtime objects.


 15. Where can I find the Run-time data table?
 In the result window shows a run time data table. It includes the table-shaped
 icon that display the run-time Data Table – a table that shows the values used to



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 run a test containing Data Table parameters or the Data Table output values
 retrieved from a test while application execution time.




 16. How to do Data-Driving in QTP?
 By parameterizing the test script.


 17. What are the differences between call to Action and Copy Action?
 When you inset a call to action, they are ready only in the calling test. It can be
 modified in the original test. Where as come to copy action, you can make
 changes to the copied action, your changes will not effect the original action
 where it created.


 18. Discuss QTP Environment.
 QuickTestProficinal environment using the graphical interface and Action Screen
 technologies – A testing process for creating test scripts, relating manual test
 requirements to automated verification features – Data driving to use several
 sets of data using.


 19. Explain the concept of how QTP identifies object.
 During tecording QTP looks at the objects and stories it as test objects. For each
 object QT earns a set of default properties called mandatory properties, and look
 at the rest of the objects to check whether this properties are enough to uniquely
 identify.


 20. Differentiate the two Object Repository Types of QTP.
 In QTP there are 2 object repositories, they are 1.Shared Object Repository 2.
 Per Action Mode, by default it’s per action mode. We want to maintain the Object
 Repository per each action separately. Select a per action mode.


 21. What are the differences are and best practical application of each.
 Per action: For Each Action, one Object Repository is created. Shared: One
 Object Repository is used by entire application.



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 22. Explain what the differences between Shared Repository and
 Per_Action
 Repository.
 In shared repository, one object is used in more than one action and in per action
 repository, everytime in every, objects are stored differently and are not shared.
 23. Have you ever written a complied 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.
 WR fails to identify the objects 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?
 Yes you can do more than       capture/playback. Descriptive programming is the
 answer to this question. We can write scripts without recording and it would still
 work fine.
 26. How long have you used the product?
 Depending up on the Licence.
 27. How to do the scripting. Is there any inbuilt function in QTP?
 Yes, there’s an in-built functionality called “step Generator” in Insert>Step>step
 Generator – F7, which will generate the scripts as you enter the appropriate
 steps.
 28. What are the differences between check point output value.
 An output value is a value retrieved during the run session and entered into
 runtime table or data table subsequently it can be used as input value in your
 test.
 29. If we use batch testing. The result shown for last action only. In that
 how can I get result for every action?
 Click in the Expend icon in the tree view to view the result of every action.
 30. How the exception handling can be done using QTP?



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 Recovery scenerio manager provides a wizard that guides you though the
 defining recovery scenerio. Recovery scenerio has three steps 1. Triggered
 Events 2. Recovery steps 3. Post Recovery Test-Run.
 31. How do you test siebel application using QTP?
 In SWE section you need to add Automation Enable = True and at the same time
 you need to use SWE Cmd = Auto On in the URL.


 32. How many types of Actions are there in QTP?
 QTP supports three types of Actions. 1). Non Reusable actions 2). Re-usable
 Actions 3). External actions.
 33. How do you data drive an external spreadsheet?
 Import from External Spreadsheet File by selecting Import then From File. Which
 imports a tabbed text file or a single sheet from an existing Microsoft Excel file
 into the table? The sheet you Import replace all data in the currently selected.


 34. I want to open a Notepad window without recording a test and I do
 not want to use System Util. Run command as well how do I do this?
 Another alternative to open a notepad is to use Shell Object. Check out with the
 following example: Dim a
 Set a = Wscript.CreateObject(“Wscript.shell”)
 a.run “notepad.exe”.
 35. how many types of recording modes in QTP? Describe each type with
 an example where we use them?
 3 types of recording modes in QTP.1.normal 2.analog mode 3. low level recording
 mode.
 36. How can we do the Frame work in QTP?
 Depending upon the project and client requirements.
 37. Testing>QTP which features of QTP would you like to improve? How
 would you go about implementing it?
 We are not implementing any concept in QTP.
 38. explain as to how would you design the driver code for a keyboard
 based test script.
 Test script prepare in QTP. Key words prepare in a Excel sheet and objects
 description prepare in notepad.

www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 39. The file extension of Shared object repository.
 The Share object repository is .tsr extension.
 40. How to handle java tree in QTP?
 First of all we need to handle a java add-in to handle a java tree. In tools we
 have the “object identification” drop down list. There we have the java option to
 recognize the objects there select the tree option. Add the properties.




 41. How to fetch test data from Database by using QTP?
 In order to fetch test data from Database we have to create a adodb connection
 object       to   connect      with     data      base.     The     syntax   is…
 >CreateObject(“Adodb.connection”) .
 42. What is the procedure to test flash application using QTP?
 Using Multimedia Add-ins Support.
 43. If a error occur during the execution of QTP script. How can we
 handle it.
 Using Recovery Scenerio manager.
 44. How to merge the object repository files.
 Using a repository merge tool. It is available with QTplus tool.
 45. Can we update the database though QTP.
 Yes. We can update.
 46. How can we pass parameters in a actions?
 Using Input and output parameters.
 47. How can you write a script without using a GUI in QTP?
 Object repository? Without OR, tester need to write descriptive tests, where you
 would directly assign property values and write methods.
 48. How to load the *.vbs or test generating script in a new machine?
 By using Test->setting->resources->libraries option.
 49. How did you add run-time parameter to a datasheet?
 Using dt sheet object.
 50. What is descriptive programming?
 Executing the test script with out object repository.
 51. How you write scripts in QTP?
 Using vbscript.

www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 52. How to instruct QTP to display errors and there description in the
 test results instead of halting execution by throwing error in the mid of
 execution due to an error (for example Object not found)?
 By using err object this object value passes to result window.
 53. What is the descriptive programming? What is the use of descriptive
 programming?
 Test Execution faster.
 54. How will you test a stapler?
 Using user acceptance test.
 55. QTP supports Batch test?
 Yes, Its supported by using test batch runner.
 56.Describe the last project scenario and generate test cases for it?
 Based on the last project functionality we write test cases for it.
 57. If there are a lot of bugs to be fixed, which one would, you resolve
 first.
 As a tester.. We don’t fix bugs.. we only find bugs As a developer.. Bugs are to
 be fixed basing on the property and severity of bugs. Sometimes even the
 severity is low. But if attaches to major functionality, then priority will be more to
 fix that bug..
 58. What would be strategy to fix bugs in an unknown piece of code?
 R&D works means basically we can stay it is a verification process. Before you
 implementing some logic into your function you have to review those to find is
 there any errors which can be cleared by going through that piece of logic we are
 going.
 59. Define Virtual Object?
 Virtual Object enable you to record and run tests on objects that are not normally
 recognized by Quick Test. We can teach Quick Test to recognize any area of your
 application as an object by defining it as a virtual object. Some times QTP may
 not recognize some objects. In this kind of Situations Using New Virtual Object.
 We can convert Cutom Objects into standard Objects.
 60. What are Main panes available in QTP Test Browser?
 Test pane-Contains the Tree View and Expert view tabs
 Test Details Plan-Contains the Action screen



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 Debug Viewer pane-Assists you in debugging your test. The Debug Viewer
 pane contains the Watch
 Expressions, Variables, and Command tabs. (The Debug Viewer pane is not
 displayed when you open 103)
 61. In what occasion we can specify Global sheet and Action Sheet?
 We store data in the Global tab when we want it to be available to all actions in
 our test, for example, to pass parameters from one action to another.
 62.Difference between Text and Test Area Checkpoints?
 Text Checkpoint-Enables you to check that the text is displayed in a screen,
 window, or Web page, according to specified criteria. It is supported for all
 environments.
 Teat Area Checkpoint- Enables you to check that a text string appears within a
 defined area in a W application, according to specified criteria. It is supported for
 standard windows, Visual Basic, and A environments,
 63. What ate different types of exceptions ?
 Four types of Exceptions are there 1). Pop-up exception 2). Object State
 exception 3). Test Run error exceptions 4). Application Crash exceptions.
 64. What are the key elements available in Test Results Window?
 Test Results File bar, Test Results bar, Test result tree, Test result details, Status.
 65. With what extension you can save the list of tests in a file to run in
 Test Batch Runner?
 .MTB
 66. What are Main panes available in QTP Test Browser?
 Test pane (Tree & Expert), Test Details pane (Active Screen), Date table, Debug
 viewer pane.
 67. How many tabs are available to view your test in a Test pane and
 what are they?
 Two these are Tree & Expert.
 68. What are the 3 mains stages involved in Testing with QTP?
 Creating Tests, Running Tests, Analyzing Tests.
 69. Write a Function to capture the Pop-up’s?
 Here I am writing steps to handle pop-up Exceptions.
 1. Select the Recovery scenario manager.
 2. Press the new scenario
 3. Click next


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 4. Select the pop-up exception.
 5. Select the pop-window which we want to handle (capture) by clicking the spy
     button.
 6. Press next.
 7. Select the specified option like keyboard or mouse operation press next.
 8. Select the specified option click default or press enter.
 9. Click next and uncheck add another recovery operation.
 10. Click next and select proceed next step.
 11. Click next and give the scenario name and description.
 12. Click next and select add scenario to current test and add scenario to default
     setting. Click finish Afterward save that scenario.

 70. What is meant by hot keys?
 A hot keys or a combination of keys on a computer keyboard when pressed
 performs a task. The specific task performed by a particular hot key varies by
 operating system or application. However, there are commonly _ used hot keys.


 71. For a triangle (sum of two sides is greater than or equal to the third
 side), what is the minimal number of test cases required.
 Generally, we will calculate the number of test cases that depends on the
 particular module and its complexity. Minimum number of test=(number of
 outputs) multiply (1.6) (approx calculation)

 72. What are the flaws in water fall model and how to overcome it?
 Since testing comes at the last stage, there are huge chances of defect
 multiplication, defects will be migrated to every stage wastage of human
 resources and time delays are also introduced.

 73. How does you test a web link which is changing dynamically?
 This could be tested through the automated test tools like rational robot and
 WinRunner.

 74.What is system testing and what are the different types of tests you
 perform in system testing?
 System testing is a type of Block box testing means testing the application. After
 the integration testing, usually will do testing. Functionality, Regression, and
 performance testing comes under system testing.

 75. How do we know about the build we are going to test? Where do you
 see this?
 In test plat we are going to have all the details about who should test which tests
 in a team which is given by team leader. According to that the entire group will
 do their testing.

 76. What did u as a team leader?
 The roles of a lead 1) before the project gets started, will conduct one team
 meeting and discuss briefly about the upcoming project. 2) will distribute the
 work among the team member and let them know which part of the application
 they are going to test3)


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

   77. What test you perform mostly? Regression or retesting in your
   testing process?
   Retesting is the repeated execution of the test case which results in a fault, with
   the aim that fault has been cured, Regression testing is the renewed testing of
   already tested program or part after modification with the aim that the modified
   had.

   78. Without using GUI map editor? We can recognize the application in
   WinRunner?
   Without Using GUI map Editor, We can Recognize the Application objects using a
   Descriptive programming.




                                             QTP (b)

1). How to create the dynamic object repository in QTP?

     Property values of objects of applications may change dynamically each time
your application opens, or based on certain conditions, to make the test object
property values match the property values run time object, we can modify test
object properties manually while design the test or component or using 'SET TO
PROPERTY" Statements during run session.

2). What is difference between global sheet and action sheet?

        A Test is comprised of 1 or more actions. The Global sheet can be accessed by
all the Actions in the Test. An action sheet is local to the particular action. The action
sheet is named after the name of the action.

       The default behavior of the global sheet is that the test iterates for all the
rows in the Global sheet. If there are 10 rows of data in the global sheet...the test
iterates for 10 times.

       The default behavior of the Action sheet is 1st iteration no matter how many
rows are available. This default behavior can be modified by right clicking on the
action and modifying the action's properties.

3). How to pass parameters from one action to another action.

        You can store the variable you want to pass as Environment Variable in One
action and then if you need to access the same variable in another action first you


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

have to call that environment variable in second action, store it in some variable and
use it...

4). How to perform cross platform testing and cross browser testing using
QTP? Explain giving some example?

Cross Platform Testing:

          There is a provision of getting the Operating system in QTP by using the
Built in Environment. Eg. Platform = Environment ("OS"). Then based on the
Platform you need to call the actions, which you recorded on that particular platform.

Cross Browser Testing:

First get the type of browser you are using: Eg. Browser ("Core
Values").GetROProperty("version")

This will give you Internet explorer 6 or Netscape 5. Based on this value you call the
actions, which are relevant to that browser.




5). What conditions we go for Reusable Scripts and how we create and call
that into another script?

When we are going to call the action to another actions we are going to set the
calling action as reusable. By setting this then only you are going reuse some other
action. Otherwise you cannot call that action.

Ex: - Login

      We can record the script for one action and set in the action Properties as
Reusable. Whenever you need Login script you can call that Reusable Action.

6). Is it possible to test a web application (java) with WinRunner?

Otherwise is it possible to check with QTP?
Which one is best?

We find some difficulties, when we use WinRunner to test with the Java based web
application,

But at the same time we don’t find any problem in using the QTP to test the java
based web application

These are some of the web application supported by QTP: XML, HTTP, WSDL, SAP,
J2EE, .net


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

So what i would suggest is to go for QTP to test the Java based we application,

I've heard that a java web application can be tested by WinRunner but is not flexible.
It's recommended to use QTP tool for more reliability.

7). Can we mask a Code In .vbs file so that it is not viewable to others?

VBS file is visible in notepad only not in QTP. We can  add .vbs files in QTP, test
menu->setting->Resource Tab.

You also try to open .vbs file in QTP if it's open then you only get your questions
answer.

8). Is there any function to double click a particular row in a web table?

    There will be a function by the name activate. use that function. required
argument is the row number.

9). What is the use of command tab in Debug viewer? Can we execute any
user-defined queries?

Step Into

Choose Debug > Step Into, click the Step Into button, or press F11 to run

only the current line of the active test or component. If the current line of

the active test or component calls another action or a function, the called

action/function is displayed in the Quick Test window, and the test or

Component pauses at the first line of the called action/function.

Step Out

Choose Debug > Step Out or click the Step Out button, or press SHIFT+F11

Only after using Step Into to enter a action or a user-defined function. Step

Out runs to the end of the called action or user-defined function, then

Returns to the calling action and pauses the run session.

Step Over

Choose Debug > Step Over or click the Step Over button, or press F10 to



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

Run only the current step in the active test or component. When the current

Step calls another action or a user-defined function, the called action or

Function is executed in its entirety, but the called action script is not

Displayed in the Quick Test window.

10.).What is database checkpoint?

Database check helps to check database used is correct or not.

e.g. : flight reservation : if you right click on the information table of flight and say
add database check point you would get check point properties ,there select the data
base icon which looks like excel sheet and click ok. Check point is added, if you want
to add parameterization click on the icon in the value cell and add parameters, data
table will be highlighted, add the places you want to check and run the test... if
successful, means dbcheck point is correct.

11). What is the use of function and sub function in QTP?

       Function and Sub Function are similar. Only the difference is Sub Function will
not return any thing to the function. But using Function it returns result to the
function.

We can use function wherever we need it.
We can do parameterization and also reducing the lines of code, etc...


12). What is the new Version of QTP which is recently released in the
Market?

CURRENTLY QTP 9.0 BETA VERSION IS IN MARKET.NOW MOST OF THE COMPANIES
ARE WORKING ON QTP 8.2 VERSION.

13). How to call a function present in dll file in QTP Script.

Execute File "Path of the .vbs file "

14). I have n iterations of test run in QTP. I want to see the results of not
only the latest (‘n’th) iteration but also all the previous iterations (1to
‘[n-1]’th)

      While Executing the QTP script, select "New Run Results folder" option from
the Run dialog box and select the path to save the result file.

So that, we can verify previous iterations results also.



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

15). How to call from one action to another action in QTP?

      Using "Call to Existing Action" we can call one action from another action.

Go to insert ->select Call to Existing Action

Select which action wants to call.

16). What is the Difference Between Bit map Check point & Image Check
point Please explain in detail

For Bit map Check point we need not have any image, It goes by the screen area.

But for image checkpoint we need to have an image.

17) How to get the column count and column name from result set in
database connection program?

I am giving examples so that u can under sand easily.

1). Example for record count

Set dbconn=create object ("adodb.connection")
dbconn.open "dsn=xxx"

Set objRecordset=create object ("ADODB.Recordset")
objRecordset.open "select * from login table", dbconn, 1,3

  Msgbox objRecordset.recordcount

2). For field names

For each x in objRecordset.fields
 Msgbox (x.name)
Next

18) How to identify a 'web element' class object while recording and
running in 'Event' mode of settings. I’m able to run either a mouse over
operation or an event but not both as per the requirement...

Add html tag and inner text properties to the web element.          Remove all other
properties to that object in object repository.

19) What are the new features available in QTP 8.2 compared with earlier
versions?

Setting parameters to the actions step->action properties->parameters tab here we
can set the input and output parameters.

www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

20) What is difference between window (" ") and dialog (" ") in QTP while
creating script?

Window is a separate window that appears on clicking on a particular link on which
we can perform actions like edit the content etc. This will contain many objects like
chkbox, edit box, combo box etc. Developers to validate a field use dialog box. It will
contain an alert message and OK or/and Cancel buttons.

21) How do you retrieve the Class name of a Test Object programmatically
from within a script?

Using GetROProperty () function

22) Testing Mainframe applications.

First we have install Terminal Emulator add-in. Then try to identify the objects.

The objects will be added to the object Repository, but these objects will be
identified depends the X, Y co-ordinates of the objects.

23) Difference Between text and Text area checkpoints in QTP

Text checkpoint both can check the whole string which u can do by using standard
checkpoint. Difference is that if u wants to validate that a particular string has to
come within a defined area then use text area checkpoint. Use text checkpoint when
the position of text is critical. Assume u have a text box in one screen that displays
the name entered in previous screen. u will use text area checkpoint to validate that
name appears within the text box. u will use text checkpoint in this example to see
that surname appears first(assuming some format specified wherein surname should
be first).



24) What are different execution modes available in QTP & explain them.

There is 3-execution mode in QTP they are

1. Normal - the default mode where expected & actual results are verified & output is
given.

2. Update - When u want to update the expected result then update mode is used.

3. Debug- this requires Microsoft debugger..

25) How can we recognize objects in Flex application using QTP?

If you are recording in the low level mode. In this mode every object is identified as
under only 2 classes.

www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

a) Win Object b) Windows

26) How to write QTP test results to an Excel application

Set Excel sheet=Create Object (Excel. sheet)

Excelsheet.Visible=True

Excelsheet.Activesheet.Cells (1,1). Value=Variable

Excelsheet.Saveas"C: C.xls"

In addition to the creation of the excel object, you can use the ADO concept as well
as the inbuilt data export function of QTP.

1) ADO: In this, you have to create one DSN through ODBC for the Microsoft Excel
*.xls driver. Using this defines Adodb.Connection and Record set for the required
excel which you want to update. Then simply you can update any column using
Recordset.Updte concept similar in VB

2) DataTable.ExportSheet "C: name.xls”, 1

27) How to write recovery scenario for below questions and what are the
steps we will follow? If I click save button. It is not saving I want to write
recovery scenario how?

To write Recovery scenario u must 1st stop recording when u get an error then from
Tools menu-> select Recover Scenario Manager

When Recover Scenario Manager window is opened u can follow the steps as they r
descriptive & select the appropriate option for the type of error u receive, u have to
select what action is to be performed if this particular error occurs after completing
the entire procedure u need to save the scenario as well as the file.

Then thru Test-> Setting-> Recovery option attach the file to the recording & u do
have a choice of whether to activate on every step or etc etc.

Thus u can use Recovery scenario to handle exceptions...

28) After importing external .xls datasheet into Data table of QTP, How to
set NO of iterations run for all row in the Data table? I mean we dot know
How many rows are existed before importing the .xls sheet

FOR i = 1 to datatable.getsheet ("sheet name"). Getrowcount.getrowcount command
will read up to the last record

29) How to test Dynamic web pages using QTP



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

If you know the one property of the object. That is sufficient for the QTP to identify
the object. if u know the one object property. at that time we need to use object
identifier to identikit object we need to add some more properties of the object. To
give unique identification for the object. Or we need to go for the descriptive
programming, it bypass the object repository
30) How do we connect to Oracle database from QTP?

Name: Open Connection
'Function: Opens a connection to the required database
'Input Parameter: strDriver, strServer, strUserID, strPassword
' strDriver => Name of Database Driver to be used
' strServer => Database Server address
' strUserID => User ID to connect to database
' strPassword => Password to connect to database
'Return Value: con => Object: Connection to database
' NULL if it fails
'Calls: None [Calls no other user defined function]
'---------------------------------------------------------------------------------------
Function Open Connection(byval strDriver,byval strServer,byval strUserID,byval
strPassword)

Dim strConnectionString
strConnectionString = "DRIVER=" & strDriver & "; SERVER=" & strServer & ";
UID=" & strUserID & "; PWD=" & strPassword
set con = create object ("adodb.connection")
con.open strConnectionString
set Open Connection = con

End Function

31) How to configure the environment variables in QTP and how to use the variables,
with example?

Setting the Environment Variable

VARIABLE=Environment. Value ("XXXXXXX")

Retrieving the Environment Variable

Environment. Value ("XXXXXXX")=VARIABLE/CONSTANT

32) What is the process for creating an automated test script using QTP
assuming you have reviewed the manual test case and understand the
requirements?

Transferring your testing from Manual to Automation depends upon lot of factors.
Depending upon these factors u decide the 'Framework'. Framework is nothing but
the approach by which u implement QTP to your project. There is various type of
framework available.... Data, Library, Keyword Driven to name few.

www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

33) What is the method used to focus on particular field. I need the script.
I will give example.

In flight application login page by default the focus is on username field. for this i will
check the focus was there or not by using GetRoproperty method but if focus is not
there which method i need to use. Getroproperty: retrieves the particular property.

Getroproperty: set the property to particular object....

to focus to the perticulat text we can use this method:

Object. GetTextLocation (TextToFind, Left, Top, Right, Bottom,
[MatchWholeWordOnly])

Object. GetTextLocation (TextToFind, Left, Top, Right, Bottom,
[MatchWholeWordOnly]

34) 1) what is the advantage and disadvantage of using Virtual Object
wizard?

    2) How efficiently we can use Virtual object Wizard in QTP?

Virtual object Wizard we can map Custom Objects (objects which are not recognized
by QTP) to Standard Class.

This help to insert checkpoints and for doing DDT for that objects


35) Can any body explain me the differences between a reusable and a
external action with example?


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 in another test...


36) How to write QTP test results to an Excel application?

Dim fso, f1
Set fso = Create Object ("Scripting.FileSystemObject")
Set f1 = fso. CreateTextFile ("D:testfile.xls", True)

And Then use If condition's

To store the results


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

If Browser ("abc"). Page("xyz").Exist Then
 f1.writeline("Step1 Login details is pass")
 else
 f1.writeline("Step1 Login details is Fail")
 End If


37) How good is QTP for testing siebel applications? Whether QTP
recognizes siebel objects?

QTP supports siebel Application. It is the best Automated tool, which supports
SIEBEL Application.

38) The concept of checkpoint declaration in the QTP mainly for the Objects,
Pages, Text and Tables?

Check point declaration is basically compare two values and give the result..

Suppose For Standard checkpoint I have given Text for username should be Lena’s if
any other text appears in that field, suppose Mona appeared in that field then
checkpoint fails to validate and you get result as test case failed for that checkpoint..

Basically insertion of checkpoint to get expected output, and should know where test
case goes wrong.

In Standard checkpoint one can set height/width/location of X-y co-ordinates of
object /text etc.

39) What is Expert view in QTP? Can you explain with example?

n QTP we have two script views:

   •   Expert view
   •   Keyword view

Expert View: Displays the action performed during recording in script view, i.e. VB
Script

Keyword view: Displays the action performed during recording in terms of objects.


40) What is the best way to do regression testing using QTP?

Regression testing is not tool dependent.

Firstly there should a regression test strategy, based on this strategy you
can group functional test cases to form regression test suites.



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

Then these test suites are automated based on regression group

41) What are the use functions in QTP? Public, private

Public: In any testing tool not only the QTP if we declare as a Public then we can use
that variable to any function within the script

Private: we can use that variable within the function

42) How can we return values from user-defined function? provide code
with small example .

                      a)Arguments
Public
        Indicates that the Function procedure is accessible to all other procedures in
        all scripts.
Default
        Used only with the Public keyword in a Class block to indicate that the
        Function procedure is the default method for the class. An error occurs if
        more than one Default procedure is specified in a class.
Private
        Indicates that the Function procedure is accessible only to other procedures
        in the script where it is declared or if the function is a member of a class, and
        that the Function procedure is accessible only to other procedures in that
        class.
Name
        Name of the Function; follows standard variable naming conventions.
Arglist
        List of variables representing arguments that are passed to the Function
        procedure when it is called. Commas separate multiple variables.
Statements
        Any group of statements to be executed within the body of the Function
        procedure.
Expression
        Return value of the Function.

Note: So, to return a value, assign the return value to the function name.

For Eg:

Function Binary Search (. . .)
     ...
     ' Value not found. Return a value of False.
     If lower > upper Then
 Binary Search = False
 Exit Function
 End If
     ...
End Function

www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

43) Without recording objects in Object Repository are we able to run
scripts?
  Yes, We can do that by using Descriptive Programming.

44) What is Limitation of QTP?

4 must know VBScript in order to program at all.
4 must be able to program in VBScript in order to implement the real advance
testing tasks and to handle dynamic situations.

45) What is descriptive programming?

Descriptive program we can work with the objects, which are not there in Object
Repository. If we use descriptive program we can reduce the size of object
repository. so QTP performance also increases.

46) What are the disadvantages or drawbacks in QTP?

1) QTP takes very long to open huge tests. Also CPU utilization becomes 100% in
that case.

2) QTP scripts are heavy as it stores all the html files (for active screen) as well.

3) Block commenting is not provided till 8.2 version


47) What is QTP framework? When we prepare the data for data driven
testing?

QTP framework is like Test Plan for automation using QTP. It contains information
regarding naming conventions, variables, data for DDT, about the OR path, how the
scripts should be commented and what is the purpose of each script etc..

48) You are trying to test a web-based application. You invoked QTP from
TD to test the web application. While the TD itself runs on a browser, how
do you ensure that these two browsers do not clash?

TestDirector is management tool; it would be used to invoke QTP or WinRunner
scripts one after another. So before we open application (whatever may be the
application like web based or stand alone application) we should open TD so there is
no clash between TD and web based application.

49) What are environment variables in qtp?

The Environmental Variables in QTP are 1) User-Defined 2) Built-in



50) What is keyword driven testing please give process one example.
What is the different between data driven and keyword driven testing?

www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

Keyword Driven: In the Keyword Driven testing, user can defined screen objects.
Suppose, user is adding page title, label name. When scripts are running...these
objects will be verify with the scripts.

Data-driven scripts: In Data-driven testing, user is giving set number of values and
replace these columns name with the declared one in the data driven database.

51) How many number of actions possible in QTP?

There are 3 types of actions available in QTP

1. Reusable

2.non-reuseable

3. Extern Action

52) How to change the Object Repository Mode using CODE? i.e. from
Shared to Per Action.

Set qApp = CreateObject ("QuickTest.Application")
 qApp.Test.Settings.Resources.ObjectRepositorytype = "Per Action"
 Set qApp = Nothing

53) How can I implement error handling in QTP and How to recall a function
in QTP?
Through exception handling we can implement error handle.In QTP we have four
types of exception handles.

we can call the function as below

function functionname (parameter1, parameter2,....)

end function




                                    QTP (c)

   1. How Does Run time data (parameterization) is handle in QTP?

www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 A). You can then enter test data into the Data Table, an integrated spreadsheet
    with the full functionality or Excel, to manipulate data sets and cteate multiple
    test iterations, without programming, to expand test case coverage. Data can
    be typed in or imported from databases, spreadsheets, or text files.

 2. What is keyboard view and Expert view in QTP?
 A). QuickTest’s keyword Driven approach, tet automation experts have full
    access to the underlying test and object properties, via an integrated scripting
    and debugging environment that is round-trip synchronized with the keyword
    view.
    Advanced testers can view and edit their tests in the Expert View, which
    reveals the underlying industry-standard VBScript that QTP aucomatically
    generates. Any changes made in the Expert View are automatically
    synchronized with the keyword View.

 3. Explain about the test Fusion Report of QTP?
 A). Once a tester has run a test, a Test Fusion report displays all aspects of the
    test run a high-level results overview, an expandable Tree View of the test
    specifying exactly where application failures occurred, the test data used,
    application screen shots for every step that highlight any discrepancies, and
    detailed explanations of each checkpoint pass and failure, By combining Test
    Fusion reports with QTP, you can share reports across an entire QA and
    development team.

 4. To which environments does QTP supports?
 A). QTP supports functional testing of all enterprise environments, including
    Windows, Web, .Net, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic,
    ActiveX, Mainframe terminal emulators, and Web services.

 5. What is QTP?
 A). QuickTest is a graphical interface record-playback automation tool. It is a
    able to work with any web, java or windows client application. Quick Test
    enables you to test standard web objects and ActiveX controls. In addition to
    these environments, QTP also enables you to test java applets and
    applications and multimedia objects on Applications as well as standard
    windows applications, Visual Basic 6 applications and .NET framework
    applications…

 6. How QTP recognizes Objects in AUT?
 A). QuickTest stores the definitions for applications objects in a file called the
    Object Repository. As you record your test, Quick Test will add an entry for
    each item you interact with. Each object Repository entry will be identified by
    a logical name (determined automatically by Quick Test), and will contain a
    set of properties (type, name, etc) that uniquely identify each object.
    Each line in the Quick Test script will contain a reference to the object that
    you interacted with, a call to the appropriate method (set, click, check) and
    any parameters for that method (such as the value for a call to the set
    method). The references to objects in the script will all be identified by the
    logical name, rather than any physical, descriptive properties.



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 7. What are the types of Object Repositories in QTP?
 A). QuickTest has two types of object repositories for storing object information:
    shared object repositories and action object repositories. You can choose
    which type of object repository you want to use as the default type for new
    tests, and you can change the default as necessary for each new test.
    The object repository per-action mode is the default setting. In this mode,
    Quick Test automatically creates an object repository file for each action in
    your test so that you can create and run tests without creating, choosing, or
    modifying object repository files. However, if you do modify values in an
    action object repository, your changes do not have any effect on other
    actions. Therefore, if the same test object exists in more than one action and
    you modify an object’s property values in one action, you may need to make
    the same change in every action (and any test) containing the object.

 8. Explain the Check points in QTP?
 A). A checkpoint verifies that expected information is displayed in a Application
    while the test is running. You can add eight types of checkpoints to your test
    for standard web objects using QTP.
 1. A page checkpoint checks the characteristics of Application
 2. A text checkpoint checks that a text strings is displayed in the appropriate
    place on a Application.
 3. An object checkpoint(Standard) checks the values of an object on a
    Application.
 4. An image checkpoint checks the values of an image on a Application.
 5. A table checkpoint checks information within a table on a Application.
 6. An Accessibility checkpoint checks the web page for Section 508 compliance.
 7. An XML checkpoint checks the contents of individual XML data files or XML
    documents that are part of your web application.
 8. A database checkpoint checks the contents of databases accessed by your.

 9. In how many ways we can add check points to an application using
    QTP?
 A). We can add checkpoints while recording the application or we can add after
    recording is completed using Active screen (Note: To perform the second one
    The Active screen must be enabled while recording).

 10.How does QTP identifies the object in the application.
 A). QTP identifies the object in the application by Logical Name and Class.
    For example:
    The Edit box is identified by
    Logical Name: PSOPTIONS_TIME20
    Class: Web Edit.

 11. If an application names is changes frequently i.e while recording it
    has name A). “Window1” and then while running its “Window2” in this case
    how does QTP handles?
    QTP handles those situations “Regular Expressions” .

 12.What is parameterizing Tests?



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 A). When you test application, you may want to check how it performs the same
    operations with multipie sets of data. For example, suppose you want to
    check how your application responds to ten separate sets of data. You could
    record ten separate tests, each with its own set of data. Alternatively, you can
    create a parameterized test that runs ten times: each time the test runs, it
    uses a different set of data.

 13.What is test object model in QTP?
 A). The object model is a large set of object types or classes that Quick Tests
    uses to represent the objects in your application. Each test object class has a
    list of properties that can uniquely identify objects of that class and a set of
    relevant methods that Quick Test can record for it.
    A test object is an object that Quick Test creates in the test or component to
    represent the actual object in your application Quick Test stores information
    about the object that will help it identify and check the object during the run
    session.
    A run-time object is the actual object in your web site or application on which
    methods are performed during the run session.
    When you perform an operation on your application while recording.
      Identifies the Quick Test test object class that represents the object on
         which you performed the operation and creates the appropriate test
         object
      Reads the current value of the object’s properties in your application and
         stories the list of properties and values with the test object.
      Chooses a unique name for the object, generally using the value of one of
         its prominent properties.
      Records the operation that you performed on the object using the
         appropriate Quick Test test object method.
    For Example, suppose you click on a Find button with the following HTML
    source code:
    <INPUT TYPE=”submit”NAME =”find”VALUE=”Find”>
    Quick Test identifies the object that you clicked as a Web Button test object.
    It creates a Web Button object with the name Find, and records the following
    properties and values for the Find Web Button:
    It also records that you performed a Click method on the Web Button.
    Quick Test displays your step in the keyboard view like this:
    Quick Test displays your step in the Expert View like this:
    Browser(“Mercury Interactive”).page(“Mercury Interactive”) .
    Web Button (“Find”).Click

 14.What is Object Spy in QTP?
 A). Using the Object Spy, you can view the properties of any object in open
    application. You use the Object Spy pointer to point to an object. The Object
    Spy displays the selected object’s hierarchy tree and its properties and values
    in the properties tab of the Object Spy dialog box.

 15.What is the Difference between Image check-point and Bitmap check-
    point?
 A). Image checkpoint enable you to check the properties of web image. You can
    check an area of a Web page or application as a bitmap. While creating a test


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

    of component, you specify the area you want to check by selecting an object
    you can check an entire object or any area within an object. Quick Test
    captures the specified object as a bitmap, and inserts a checkpoint in the test
    or component. You can also choose to save only the selected area of the
    object with your test or component in order to save disk space For example,
    suppose you have a web site that can display a map of a city the user
    specifies. The map has control keys for zooming. You can record the new map
    that is displayed after one check on the control key that zooms in the map.
    Using the bitmap checkpoint, you can check that the map zooms in correctly.
    You can create bitmap checkpoints all supported testing environments (as
    long as the appropriate add-ins are loaded).
    Note: The results of bitmap checkpoints may be affected by factors such as
    operating systems, screen resolution, and color settings.

 16.How many ways we can parameterize data in QTP?
 A). There are four types of parameters:
        Test action or component parameters enable you to use values
 passed
        From your test or component or values from other actions in your test.

         Data Table parameters enable you to create a data-driven test (or act
 on)
 That runs several times using the data you supply. In each repetition, or
 iteration, Quick Test uses a different value from the Data Table

        Environment variables parameters enable you to use variable values
 from
    Others sources during the run session. These may be values you supply, or
    values that Quick Test generates for you based on conditions and options you
    choose.

    Random number parameters enable you to insert random numbers as
    values in your test or component. For example, to check how your application
    hadles small and large ticked orders, you can have Quick Test generate a
    random number and insert it in a number of ticket edit field.

 17.How do you do batch testing in WR & is it possible to do in QTP, if so
    explain?
 A). Batch Testing in WR is nothing but running the whose test set by selecting
    “Run Test set” from.
    The “Execution Grid”. The same is possible with QTP also. If our test cases
    are automated then.
    By selecting “Run Test set” all the test scripts can be executed. In this
    process the Scripts.
        Get executed one by one by keeping all the remaining scripts in “Waiting”
 mode.

 18.If i give some thousand tests to execute in 2 days what do you do?
 A). Adhoc testing is done. It coverts the least basic functionalities to verify that
    the system


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

       Is working fine

   19.What does it mean when a check point is in red color? What do you
      do?
   A). A red color indicates failure. Here we analyze the cause for failure whether it
      is a
           Script Issue or Environment Issue or a Application issue.

   20.What do you call the window TestDirector - testlab?
   A). “Execution Grid”. It is place from whether we Run all Manual/Automated
      Scripts


   21.How do you create new test sets in TD
   A). Login to TD.
      Click on “Test Lab” tab.
      Select the Desired folder under which we need to create the test set. (Test
      sets can be grouped as per module).
      Click on “New Test Set or Ctrl+N” Icon to create a Test Set.

   22.How do you do batch testing in WR & is it possible to do in QTP, if so
       explain?
A). You can use Test Batch Runner to run several tests in succession. The results for
   each test are stored in their default location.
       Using Test Batch Runner, you can set up a list and save the list as an .mtb
       file, so that you easily run the same batch of tests again, at another time. You
       can also choose to include or exclude a test in your batch list from running
       during a batch run.

   23.How to Import data from a “.xls” file to Data table during Runtime.
   A). Datatable.Import “…XLS file name…”

       Datatable.Importsheet(FileName, SheetSource, SheetDest)
       Datatable>ImportSheet “C:name.xls”,1,”name”.

   24.How to export data present in Database to an “.xls” file?
   A). DataTable.Export “….xls file name…”


   25. What do you to script when object are remove from application?

   26.Syntact for how to call one script from another? And syntax to call
      one “Action” in another?
   A). 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 rnfIterations. Enter
      the row range
              (i.e “1.7”); or enter rngAll to run iterations on all rows.


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

    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.

 27.How to export QTP results to an “.xls” file?
 A). By default it creates an “XML” file and displays the results.

 28.3 differences between QTP & WinRunner?
 A).
       (a) QTP is object bases Scripting (VBS) where WinRunner is TSL (C based)
           Scriptting.
       (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.
       (f) Definitions and create checkpoints after having record 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.

 29.How to add a Runtime parameter to a datasheet?
 A). DataTable.LocalSheet
    The following example uses the LocalSheet property to return the local sheet
    of
    The run-time Data Table in order to add a parameter (column) to it.
    My param=DataTable.LocalSheet.AddParameter(“Time”,”5:45”)

 30.What scripting language is QTP of?
 A). Vbs.

 31.Analyzing the Checkpoint results?
 A). Standard Checkpoint: 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.

 32.Table and DB Checkpoints:
 A). By adding table checkpoints to your tests or components, you can check that
    a specified value.
    Is display in a cell in a table on your application. By adding database
    checkpoints to your.
    Tests or components, you can check the contents of database accessed by
    your application.



www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

    The results displayed for table and database checkpoints are similar. When
    you run test or
    Component, Quick Test compares the expected results of the check points to
    the actual results of
    The run session, If the results do not match, the checkpoint fails.
    You can check that a specified value is displayed in a cell in a table by adding
    a table.
    Chechpoint to your test or component. For Activex tables, you can also check
    the properties of
    The table object. To add a table checkpoint, you use the Checkpoint
    properties dialog box.
    Table checkpoints are supports for Web and AvtiveX applivation, as well as for
    variefy of
    External add-in environments.
    You can use database checkpoints in your test or component to check
    databases accessed by your
    Web site or application and to delete defects. You define a query on your
    database, and then
    You create a database checkpoint that checks the results of the query.
    Database checkpoints are supported for all environments supported by Quick
    Test, by default, as
    Well as for a variety of external add-in environments
    There are two ways to define a database query
        (a) Use Microsoft Query. You can install Microsoft Query from the custom
            installation of Microsoft
            Office.
        (b) Manually define an SQL statement.
    The checkpoints timeout option is available only when creating a table
    checkpoint. It is not
    Available when creating a database checkpoint

 33.Checking Bitmaps:
  A). You can check an area of a web page or application as a bitmap. While
    creating a test or component, you specify the area you want to check by
    selecting an object. You can check an entire object or any area within an
    object. Quick Test captures the specified object as a bitmap, and inserts a
    checkpoint in the test or component. You can also choose to save only the
    selected area of the object with your test or component in order to save disk
    space.
            When you run the test or component, Quick Test compares the object
    or selected area of the object currently displayed on the web page or
    application with the bitmap stored when the test or component was recorded.
    If there are differences, Quick Test captures a bitmap of the actual object and
    displays it with the expected bitmap in the details portion of the Test Results
    window. By comparing the two bitmaps (expected and actual), you can
    identify the nature of the discrepancy. For more information on test results of
    a checkpoint, see Viewing Checkpoint Results.
            For example, suppose you have a web site that can display a map of
    city the user specifies. The map has control keys for zooming. You can record
    the new map that is displayed after one click on the control key that zooms in


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

    the map. Using the bitmap checkpoint, you can check that the map zooms in
    correctly.
           You can create bitmap checkpoints for all supported testing
    environments (as long as the appropriate add-ins are loaded).
           Note: The results of bitmap checkpoints may be affected by factors
    such as operating system, screen resolution, and color settings.

 34.Text/Text Area checkpoint:
  A). In the Text/Text Area Checkpoint propertied dialog box, you can specify the
    text to be checked as well as which text is displayed before and after the
    checked text. These configuration options are particularly helpful when the
    text string you want to check appears several times or when it could change
    in a predictable way during run session.
            Note: In windows-based environments, if there is more than one line
    of text selected, the Checkpoint Summary pane display [complex value]
    instead of the selected text for the checkpoint.
            Quick Test automatically displays the Checked Text in red and the text
    before and after the checked text in blue. For text area checkpoints, only the
    text string captured from the defined area is displayed (Text Before and Text
    After are not displayed).
            To designate parts of the captured string as checked Test and other
    parts as Text Before and Text After, click configure button. The Configure
    Text Selection dialog box opens.

    Checking   XML :

            XML (Extensible Markup Language)is a meta-makeup language for text
    documents that is endorsed as a standard by the W3C. XML makes the
    complex      data    structure      portable    between     different    computer
    environments/operating systems and programming languages, facilitating the
    sharing of data.
            XML files contain text with simple tags that describe the data within an
    XML document. These tags describe the data content, but not the
    presentation of the data. Applications that display an XML document or file
    use either Cascading style sheets (CSS) of XSL Formatting objects (XSL-FO)
    to present the data.
            You can verify the data content of XML files by inserting XML
    checkpoints. A few common uses of XML checkpoints are described below:
            An XML file can be a static data file that is accessed in order to retrieve
    commonly used data for which a quick response times is needed-for example,
    country names, zip codes, or area codes. Although this data can change over
    time, it is normally quite static. You can use an XML file checkpoint to validate
    that the data has not changed from one application release to another.
            An XML file can consist of elements with attributes and values
    (character data). There is a parent and child relationship between the
    elements, and elements can have attributes associated with them. If any part
    of this structure (including data) changes, you application’s ability to process
    the XML file may be affected. Using an XML checkpoint, you can check the
    content of an element to make sure that its, attributes, and values have not
    changed.


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

           XML files are often an intermediary that retrieves dynamically
    changing data from one system. The data is then accessed by another system
    using Document. Type Definitions (DTD), enabling the accessing system to
    read and display the information in the file. You can use an XML checkpoint
    and parameterize the captured data values in order to check an XML
    document or file whose data changes in a predictable way.
           XML documents and files often need a well-defined structure in order
    to be portable across platforms and development systems. One way to
    accomplish this is by developing an XML scheme, which describes the
    structure of the XML elements and data types. You can use scheme validation
    to check that each item of content in an XML file adheres to the scheme
    description of the element in which the content is to be placed.

 35.Object Repositories types, which & when to use?
    A). Deciding which Object Repository Mode to Choose
            To choose the default object repository mode and the appropriate
    object repository mode for each test, you need to understand the differences
    between the two modes.
            In general, the object repository per-action mode is easiest to use
    when you are creating simple record and run tests, especially under the
    following conditions:
            You have only one, or very few, tests that correspond to a given
    application, interface, or set of objects.
            You do not expert to frequently modify test object properties.
            You generally create single-action tests
            Conversely, the shared object repository mode is generally the
    preferred mode when:
            You have several tests that test elements of the same application,
    interface, or set of objects.
            You expert the object properties in your application to change from
    time to time and/or you regularly need to update or modify test object
    properties.
            You often work with multi-action tests and regularly use the Insert
    copy of Action and Insert Call to Action options.

 36.Can we Script any test case with out having object repository? Or
    Using Object Repository is a must?
  A). No. U can script with out Object repository by knowing the window
    Handlers, spying and recognizing the
          Objects logical names and properties available.

 37.How to execute a WinRunner Script in QTP?
    A).
          (a)TSL Test.RunTest, Testpath, TestSet. [parameters] --> Used in QTP
            6.0 used for backward compatibility.
            Parameters: The test set within Quality Center, in which test runs are
            stored. Note that this argument is relevant only when working with a
            test in a Quality Center Project. When the test is not saved in Quality
            Center, this parameter is ignored.
        e.g: TSLTest.RunTest “D:test1”,””


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

          (b).    TSLTest.RunTestEx     TestPath,    RunMinimized,    CloseApp,
            [parameters]
            TSLTest.RunTestEx “C:WinRunnerTestsbasic_flight”, TRUE, FALSE,
            “MyValue”.
            CloseApp: Indicates whether to close the WinRunner application when
            the WinRunner test run ends.
            Parameters: Up to 15 WinRunner function argument.

 38.How to handle Run-time errors?
  A). 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 Resumes 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”.

 39.How to change the run-time value of property for an object?
  A). SetToproperty changes the property values used to identify an object
    during the test run.
           Only properties that are included in the test object description can be
    set.

 40.How to retrieve the property of an object?
    A). Using “GetRoproperty”.
 41.How to open any application during Scripting?
  A). SystemUtil, Object used to open and close applications and processes
    during a run session.
    (a). A SystemUtil.Run statement is automatically added to your test when you
    run an application from the start menu or the Run dialog box while recording
    a test.
            Eg:   SystemUtil.Run “Notepad.exe”
                  SystemUtil.closeDescendentprocesses (closes all the processes
                  opened by QTP)

 42.Types of properties that Quick Test learns while recording?
  A). (a). Mandatory
         (b). Assistive.
    In addition to recording the mandatory and assistive properties specified in
    the object Identification dialog box, Quick Test can also record a bank up
    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.

 43.What is the extension of script and object repository files?
    A). Object Repository: .tsr, Script: .mts, Excel: Default.xls


www.ramupalanki.com
For more QTP Scripts, visit www.ramupalanki.com

 44.How to suppress warnings from the “Test results page”?
  A). From the Test results Viewer “Tools>Filters>Warnings”…must                be
    “Unchecked”.

 45.When we try to use test run option “Run from Step”, the browser is
    not launching automatically why?
  A). This is default behaviour.

 46.Does QTP is “Unicode” compatible?
  A). QTP 6.5 is not but QTP 8.0 is expected to be Unicide compatabile by end of
    December 2004.

 47.How to “Turn off” QTP results after running a script?
  A). Goto “Tools>Option>Run Tab” and Deselect “View results when run session
    ends”. But this suppresses only the result window, but a log will be created
    and can viewed manulaly which cannot be restricted from getting created.



 48.How to verify the cursor focus of a certain field?
  A). Use “Focus” property of “GetRoProperty” method.

 49.Any limitation to XML checkpoints?
  A). Mercury has determined that 1.4MB is the maximum size of XML file that
    QTP 6.5 can handle.



 50.How to make arguments optional in a function?
  A). This is not possible as default VBS doesn’t support this. Instead you can
    pass a blank scring and have a default value if arguments are not required.

 51.How to covert a string to an interger?
  A). CInt()--- > a conversion function available.

 52.Inserting a call to Action is not Importing all columns in Datatable of
    globalsheet. Why?
  A). Inserting a call to action will only Import the columns of the Action called.




www.ramupalanki.com

Mais conteúdo relacionado

Mais procurados

QTP Interview Questions and answers
QTP Interview Questions and answersQTP Interview Questions and answers
QTP Interview Questions and answersRita Singh
 
QTP Power Point Presentation
QTP Power Point PresentationQTP Power Point Presentation
QTP Power Point PresentationSVRTechnologies
 
Pro smartbooksquestions
Pro smartbooksquestionsPro smartbooksquestions
Pro smartbooksquestionsyoummr
 
Hp Quick Test Professional
Hp Quick Test ProfessionalHp Quick Test Professional
Hp Quick Test Professionalsunny.deb
 
QTP Automation Testing Tutorial 6
QTP Automation Testing Tutorial 6QTP Automation Testing Tutorial 6
QTP Automation Testing Tutorial 6Akash Tyagi
 
QTP Automation Testing Tutorial 5
QTP Automation Testing Tutorial 5QTP Automation Testing Tutorial 5
QTP Automation Testing Tutorial 5Akash Tyagi
 
First QTP Tutorial
First QTP TutorialFirst QTP Tutorial
First QTP Tutorialtjdhans
 
QTP Slides Presentation.
QTP Slides Presentation.QTP Slides Presentation.
QTP Slides Presentation.tjdhans
 
QTP Automation Testing Tutorial 3
QTP Automation Testing Tutorial 3QTP Automation Testing Tutorial 3
QTP Automation Testing Tutorial 3Akash Tyagi
 
Qtp Training
Qtp TrainingQtp Training
Qtp Trainingmehramit
 
What are the features in qtp
What are the features in qtpWhat are the features in qtp
What are the features in qtpRamu Palanki
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questionsRamu Palanki
 
Qtp 92 Tutorial
Qtp 92 TutorialQtp 92 Tutorial
Qtp 92 Tutorialsasidhar
 
Data Base Testing Interview Questions
Data Base Testing Interview QuestionsData Base Testing Interview Questions
Data Base Testing Interview QuestionsRita Singh
 

Mais procurados (17)

QTP Interview Questions and answers
QTP Interview Questions and answersQTP Interview Questions and answers
QTP Interview Questions and answers
 
QTP Power Point Presentation
QTP Power Point PresentationQTP Power Point Presentation
QTP Power Point Presentation
 
Pro smartbooksquestions
Pro smartbooksquestionsPro smartbooksquestions
Pro smartbooksquestions
 
Hp Quick Test Professional
Hp Quick Test ProfessionalHp Quick Test Professional
Hp Quick Test Professional
 
Qtp day 1
Qtp day 1Qtp day 1
Qtp day 1
 
QTP Automation Testing Tutorial 6
QTP Automation Testing Tutorial 6QTP Automation Testing Tutorial 6
QTP Automation Testing Tutorial 6
 
QTP Automation Testing Tutorial 5
QTP Automation Testing Tutorial 5QTP Automation Testing Tutorial 5
QTP Automation Testing Tutorial 5
 
First QTP Tutorial
First QTP TutorialFirst QTP Tutorial
First QTP Tutorial
 
QTP Slides Presentation.
QTP Slides Presentation.QTP Slides Presentation.
QTP Slides Presentation.
 
Qtp stuff
Qtp stuffQtp stuff
Qtp stuff
 
QTP Automation Testing Tutorial 3
QTP Automation Testing Tutorial 3QTP Automation Testing Tutorial 3
QTP Automation Testing Tutorial 3
 
Qtp Training
Qtp TrainingQtp Training
Qtp Training
 
What are the features in qtp
What are the features in qtpWhat are the features in qtp
What are the features in qtp
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 
Ppt Qtp
Ppt QtpPpt Qtp
Ppt Qtp
 
Qtp 92 Tutorial
Qtp 92 TutorialQtp 92 Tutorial
Qtp 92 Tutorial
 
Data Base Testing Interview Questions
Data Base Testing Interview QuestionsData Base Testing Interview Questions
Data Base Testing Interview Questions
 

Semelhante a Qtp material for beginners

Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questionsRamu Palanki
 
Qtp Interview Questions
Qtp Interview QuestionsQtp Interview Questions
Qtp Interview Questionskspanigra
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3Ramu Palanki
 
Qtp interview questions and answers
Qtp interview questions and answersQtp interview questions and answers
Qtp interview questions and answersRamu Palanki
 
Qtp interview questions and answers
Qtp interview questions and answersQtp interview questions and answers
Qtp interview questions and answersRamu Palanki
 
SAP Testing Training
SAP Testing TrainingSAP Testing Training
SAP Testing TrainingVGlobal Govi
 
QTP Descriptive programming Tutorial
QTP Descriptive programming TutorialQTP Descriptive programming Tutorial
QTP Descriptive programming TutorialJim Orlando
 
QTP Training by INFOTECH
QTP Training by INFOTECHQTP Training by INFOTECH
QTP Training by INFOTECHPravinsinh
 
Automation Tool QTP
Automation Tool  QTPAutomation Tool  QTP
Automation Tool QTPBugRaptors
 
Qtp Basics
Qtp BasicsQtp Basics
Qtp Basicsmehramit
 
Automation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in HyderabadAutomation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in HyderabadDurga Prasad
 
Automation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadAutomation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadDurga Prasad
 
QTP 10.0_Kalyan Chakravarthy.ppt
QTP 10.0_Kalyan Chakravarthy.pptQTP 10.0_Kalyan Chakravarthy.ppt
QTP 10.0_Kalyan Chakravarthy.pptKalyan Chakravarthy
 
HP Quick Test Professional
HP Quick Test ProfessionalHP Quick Test Professional
HP Quick Test ProfessionalVitaliy Ganzha
 
QTP 10 00 Guide
QTP 10 00 GuideQTP 10 00 Guide
QTP 10 00 GuideG.C Reddy
 
Automation framework123
Automation framework123Automation framework123
Automation framework123subbusjune22
 

Semelhante a Qtp material for beginners (20)

Qtp basic stuff
Qtp basic stuffQtp basic stuff
Qtp basic stuff
 
Qtp basic
Qtp basicQtp basic
Qtp basic
 
Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 
Qtp Interview Questions
Qtp Interview QuestionsQtp Interview Questions
Qtp Interview Questions
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3
 
Qtp interview questions and answers
Qtp interview questions and answersQtp interview questions and answers
Qtp interview questions and answers
 
Qtp interview questions and answers
Qtp interview questions and answersQtp interview questions and answers
Qtp interview questions and answers
 
QTP Faqs
QTP FaqsQTP Faqs
QTP Faqs
 
SAP Testing Training
SAP Testing TrainingSAP Testing Training
SAP Testing Training
 
QTP Descriptive programming Tutorial
QTP Descriptive programming TutorialQTP Descriptive programming Tutorial
QTP Descriptive programming Tutorial
 
QTP Training by INFOTECH
QTP Training by INFOTECHQTP Training by INFOTECH
QTP Training by INFOTECH
 
Automation Tool QTP
Automation Tool  QTPAutomation Tool  QTP
Automation Tool QTP
 
Qtp Basics
Qtp BasicsQtp Basics
Qtp Basics
 
Automation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in HyderabadAutomation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in Hyderabad
 
Automation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabadAutomation testing material by Durgasoft,hyderabad
Automation testing material by Durgasoft,hyderabad
 
QTP 10.0_Kalyan Chakravarthy.ppt
QTP 10.0_Kalyan Chakravarthy.pptQTP 10.0_Kalyan Chakravarthy.ppt
QTP 10.0_Kalyan Chakravarthy.ppt
 
HP Quick Test Professional
HP Quick Test ProfessionalHP Quick Test Professional
HP Quick Test Professional
 
QTP 10 00 Guide
QTP 10 00 GuideQTP 10 00 Guide
QTP 10 00 Guide
 
Qtp Training
Qtp TrainingQtp Training
Qtp Training
 
Automation framework123
Automation framework123Automation framework123
Automation framework123
 

Mais de Ramu Palanki

Qtp sample certification questions and answers
Qtp sample certification questions and answersQtp sample certification questions and answers
Qtp sample certification questions and answersRamu Palanki
 
Qtp realtime scripts
Qtp realtime scriptsQtp realtime scripts
Qtp realtime scriptsRamu Palanki
 
Qtp complete guide for all
Qtp complete guide for allQtp complete guide for all
Qtp complete guide for allRamu Palanki
 
Qtp compare two xml files
Qtp compare two xml filesQtp compare two xml files
Qtp compare two xml filesRamu Palanki
 
Qtp change excel cell color with condition
Qtp change excel cell color with conditionQtp change excel cell color with condition
Qtp change excel cell color with conditionRamu Palanki
 
Qtp certification questions
Qtp certification questionsQtp certification questions
Qtp certification questionsRamu Palanki
 
Qtp certification questions and tutorial
Qtp certification questions and tutorialQtp certification questions and tutorial
Qtp certification questions and tutorialRamu Palanki
 
Qtp certification questions2
Qtp certification questions2Qtp certification questions2
Qtp certification questions2Ramu Palanki
 
Qtp automation estimation techniques
Qtp automation estimation techniquesQtp automation estimation techniques
Qtp automation estimation techniquesRamu Palanki
 
Qtp 11 new enhacements in
Qtp 11 new enhacements inQtp 11 new enhacements in
Qtp 11 new enhacements inRamu Palanki
 
Qtp passing parameters between actions
Qtp passing parameters between actionsQtp passing parameters between actions
Qtp passing parameters between actionsRamu Palanki
 
Qtp wsh scripts examples
Qtp wsh scripts examplesQtp wsh scripts examples
Qtp wsh scripts examplesRamu Palanki
 
Quick test professional certifcation questions and tutorial2
Quick test professional certifcation questions and tutorial2Quick test professional certifcation questions and tutorial2
Quick test professional certifcation questions and tutorial2Ramu Palanki
 
Quality center certification questions
Quality center certification questionsQuality center certification questions
Quality center certification questionsRamu Palanki
 
Qtp+real time+test+script
Qtp+real time+test+scriptQtp+real time+test+script
Qtp+real time+test+scriptRamu Palanki
 
Testing interview questions
Testing interview questionsTesting interview questions
Testing interview questionsRamu Palanki
 

Mais de Ramu Palanki (20)

Qtp sample certification questions and answers
Qtp sample certification questions and answersQtp sample certification questions and answers
Qtp sample certification questions and answers
 
Qtp realtime scripts
Qtp realtime scriptsQtp realtime scripts
Qtp realtime scripts
 
Qtp presentation
Qtp presentationQtp presentation
Qtp presentation
 
Qtp complete guide for all
Qtp complete guide for allQtp complete guide for all
Qtp complete guide for all
 
Qtp compare two xml files
Qtp compare two xml filesQtp compare two xml files
Qtp compare two xml files
 
Qtp change excel cell color with condition
Qtp change excel cell color with conditionQtp change excel cell color with condition
Qtp change excel cell color with condition
 
Qtp certification questions
Qtp certification questionsQtp certification questions
Qtp certification questions
 
Qtp certification questions and tutorial
Qtp certification questions and tutorialQtp certification questions and tutorial
Qtp certification questions and tutorial
 
Qtp certification questions2
Qtp certification questions2Qtp certification questions2
Qtp certification questions2
 
Qtp best tutorial
Qtp best tutorialQtp best tutorial
Qtp best tutorial
 
Qtp automation estimation techniques
Qtp automation estimation techniquesQtp automation estimation techniques
Qtp automation estimation techniques
 
Qtp 11 new enhacements in
Qtp 11 new enhacements inQtp 11 new enhacements in
Qtp 11 new enhacements in
 
Qtp sample resume
Qtp sample resumeQtp sample resume
Qtp sample resume
 
Qtp passing parameters between actions
Qtp passing parameters between actionsQtp passing parameters between actions
Qtp passing parameters between actions
 
Qtp wsh scripts examples
Qtp wsh scripts examplesQtp wsh scripts examples
Qtp wsh scripts examples
 
Quick test professional certifcation questions and tutorial2
Quick test professional certifcation questions and tutorial2Quick test professional certifcation questions and tutorial2
Quick test professional certifcation questions and tutorial2
 
Quality center certification questions
Quality center certification questionsQuality center certification questions
Quality center certification questions
 
Qtp+real time+test+script
Qtp+real time+test+scriptQtp+real time+test+script
Qtp+real time+test+script
 
Testing interview questions
Testing interview questionsTesting interview questions
Testing interview questions
 
Qtp
QtpQtp
Qtp
 

Último

Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Anamaria Contreras
 
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu MenzaYouth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menzaictsugar
 
Innovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfInnovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfrichard876048
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfJos Voskuil
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyotictsugar
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaoncallgirls2057
 
Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737Riya Pathan
 
Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMintel Group
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607dollysharma2066
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfRbc Rbcua
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africaictsugar
 
Marketplace and Quality Assurance Presentation - Vincent Chirchir
Marketplace and Quality Assurance Presentation - Vincent ChirchirMarketplace and Quality Assurance Presentation - Vincent Chirchir
Marketplace and Quality Assurance Presentation - Vincent Chirchirictsugar
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfpollardmorgan
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Kirill Klimov
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCRashishs7044
 
8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCRashishs7044
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607dollysharma2066
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdfKhaled Al Awadi
 
Buy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy Verified Accounts
 

Último (20)

Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.
 
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu MenzaYouth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
Youth Involvement in an Innovative Coconut Value Chain by Mwalimu Menza
 
Innovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfInnovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdf
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdf
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyot
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
 
Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737
 
Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 Edition
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdf
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africa
 
Marketplace and Quality Assurance Presentation - Vincent Chirchir
Marketplace and Quality Assurance Presentation - Vincent ChirchirMarketplace and Quality Assurance Presentation - Vincent Chirchir
Marketplace and Quality Assurance Presentation - Vincent Chirchir
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR
 
8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
 
Buy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail Accounts
 
Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)
 

Qtp material for beginners

  • 1. For more QTP Scripts, visit www.ramupalanki.com QTP FAQS 1. What are the Features & Benefits of Quick Test pro (QTP)..? Operates stand-alone, or integrated into Mercury Business process Testing and Mercury Quality C enter. Introduces next-generation “Zero-configuration” Keyboard Driven testing technologies in Quick Test Professional 8.0 – allowing for fast test creation, easier. 2. Differences between QTP 6.5 and 8.2 what are extra features in 8.2? Multimedia Add-in is available in QTP 6.5. Multimedia Add-in is not available in QTP 8.2. Parameterization is the extra Features in QTP 8.2. compared to QTP 6.5. 3. How to handle the exceptions using recovery scenario manager in QTP? There are 4 trigger events during which a recovery scenario should be activated. They are A pop up window appears in an opened application during the test run. A property of an object changes its state or value. 4.What is the use if Text output value in QTP? Output values enable to view the values that the application takes during run time. When parameterized, the values change for each iteration. Thus by creating output values, we van capture the values an object in runtime. 5. How to use the object spy in QTP 8.0? To view the Run time objects and Test objects properties and Methods of an object. 6. What is the extension of the object repository files in QTP? Two types of Object repository there are shared repository (extension .tsr) and Action repository(extension .mtr) 7. Explain the concept of object repository & how to QTP recognizes objects? With QTP 8.2, there available QTP plus, setup. It provides Repositories Merge Utility. The Object Repository Merge Utility enables user to merge Object repository files into a single Object repository file. To recognizes a object using properties. 8. What are the properties you would use for identifying a browse & page when using descriptive programming? www.ramupalanki.com
  • 2. For more QTP Scripts, visit www.ramupalanki.com For Browser we will have to user title, html id property to identify the browser and web page. 9. What are the scripting language you could use when working with QTP? QTP supports vb scripts scripting language. 10. Give me an example where you have used a COM interface In your QTP project? Com interface appears In the scenerio of front end and backend foreign in you are using oracle as back end and front end as VB or any language then for better compatibility we will go for an interface of which COM will be one amoung those interfaces. 11. Few basic questions on commonly used Excel VBA functions. Common functions are: Creatinf a sheets and assigning values to sheets and coloring the cell Auto fit cell setting navigation from link in one cell to other saving. 12. Explain the keyboard create object with an example. Create object: Creates and returns a reference to an Dynamic object. Example: Ser Excel sheet = Create Object(“Excel.Sheet”) 13. Explain in brief about the QTP Automation Object Model. To pre-configure test settings before executing the QTP test. 14. How to handle Dynamic Object in QTP? User GETRO property we will handle the runtime objects. 15. Where can I find the Run-time data table? In the result window shows a run time data table. It includes the table-shaped icon that display the run-time Data Table – a table that shows the values used to www.ramupalanki.com
  • 3. For more QTP Scripts, visit www.ramupalanki.com run a test containing Data Table parameters or the Data Table output values retrieved from a test while application execution time. 16. How to do Data-Driving in QTP? By parameterizing the test script. 17. What are the differences between call to Action and Copy Action? When you inset a call to action, they are ready only in the calling test. It can be modified in the original test. Where as come to copy action, you can make changes to the copied action, your changes will not effect the original action where it created. 18. Discuss QTP Environment. QuickTestProficinal environment using the graphical interface and Action Screen technologies – A testing process for creating test scripts, relating manual test requirements to automated verification features – Data driving to use several sets of data using. 19. Explain the concept of how QTP identifies object. During tecording QTP looks at the objects and stories it as test objects. For each object QT earns a set of default properties called mandatory properties, and look at the rest of the objects to check whether this properties are enough to uniquely identify. 20. Differentiate the two Object Repository Types of QTP. In QTP there are 2 object repositories, they are 1.Shared Object Repository 2. Per Action Mode, by default it’s per action mode. We want to maintain the Object Repository per each action separately. Select a per action mode. 21. What are the differences are and best practical application of each. Per action: For Each Action, one Object Repository is created. Shared: One Object Repository is used by entire application. www.ramupalanki.com
  • 4. For more QTP Scripts, visit www.ramupalanki.com 22. Explain what the differences between Shared Repository and Per_Action Repository. In shared repository, one object is used in more than one action and in per action repository, everytime in every, objects are stored differently and are not shared. 23. Have you ever written a complied 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. WR fails to identify the objects 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? Yes you can do more than capture/playback. Descriptive programming is the answer to this question. We can write scripts without recording and it would still work fine. 26. How long have you used the product? Depending up on the Licence. 27. How to do the scripting. Is there any inbuilt function in QTP? Yes, there’s an in-built functionality called “step Generator” in Insert>Step>step Generator – F7, which will generate the scripts as you enter the appropriate steps. 28. What are the differences between check point output value. An output value is a value retrieved during the run session and entered into runtime table or data table subsequently it can be used as input value in your test. 29. If we use batch testing. The result shown for last action only. In that how can I get result for every action? Click in the Expend icon in the tree view to view the result of every action. 30. How the exception handling can be done using QTP? www.ramupalanki.com
  • 5. For more QTP Scripts, visit www.ramupalanki.com Recovery scenerio manager provides a wizard that guides you though the defining recovery scenerio. Recovery scenerio has three steps 1. Triggered Events 2. Recovery steps 3. Post Recovery Test-Run. 31. How do you test siebel application using QTP? In SWE section you need to add Automation Enable = True and at the same time you need to use SWE Cmd = Auto On in the URL. 32. How many types of Actions are there in QTP? QTP supports three types of Actions. 1). Non Reusable actions 2). Re-usable Actions 3). External actions. 33. How do you data drive an external spreadsheet? Import from External Spreadsheet File by selecting Import then From File. Which imports a tabbed text file or a single sheet from an existing Microsoft Excel file into the table? The sheet you Import replace all data in the currently selected. 34. I want to open a Notepad window without recording a test and I do not want to use System Util. Run command as well how do I do this? Another alternative to open a notepad is to use Shell Object. Check out with the following example: Dim a Set a = Wscript.CreateObject(“Wscript.shell”) a.run “notepad.exe”. 35. how many types of recording modes in QTP? Describe each type with an example where we use them? 3 types of recording modes in QTP.1.normal 2.analog mode 3. low level recording mode. 36. How can we do the Frame work in QTP? Depending upon the project and client requirements. 37. Testing>QTP which features of QTP would you like to improve? How would you go about implementing it? We are not implementing any concept in QTP. 38. explain as to how would you design the driver code for a keyboard based test script. Test script prepare in QTP. Key words prepare in a Excel sheet and objects description prepare in notepad. www.ramupalanki.com
  • 6. For more QTP Scripts, visit www.ramupalanki.com 39. The file extension of Shared object repository. The Share object repository is .tsr extension. 40. How to handle java tree in QTP? First of all we need to handle a java add-in to handle a java tree. In tools we have the “object identification” drop down list. There we have the java option to recognize the objects there select the tree option. Add the properties. 41. How to fetch test data from Database by using QTP? In order to fetch test data from Database we have to create a adodb connection object to connect with data base. The syntax is… >CreateObject(“Adodb.connection”) . 42. What is the procedure to test flash application using QTP? Using Multimedia Add-ins Support. 43. If a error occur during the execution of QTP script. How can we handle it. Using Recovery Scenerio manager. 44. How to merge the object repository files. Using a repository merge tool. It is available with QTplus tool. 45. Can we update the database though QTP. Yes. We can update. 46. How can we pass parameters in a actions? Using Input and output parameters. 47. How can you write a script without using a GUI in QTP? Object repository? Without OR, tester need to write descriptive tests, where you would directly assign property values and write methods. 48. How to load the *.vbs or test generating script in a new machine? By using Test->setting->resources->libraries option. 49. How did you add run-time parameter to a datasheet? Using dt sheet object. 50. What is descriptive programming? Executing the test script with out object repository. 51. How you write scripts in QTP? Using vbscript. www.ramupalanki.com
  • 7. For more QTP Scripts, visit www.ramupalanki.com 52. How to instruct QTP to display errors and there description in the test results instead of halting execution by throwing error in the mid of execution due to an error (for example Object not found)? By using err object this object value passes to result window. 53. What is the descriptive programming? What is the use of descriptive programming? Test Execution faster. 54. How will you test a stapler? Using user acceptance test. 55. QTP supports Batch test? Yes, Its supported by using test batch runner. 56.Describe the last project scenario and generate test cases for it? Based on the last project functionality we write test cases for it. 57. If there are a lot of bugs to be fixed, which one would, you resolve first. As a tester.. We don’t fix bugs.. we only find bugs As a developer.. Bugs are to be fixed basing on the property and severity of bugs. Sometimes even the severity is low. But if attaches to major functionality, then priority will be more to fix that bug.. 58. What would be strategy to fix bugs in an unknown piece of code? R&D works means basically we can stay it is a verification process. Before you implementing some logic into your function you have to review those to find is there any errors which can be cleared by going through that piece of logic we are going. 59. Define Virtual Object? Virtual Object enable you to record and run tests on objects that are not normally recognized by Quick Test. We can teach Quick Test to recognize any area of your application as an object by defining it as a virtual object. Some times QTP may not recognize some objects. In this kind of Situations Using New Virtual Object. We can convert Cutom Objects into standard Objects. 60. What are Main panes available in QTP Test Browser? Test pane-Contains the Tree View and Expert view tabs Test Details Plan-Contains the Action screen www.ramupalanki.com
  • 8. For more QTP Scripts, visit www.ramupalanki.com Debug Viewer pane-Assists you in debugging your test. The Debug Viewer pane contains the Watch Expressions, Variables, and Command tabs. (The Debug Viewer pane is not displayed when you open 103) 61. In what occasion we can specify Global sheet and Action Sheet? We store data in the Global tab when we want it to be available to all actions in our test, for example, to pass parameters from one action to another. 62.Difference between Text and Test Area Checkpoints? Text Checkpoint-Enables you to check that the text is displayed in a screen, window, or Web page, according to specified criteria. It is supported for all environments. Teat Area Checkpoint- Enables you to check that a text string appears within a defined area in a W application, according to specified criteria. It is supported for standard windows, Visual Basic, and A environments, 63. What ate different types of exceptions ? Four types of Exceptions are there 1). Pop-up exception 2). Object State exception 3). Test Run error exceptions 4). Application Crash exceptions. 64. What are the key elements available in Test Results Window? Test Results File bar, Test Results bar, Test result tree, Test result details, Status. 65. With what extension you can save the list of tests in a file to run in Test Batch Runner? .MTB 66. What are Main panes available in QTP Test Browser? Test pane (Tree & Expert), Test Details pane (Active Screen), Date table, Debug viewer pane. 67. How many tabs are available to view your test in a Test pane and what are they? Two these are Tree & Expert. 68. What are the 3 mains stages involved in Testing with QTP? Creating Tests, Running Tests, Analyzing Tests. 69. Write a Function to capture the Pop-up’s? Here I am writing steps to handle pop-up Exceptions. 1. Select the Recovery scenario manager. 2. Press the new scenario 3. Click next www.ramupalanki.com
  • 9. For more QTP Scripts, visit www.ramupalanki.com 4. Select the pop-up exception. 5. Select the pop-window which we want to handle (capture) by clicking the spy button. 6. Press next. 7. Select the specified option like keyboard or mouse operation press next. 8. Select the specified option click default or press enter. 9. Click next and uncheck add another recovery operation. 10. Click next and select proceed next step. 11. Click next and give the scenario name and description. 12. Click next and select add scenario to current test and add scenario to default setting. Click finish Afterward save that scenario. 70. What is meant by hot keys? A hot keys or a combination of keys on a computer keyboard when pressed performs a task. The specific task performed by a particular hot key varies by operating system or application. However, there are commonly _ used hot keys. 71. For a triangle (sum of two sides is greater than or equal to the third side), what is the minimal number of test cases required. Generally, we will calculate the number of test cases that depends on the particular module and its complexity. Minimum number of test=(number of outputs) multiply (1.6) (approx calculation) 72. What are the flaws in water fall model and how to overcome it? Since testing comes at the last stage, there are huge chances of defect multiplication, defects will be migrated to every stage wastage of human resources and time delays are also introduced. 73. How does you test a web link which is changing dynamically? This could be tested through the automated test tools like rational robot and WinRunner. 74.What is system testing and what are the different types of tests you perform in system testing? System testing is a type of Block box testing means testing the application. After the integration testing, usually will do testing. Functionality, Regression, and performance testing comes under system testing. 75. How do we know about the build we are going to test? Where do you see this? In test plat we are going to have all the details about who should test which tests in a team which is given by team leader. According to that the entire group will do their testing. 76. What did u as a team leader? The roles of a lead 1) before the project gets started, will conduct one team meeting and discuss briefly about the upcoming project. 2) will distribute the work among the team member and let them know which part of the application they are going to test3) www.ramupalanki.com
  • 10. For more QTP Scripts, visit www.ramupalanki.com 77. What test you perform mostly? Regression or retesting in your testing process? Retesting is the repeated execution of the test case which results in a fault, with the aim that fault has been cured, Regression testing is the renewed testing of already tested program or part after modification with the aim that the modified had. 78. Without using GUI map editor? We can recognize the application in WinRunner? Without Using GUI map Editor, We can Recognize the Application objects using a Descriptive programming. QTP (b) 1). How to create the dynamic object repository in QTP? Property values of objects of applications may change dynamically each time your application opens, or based on certain conditions, to make the test object property values match the property values run time object, we can modify test object properties manually while design the test or component or using 'SET TO PROPERTY" Statements during run session. 2). What is difference between global sheet and action sheet? A Test is comprised of 1 or more actions. The Global sheet can be accessed by all the Actions in the Test. An action sheet is local to the particular action. The action sheet is named after the name of the action. The default behavior of the global sheet is that the test iterates for all the rows in the Global sheet. If there are 10 rows of data in the global sheet...the test iterates for 10 times. The default behavior of the Action sheet is 1st iteration no matter how many rows are available. This default behavior can be modified by right clicking on the action and modifying the action's properties. 3). How to pass parameters from one action to another action. You can store the variable you want to pass as Environment Variable in One action and then if you need to access the same variable in another action first you www.ramupalanki.com
  • 11. For more QTP Scripts, visit www.ramupalanki.com have to call that environment variable in second action, store it in some variable and use it... 4). How to perform cross platform testing and cross browser testing using QTP? Explain giving some example? Cross Platform Testing: There is a provision of getting the Operating system in QTP by using the Built in Environment. Eg. Platform = Environment ("OS"). Then based on the Platform you need to call the actions, which you recorded on that particular platform. Cross Browser Testing: First get the type of browser you are using: Eg. Browser ("Core Values").GetROProperty("version") This will give you Internet explorer 6 or Netscape 5. Based on this value you call the actions, which are relevant to that browser. 5). What conditions we go for Reusable Scripts and how we create and call that into another script? When we are going to call the action to another actions we are going to set the calling action as reusable. By setting this then only you are going reuse some other action. Otherwise you cannot call that action. Ex: - Login We can record the script for one action and set in the action Properties as Reusable. Whenever you need Login script you can call that Reusable Action. 6). Is it possible to test a web application (java) with WinRunner? Otherwise is it possible to check with QTP? Which one is best? We find some difficulties, when we use WinRunner to test with the Java based web application, But at the same time we don’t find any problem in using the QTP to test the java based web application These are some of the web application supported by QTP: XML, HTTP, WSDL, SAP, J2EE, .net www.ramupalanki.com
  • 12. For more QTP Scripts, visit www.ramupalanki.com So what i would suggest is to go for QTP to test the Java based we application, I've heard that a java web application can be tested by WinRunner but is not flexible. It's recommended to use QTP tool for more reliability. 7). Can we mask a Code In .vbs file so that it is not viewable to others? VBS file is visible in notepad only not in QTP. We can  add .vbs files in QTP, test menu->setting->Resource Tab. You also try to open .vbs file in QTP if it's open then you only get your questions answer. 8). Is there any function to double click a particular row in a web table? There will be a function by the name activate. use that function. required argument is the row number. 9). What is the use of command tab in Debug viewer? Can we execute any user-defined queries? Step Into Choose Debug > Step Into, click the Step Into button, or press F11 to run only the current line of the active test or component. If the current line of the active test or component calls another action or a function, the called action/function is displayed in the Quick Test window, and the test or Component pauses at the first line of the called action/function. Step Out Choose Debug > Step Out or click the Step Out button, or press SHIFT+F11 Only after using Step Into to enter a action or a user-defined function. Step Out runs to the end of the called action or user-defined function, then Returns to the calling action and pauses the run session. Step Over Choose Debug > Step Over or click the Step Over button, or press F10 to www.ramupalanki.com
  • 13. For more QTP Scripts, visit www.ramupalanki.com Run only the current step in the active test or component. When the current Step calls another action or a user-defined function, the called action or Function is executed in its entirety, but the called action script is not Displayed in the Quick Test window. 10.).What is database checkpoint? Database check helps to check database used is correct or not. e.g. : flight reservation : if you right click on the information table of flight and say add database check point you would get check point properties ,there select the data base icon which looks like excel sheet and click ok. Check point is added, if you want to add parameterization click on the icon in the value cell and add parameters, data table will be highlighted, add the places you want to check and run the test... if successful, means dbcheck point is correct. 11). What is the use of function and sub function in QTP? Function and Sub Function are similar. Only the difference is Sub Function will not return any thing to the function. But using Function it returns result to the function. We can use function wherever we need it. We can do parameterization and also reducing the lines of code, etc... 12). What is the new Version of QTP which is recently released in the Market? CURRENTLY QTP 9.0 BETA VERSION IS IN MARKET.NOW MOST OF THE COMPANIES ARE WORKING ON QTP 8.2 VERSION. 13). How to call a function present in dll file in QTP Script. Execute File "Path of the .vbs file " 14). I have n iterations of test run in QTP. I want to see the results of not only the latest (‘n’th) iteration but also all the previous iterations (1to ‘[n-1]’th) While Executing the QTP script, select "New Run Results folder" option from the Run dialog box and select the path to save the result file. So that, we can verify previous iterations results also. www.ramupalanki.com
  • 14. For more QTP Scripts, visit www.ramupalanki.com 15). How to call from one action to another action in QTP? Using "Call to Existing Action" we can call one action from another action. Go to insert ->select Call to Existing Action Select which action wants to call. 16). What is the Difference Between Bit map Check point & Image Check point Please explain in detail For Bit map Check point we need not have any image, It goes by the screen area. But for image checkpoint we need to have an image. 17) How to get the column count and column name from result set in database connection program? I am giving examples so that u can under sand easily. 1). Example for record count Set dbconn=create object ("adodb.connection") dbconn.open "dsn=xxx" Set objRecordset=create object ("ADODB.Recordset") objRecordset.open "select * from login table", dbconn, 1,3 Msgbox objRecordset.recordcount 2). For field names For each x in objRecordset.fields Msgbox (x.name) Next 18) How to identify a 'web element' class object while recording and running in 'Event' mode of settings. I’m able to run either a mouse over operation or an event but not both as per the requirement... Add html tag and inner text properties to the web element. Remove all other properties to that object in object repository. 19) What are the new features available in QTP 8.2 compared with earlier versions? Setting parameters to the actions step->action properties->parameters tab here we can set the input and output parameters. www.ramupalanki.com
  • 15. For more QTP Scripts, visit www.ramupalanki.com 20) What is difference between window (" ") and dialog (" ") in QTP while creating script? Window is a separate window that appears on clicking on a particular link on which we can perform actions like edit the content etc. This will contain many objects like chkbox, edit box, combo box etc. Developers to validate a field use dialog box. It will contain an alert message and OK or/and Cancel buttons. 21) How do you retrieve the Class name of a Test Object programmatically from within a script? Using GetROProperty () function 22) Testing Mainframe applications. First we have install Terminal Emulator add-in. Then try to identify the objects. The objects will be added to the object Repository, but these objects will be identified depends the X, Y co-ordinates of the objects. 23) Difference Between text and Text area checkpoints in QTP Text checkpoint both can check the whole string which u can do by using standard checkpoint. Difference is that if u wants to validate that a particular string has to come within a defined area then use text area checkpoint. Use text checkpoint when the position of text is critical. Assume u have a text box in one screen that displays the name entered in previous screen. u will use text area checkpoint to validate that name appears within the text box. u will use text checkpoint in this example to see that surname appears first(assuming some format specified wherein surname should be first). 24) What are different execution modes available in QTP & explain them. There is 3-execution mode in QTP they are 1. Normal - the default mode where expected & actual results are verified & output is given. 2. Update - When u want to update the expected result then update mode is used. 3. Debug- this requires Microsoft debugger.. 25) How can we recognize objects in Flex application using QTP? If you are recording in the low level mode. In this mode every object is identified as under only 2 classes. www.ramupalanki.com
  • 16. For more QTP Scripts, visit www.ramupalanki.com a) Win Object b) Windows 26) How to write QTP test results to an Excel application Set Excel sheet=Create Object (Excel. sheet) Excelsheet.Visible=True Excelsheet.Activesheet.Cells (1,1). Value=Variable Excelsheet.Saveas"C: C.xls" In addition to the creation of the excel object, you can use the ADO concept as well as the inbuilt data export function of QTP. 1) ADO: In this, you have to create one DSN through ODBC for the Microsoft Excel *.xls driver. Using this defines Adodb.Connection and Record set for the required excel which you want to update. Then simply you can update any column using Recordset.Updte concept similar in VB 2) DataTable.ExportSheet "C: name.xls”, 1 27) How to write recovery scenario for below questions and what are the steps we will follow? If I click save button. It is not saving I want to write recovery scenario how? To write Recovery scenario u must 1st stop recording when u get an error then from Tools menu-> select Recover Scenario Manager When Recover Scenario Manager window is opened u can follow the steps as they r descriptive & select the appropriate option for the type of error u receive, u have to select what action is to be performed if this particular error occurs after completing the entire procedure u need to save the scenario as well as the file. Then thru Test-> Setting-> Recovery option attach the file to the recording & u do have a choice of whether to activate on every step or etc etc. Thus u can use Recovery scenario to handle exceptions... 28) After importing external .xls datasheet into Data table of QTP, How to set NO of iterations run for all row in the Data table? I mean we dot know How many rows are existed before importing the .xls sheet FOR i = 1 to datatable.getsheet ("sheet name"). Getrowcount.getrowcount command will read up to the last record 29) How to test Dynamic web pages using QTP www.ramupalanki.com
  • 17. For more QTP Scripts, visit www.ramupalanki.com If you know the one property of the object. That is sufficient for the QTP to identify the object. if u know the one object property. at that time we need to use object identifier to identikit object we need to add some more properties of the object. To give unique identification for the object. Or we need to go for the descriptive programming, it bypass the object repository 30) How do we connect to Oracle database from QTP? Name: Open Connection 'Function: Opens a connection to the required database 'Input Parameter: strDriver, strServer, strUserID, strPassword ' strDriver => Name of Database Driver to be used ' strServer => Database Server address ' strUserID => User ID to connect to database ' strPassword => Password to connect to database 'Return Value: con => Object: Connection to database ' NULL if it fails 'Calls: None [Calls no other user defined function] '--------------------------------------------------------------------------------------- Function Open Connection(byval strDriver,byval strServer,byval strUserID,byval strPassword) Dim strConnectionString strConnectionString = "DRIVER=" & strDriver & "; SERVER=" & strServer & "; UID=" & strUserID & "; PWD=" & strPassword set con = create object ("adodb.connection") con.open strConnectionString set Open Connection = con End Function 31) How to configure the environment variables in QTP and how to use the variables, with example? Setting the Environment Variable VARIABLE=Environment. Value ("XXXXXXX") Retrieving the Environment Variable Environment. Value ("XXXXXXX")=VARIABLE/CONSTANT 32) What is the process for creating an automated test script using QTP assuming you have reviewed the manual test case and understand the requirements? Transferring your testing from Manual to Automation depends upon lot of factors. Depending upon these factors u decide the 'Framework'. Framework is nothing but the approach by which u implement QTP to your project. There is various type of framework available.... Data, Library, Keyword Driven to name few. www.ramupalanki.com
  • 18. For more QTP Scripts, visit www.ramupalanki.com 33) What is the method used to focus on particular field. I need the script. I will give example. In flight application login page by default the focus is on username field. for this i will check the focus was there or not by using GetRoproperty method but if focus is not there which method i need to use. Getroproperty: retrieves the particular property. Getroproperty: set the property to particular object.... to focus to the perticulat text we can use this method: Object. GetTextLocation (TextToFind, Left, Top, Right, Bottom, [MatchWholeWordOnly]) Object. GetTextLocation (TextToFind, Left, Top, Right, Bottom, [MatchWholeWordOnly] 34) 1) what is the advantage and disadvantage of using Virtual Object wizard? 2) How efficiently we can use Virtual object Wizard in QTP? Virtual object Wizard we can map Custom Objects (objects which are not recognized by QTP) to Standard Class. This help to insert checkpoints and for doing DDT for that objects 35) Can any body explain me the differences between a reusable and a external action with example? 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 in another test... 36) How to write QTP test results to an Excel application? Dim fso, f1 Set fso = Create Object ("Scripting.FileSystemObject") Set f1 = fso. CreateTextFile ("D:testfile.xls", True) And Then use If condition's To store the results www.ramupalanki.com
  • 19. For more QTP Scripts, visit www.ramupalanki.com If Browser ("abc"). Page("xyz").Exist Then f1.writeline("Step1 Login details is pass") else f1.writeline("Step1 Login details is Fail") End If 37) How good is QTP for testing siebel applications? Whether QTP recognizes siebel objects? QTP supports siebel Application. It is the best Automated tool, which supports SIEBEL Application. 38) The concept of checkpoint declaration in the QTP mainly for the Objects, Pages, Text and Tables? Check point declaration is basically compare two values and give the result.. Suppose For Standard checkpoint I have given Text for username should be Lena’s if any other text appears in that field, suppose Mona appeared in that field then checkpoint fails to validate and you get result as test case failed for that checkpoint.. Basically insertion of checkpoint to get expected output, and should know where test case goes wrong. In Standard checkpoint one can set height/width/location of X-y co-ordinates of object /text etc. 39) What is Expert view in QTP? Can you explain with example? n QTP we have two script views: • Expert view • Keyword view Expert View: Displays the action performed during recording in script view, i.e. VB Script Keyword view: Displays the action performed during recording in terms of objects. 40) What is the best way to do regression testing using QTP? Regression testing is not tool dependent. Firstly there should a regression test strategy, based on this strategy you can group functional test cases to form regression test suites. www.ramupalanki.com
  • 20. For more QTP Scripts, visit www.ramupalanki.com Then these test suites are automated based on regression group 41) What are the use functions in QTP? Public, private Public: In any testing tool not only the QTP if we declare as a Public then we can use that variable to any function within the script Private: we can use that variable within the function 42) How can we return values from user-defined function? provide code with small example . a)Arguments Public Indicates that the Function procedure is accessible to all other procedures in all scripts. Default Used only with the Public keyword in a Class block to indicate that the Function procedure is the default method for the class. An error occurs if more than one Default procedure is specified in a class. Private Indicates that the Function procedure is accessible only to other procedures in the script where it is declared or if the function is a member of a class, and that the Function procedure is accessible only to other procedures in that class. Name Name of the Function; follows standard variable naming conventions. Arglist List of variables representing arguments that are passed to the Function procedure when it is called. Commas separate multiple variables. Statements Any group of statements to be executed within the body of the Function procedure. Expression Return value of the Function. Note: So, to return a value, assign the return value to the function name. For Eg: Function Binary Search (. . .) ... ' Value not found. Return a value of False. If lower > upper Then Binary Search = False Exit Function End If ... End Function www.ramupalanki.com
  • 21. For more QTP Scripts, visit www.ramupalanki.com 43) Without recording objects in Object Repository are we able to run scripts? Yes, We can do that by using Descriptive Programming. 44) What is Limitation of QTP? 4 must know VBScript in order to program at all. 4 must be able to program in VBScript in order to implement the real advance testing tasks and to handle dynamic situations. 45) What is descriptive programming? Descriptive program we can work with the objects, which are not there in Object Repository. If we use descriptive program we can reduce the size of object repository. so QTP performance also increases. 46) What are the disadvantages or drawbacks in QTP? 1) QTP takes very long to open huge tests. Also CPU utilization becomes 100% in that case. 2) QTP scripts are heavy as it stores all the html files (for active screen) as well. 3) Block commenting is not provided till 8.2 version 47) What is QTP framework? When we prepare the data for data driven testing? QTP framework is like Test Plan for automation using QTP. It contains information regarding naming conventions, variables, data for DDT, about the OR path, how the scripts should be commented and what is the purpose of each script etc.. 48) You are trying to test a web-based application. You invoked QTP from TD to test the web application. While the TD itself runs on a browser, how do you ensure that these two browsers do not clash? TestDirector is management tool; it would be used to invoke QTP or WinRunner scripts one after another. So before we open application (whatever may be the application like web based or stand alone application) we should open TD so there is no clash between TD and web based application. 49) What are environment variables in qtp? The Environmental Variables in QTP are 1) User-Defined 2) Built-in 50) What is keyword driven testing please give process one example. What is the different between data driven and keyword driven testing? www.ramupalanki.com
  • 22. For more QTP Scripts, visit www.ramupalanki.com Keyword Driven: In the Keyword Driven testing, user can defined screen objects. Suppose, user is adding page title, label name. When scripts are running...these objects will be verify with the scripts. Data-driven scripts: In Data-driven testing, user is giving set number of values and replace these columns name with the declared one in the data driven database. 51) How many number of actions possible in QTP? There are 3 types of actions available in QTP 1. Reusable 2.non-reuseable 3. Extern Action 52) How to change the Object Repository Mode using CODE? i.e. from Shared to Per Action. Set qApp = CreateObject ("QuickTest.Application") qApp.Test.Settings.Resources.ObjectRepositorytype = "Per Action" Set qApp = Nothing 53) How can I implement error handling in QTP and How to recall a function in QTP? Through exception handling we can implement error handle.In QTP we have four types of exception handles. we can call the function as below function functionname (parameter1, parameter2,....) end function QTP (c) 1. How Does Run time data (parameterization) is handle in QTP? www.ramupalanki.com
  • 23. For more QTP Scripts, visit www.ramupalanki.com A). You can then enter test data into the Data Table, an integrated spreadsheet with the full functionality or Excel, to manipulate data sets and cteate multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files. 2. What is keyboard view and Expert view in QTP? A). QuickTest’s keyword Driven approach, tet automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the keyword view. Advanced testers can view and edit their tests in the Expert View, which reveals the underlying industry-standard VBScript that QTP aucomatically generates. Any changes made in the Expert View are automatically synchronized with the keyword View. 3. Explain about the test Fusion Report of QTP? A). Once a tester has run a test, a Test Fusion report displays all aspects of the test run a high-level results overview, an expandable Tree View of the test specifying exactly where application failures occurred, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explanations of each checkpoint pass and failure, By combining Test Fusion reports with QTP, you can share reports across an entire QA and development team. 4. To which environments does QTP supports? A). QTP supports functional testing of all enterprise environments, including Windows, Web, .Net, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic, ActiveX, Mainframe terminal emulators, and Web services. 5. What is QTP? A). QuickTest is a graphical interface record-playback automation tool. It is a able to work with any web, java or windows client application. Quick Test enables you to test standard web objects and ActiveX controls. In addition to these environments, QTP also enables you to test java applets and applications and multimedia objects on Applications as well as standard windows applications, Visual Basic 6 applications and .NET framework applications… 6. How QTP recognizes Objects in AUT? A). QuickTest stores the definitions for applications objects in a file called the Object Repository. As you record your test, Quick Test will add an entry for each item you interact with. Each object Repository entry will be identified by a logical name (determined automatically by Quick Test), and will contain a set of properties (type, name, etc) that uniquely identify each object. Each line in the Quick Test script will contain a reference to the object that you interacted with, a call to the appropriate method (set, click, check) and any parameters for that method (such as the value for a call to the set method). The references to objects in the script will all be identified by the logical name, rather than any physical, descriptive properties. www.ramupalanki.com
  • 24. For more QTP Scripts, visit www.ramupalanki.com 7. What are the types of Object Repositories in QTP? A). QuickTest has two types of object repositories for storing object information: shared object repositories and action object repositories. You can choose which type of object repository you want to use as the default type for new tests, and you can change the default as necessary for each new test. The object repository per-action mode is the default setting. In this mode, Quick Test automatically creates an object repository file for each action in your test so that you can create and run tests without creating, choosing, or modifying object repository files. However, if you do modify values in an action object repository, your changes do not have any effect on other actions. Therefore, if the same test object exists in more than one action and you modify an object’s property values in one action, you may need to make the same change in every action (and any test) containing the object. 8. Explain the Check points in QTP? A). A checkpoint verifies that expected information is displayed in a Application while the test is running. You can add eight types of checkpoints to your test for standard web objects using QTP. 1. A page checkpoint checks the characteristics of Application 2. A text checkpoint checks that a text strings is displayed in the appropriate place on a Application. 3. An object checkpoint(Standard) checks the values of an object on a Application. 4. An image checkpoint checks the values of an image on a Application. 5. A table checkpoint checks information within a table on a Application. 6. An Accessibility checkpoint checks the web page for Section 508 compliance. 7. An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your web application. 8. A database checkpoint checks the contents of databases accessed by your. 9. In how many ways we can add check points to an application using QTP? A). We can add checkpoints while recording the application or we can add after recording is completed using Active screen (Note: To perform the second one The Active screen must be enabled while recording). 10.How does QTP identifies the object in the application. A). QTP identifies the object in the application by Logical Name and Class. For example: The Edit box is identified by Logical Name: PSOPTIONS_TIME20 Class: Web Edit. 11. If an application names is changes frequently i.e while recording it has name A). “Window1” and then while running its “Window2” in this case how does QTP handles? QTP handles those situations “Regular Expressions” . 12.What is parameterizing Tests? www.ramupalanki.com
  • 25. For more QTP Scripts, visit www.ramupalanki.com A). When you test application, you may want to check how it performs the same operations with multipie sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data. 13.What is test object model in QTP? A). The object model is a large set of object types or classes that Quick Tests uses to represent the objects in your application. Each test object class has a list of properties that can uniquely identify objects of that class and a set of relevant methods that Quick Test can record for it. A test object is an object that Quick Test creates in the test or component to represent the actual object in your application Quick Test stores information about the object that will help it identify and check the object during the run session. A run-time object is the actual object in your web site or application on which methods are performed during the run session. When you perform an operation on your application while recording.  Identifies the Quick Test test object class that represents the object on which you performed the operation and creates the appropriate test object  Reads the current value of the object’s properties in your application and stories the list of properties and values with the test object.  Chooses a unique name for the object, generally using the value of one of its prominent properties.  Records the operation that you performed on the object using the appropriate Quick Test test object method. For Example, suppose you click on a Find button with the following HTML source code: <INPUT TYPE=”submit”NAME =”find”VALUE=”Find”> Quick Test identifies the object that you clicked as a Web Button test object. It creates a Web Button object with the name Find, and records the following properties and values for the Find Web Button: It also records that you performed a Click method on the Web Button. Quick Test displays your step in the keyboard view like this: Quick Test displays your step in the Expert View like this: Browser(“Mercury Interactive”).page(“Mercury Interactive”) . Web Button (“Find”).Click 14.What is Object Spy in QTP? A). Using the Object Spy, you can view the properties of any object in open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object’s hierarchy tree and its properties and values in the properties tab of the Object Spy dialog box. 15.What is the Difference between Image check-point and Bitmap check- point? A). Image checkpoint enable you to check the properties of web image. You can check an area of a Web page or application as a bitmap. While creating a test www.ramupalanki.com
  • 26. For more QTP Scripts, visit www.ramupalanki.com of component, you specify the area you want to check by selecting an object you can check an entire object or any area within an object. Quick Test captures the specified object as a bitmap, and inserts a checkpoint in the test or component. You can also choose to save only the selected area of the object with your test or component in order to save disk space For example, suppose you have a web site that can display a map of a city the user specifies. The map has control keys for zooming. You can record the new map that is displayed after one check on the control key that zooms in the map. Using the bitmap checkpoint, you can check that the map zooms in correctly. You can create bitmap checkpoints all supported testing environments (as long as the appropriate add-ins are loaded). Note: The results of bitmap checkpoints may be affected by factors such as operating systems, screen resolution, and color settings. 16.How many ways we can parameterize data in QTP? A). There are four types of parameters: Test action or component parameters enable you to use values passed From your test or component or values from other actions in your test. Data Table parameters enable you to create a data-driven test (or act on) That runs several times using the data you supply. In each repetition, or iteration, Quick Test uses a different value from the Data Table Environment variables parameters enable you to use variable values from Others sources during the run session. These may be values you supply, or values that Quick Test generates for you based on conditions and options you choose. Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application hadles small and large ticked orders, you can have Quick Test generate a random number and insert it in a number of ticket edit field. 17.How do you do batch testing in WR & is it possible to do in QTP, if so explain? A). Batch Testing in WR is nothing but running the whose test set by selecting “Run Test set” from. The “Execution Grid”. The same is possible with QTP also. If our test cases are automated then. By selecting “Run Test set” all the test scripts can be executed. In this process the Scripts. Get executed one by one by keeping all the remaining scripts in “Waiting” mode. 18.If i give some thousand tests to execute in 2 days what do you do? A). Adhoc testing is done. It coverts the least basic functionalities to verify that the system www.ramupalanki.com
  • 27. For more QTP Scripts, visit www.ramupalanki.com Is working fine 19.What does it mean when a check point is in red color? What do you do? A). A red color indicates failure. Here we analyze the cause for failure whether it is a Script Issue or Environment Issue or a Application issue. 20.What do you call the window TestDirector - testlab? A). “Execution Grid”. It is place from whether we Run all Manual/Automated Scripts 21.How do you create new test sets in TD A). Login to TD. Click on “Test Lab” tab. Select the Desired folder under which we need to create the test set. (Test sets can be grouped as per module). Click on “New Test Set or Ctrl+N” Icon to create a Test Set. 22.How do you do batch testing in WR & is it possible to do in QTP, if so explain? A). You can use Test Batch Runner to run several tests in succession. The results for each test are stored in their default location. Using Test Batch Runner, you can set up a list and save the list as an .mtb file, so that you easily run the same batch of tests again, at another time. You can also choose to include or exclude a test in your batch list from running during a batch run. 23.How to Import data from a “.xls” file to Data table during Runtime. A). Datatable.Import “…XLS file name…” Datatable.Importsheet(FileName, SheetSource, SheetDest) Datatable>ImportSheet “C:name.xls”,1,”name”. 24.How to export data present in Database to an “.xls” file? A). DataTable.Export “….xls file name…” 25. What do you to script when object are remove from application? 26.Syntact for how to call one script from another? And syntax to call one “Action” in another? A). 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 rnfIterations. Enter the row range (i.e “1.7”); or enter rngAll to run iterations on all rows. www.ramupalanki.com
  • 28. For more QTP Scripts, visit www.ramupalanki.com 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. 27.How to export QTP results to an “.xls” file? A). By default it creates an “XML” file and displays the results. 28.3 differences between QTP & WinRunner? A). (a) QTP is object bases Scripting (VBS) where WinRunner is TSL (C based) Scriptting. (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. (f) Definitions and create checkpoints after having record 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. 29.How to add a Runtime parameter to a datasheet? A). DataTable.LocalSheet The following example uses the LocalSheet property to return the local sheet of The run-time Data Table in order to add a parameter (column) to it. My param=DataTable.LocalSheet.AddParameter(“Time”,”5:45”) 30.What scripting language is QTP of? A). Vbs. 31.Analyzing the Checkpoint results? A). Standard Checkpoint: 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. 32.Table and DB Checkpoints: A). By adding table checkpoints to your tests or components, you can check that a specified value. Is display in a cell in a table on your application. By adding database checkpoints to your. Tests or components, you can check the contents of database accessed by your application. www.ramupalanki.com
  • 29. For more QTP Scripts, visit www.ramupalanki.com The results displayed for table and database checkpoints are similar. When you run test or Component, Quick Test compares the expected results of the check points to the actual results of The run session, If the results do not match, the checkpoint fails. You can check that a specified value is displayed in a cell in a table by adding a table. Chechpoint to your test or component. For Activex tables, you can also check the properties of The table object. To add a table checkpoint, you use the Checkpoint properties dialog box. Table checkpoints are supports for Web and AvtiveX applivation, as well as for variefy of External add-in environments. You can use database checkpoints in your test or component to check databases accessed by your Web site or application and to delete defects. You define a query on your database, and then You create a database checkpoint that checks the results of the query. Database checkpoints are supported for all environments supported by Quick Test, by default, as Well as for a variety of external add-in environments There are two ways to define a database query (a) Use Microsoft Query. You can install Microsoft Query from the custom installation of Microsoft Office. (b) Manually define an SQL statement. The checkpoints timeout option is available only when creating a table checkpoint. It is not Available when creating a database checkpoint 33.Checking Bitmaps: A). You can check an area of a web page or application as a bitmap. While creating a test or component, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. Quick Test captures the specified object as a bitmap, and inserts a checkpoint in the test or component. You can also choose to save only the selected area of the object with your test or component in order to save disk space. When you run the test or component, Quick Test compares the object or selected area of the object currently displayed on the web page or application with the bitmap stored when the test or component was recorded. If there are differences, Quick Test captures a bitmap of the actual object and displays it with the expected bitmap in the details portion of the Test Results window. By comparing the two bitmaps (expected and actual), you can identify the nature of the discrepancy. For more information on test results of a checkpoint, see Viewing Checkpoint Results. For example, suppose you have a web site that can display a map of city the user specifies. The map has control keys for zooming. You can record the new map that is displayed after one click on the control key that zooms in www.ramupalanki.com
  • 30. For more QTP Scripts, visit www.ramupalanki.com the map. Using the bitmap checkpoint, you can check that the map zooms in correctly. You can create bitmap checkpoints for all supported testing environments (as long as the appropriate add-ins are loaded). Note: The results of bitmap checkpoints may be affected by factors such as operating system, screen resolution, and color settings. 34.Text/Text Area checkpoint: A). In the Text/Text Area Checkpoint propertied dialog box, you can specify the text to be checked as well as which text is displayed before and after the checked text. These configuration options are particularly helpful when the text string you want to check appears several times or when it could change in a predictable way during run session. Note: In windows-based environments, if there is more than one line of text selected, the Checkpoint Summary pane display [complex value] instead of the selected text for the checkpoint. Quick Test automatically displays the Checked Text in red and the text before and after the checked text in blue. For text area checkpoints, only the text string captured from the defined area is displayed (Text Before and Text After are not displayed). To designate parts of the captured string as checked Test and other parts as Text Before and Text After, click configure button. The Configure Text Selection dialog box opens. Checking XML : XML (Extensible Markup Language)is a meta-makeup language for text documents that is endorsed as a standard by the W3C. XML makes the complex data structure portable between different computer environments/operating systems and programming languages, facilitating the sharing of data. XML files contain text with simple tags that describe the data within an XML document. These tags describe the data content, but not the presentation of the data. Applications that display an XML document or file use either Cascading style sheets (CSS) of XSL Formatting objects (XSL-FO) to present the data. You can verify the data content of XML files by inserting XML checkpoints. A few common uses of XML checkpoints are described below: An XML file can be a static data file that is accessed in order to retrieve commonly used data for which a quick response times is needed-for example, country names, zip codes, or area codes. Although this data can change over time, it is normally quite static. You can use an XML file checkpoint to validate that the data has not changed from one application release to another. An XML file can consist of elements with attributes and values (character data). There is a parent and child relationship between the elements, and elements can have attributes associated with them. If any part of this structure (including data) changes, you application’s ability to process the XML file may be affected. Using an XML checkpoint, you can check the content of an element to make sure that its, attributes, and values have not changed. www.ramupalanki.com
  • 31. For more QTP Scripts, visit www.ramupalanki.com XML files are often an intermediary that retrieves dynamically changing data from one system. The data is then accessed by another system using Document. Type Definitions (DTD), enabling the accessing system to read and display the information in the file. You can use an XML checkpoint and parameterize the captured data values in order to check an XML document or file whose data changes in a predictable way. XML documents and files often need a well-defined structure in order to be portable across platforms and development systems. One way to accomplish this is by developing an XML scheme, which describes the structure of the XML elements and data types. You can use scheme validation to check that each item of content in an XML file adheres to the scheme description of the element in which the content is to be placed. 35.Object Repositories types, which & when to use? A). Deciding which Object Repository Mode to Choose To choose the default object repository mode and the appropriate object repository mode for each test, you need to understand the differences between the two modes. In general, the object repository per-action mode is easiest to use when you are creating simple record and run tests, especially under the following conditions: You have only one, or very few, tests that correspond to a given application, interface, or set of objects. You do not expert to frequently modify test object properties. You generally create single-action tests Conversely, the shared object repository mode is generally the preferred mode when: You have several tests that test elements of the same application, interface, or set of objects. You expert the object properties in your application to change from time to time and/or you regularly need to update or modify test object properties. You often work with multi-action tests and regularly use the Insert copy of Action and Insert Call to Action options. 36.Can we Script any test case with out having object repository? Or Using Object Repository is a must? A). No. U can script with out Object repository by knowing the window Handlers, spying and recognizing the Objects logical names and properties available. 37.How to execute a WinRunner Script in QTP? A). (a)TSL Test.RunTest, Testpath, TestSet. [parameters] --> Used in QTP 6.0 used for backward compatibility. Parameters: The test set within Quality Center, in which test runs are stored. Note that this argument is relevant only when working with a test in a Quality Center Project. When the test is not saved in Quality Center, this parameter is ignored. e.g: TSLTest.RunTest “D:test1”,”” www.ramupalanki.com
  • 32. For more QTP Scripts, visit www.ramupalanki.com (b). TSLTest.RunTestEx TestPath, RunMinimized, CloseApp, [parameters] TSLTest.RunTestEx “C:WinRunnerTestsbasic_flight”, TRUE, FALSE, “MyValue”. CloseApp: Indicates whether to close the WinRunner application when the WinRunner test run ends. Parameters: Up to 15 WinRunner function argument. 38.How to handle Run-time errors? A). 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 Resumes 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”. 39.How to change the run-time value of property for an object? A). SetToproperty changes the property values used to identify an object during the test run. Only properties that are included in the test object description can be set. 40.How to retrieve the property of an object? A). Using “GetRoproperty”. 41.How to open any application during Scripting? A). SystemUtil, Object used to open and close applications and processes during a run session. (a). A SystemUtil.Run statement is automatically added to your test when you run an application from the start menu or the Run dialog box while recording a test. Eg: SystemUtil.Run “Notepad.exe” SystemUtil.closeDescendentprocesses (closes all the processes opened by QTP) 42.Types of properties that Quick Test learns while recording? A). (a). Mandatory (b). Assistive. In addition to recording the mandatory and assistive properties specified in the object Identification dialog box, Quick Test can also record a bank up 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. 43.What is the extension of script and object repository files? A). Object Repository: .tsr, Script: .mts, Excel: Default.xls www.ramupalanki.com
  • 33. For more QTP Scripts, visit www.ramupalanki.com 44.How to suppress warnings from the “Test results page”? A). From the Test results Viewer “Tools>Filters>Warnings”…must be “Unchecked”. 45.When we try to use test run option “Run from Step”, the browser is not launching automatically why? A). This is default behaviour. 46.Does QTP is “Unicode” compatible? A). QTP 6.5 is not but QTP 8.0 is expected to be Unicide compatabile by end of December 2004. 47.How to “Turn off” QTP results after running a script? A). Goto “Tools>Option>Run Tab” and Deselect “View results when run session ends”. But this suppresses only the result window, but a log will be created and can viewed manulaly which cannot be restricted from getting created. 48.How to verify the cursor focus of a certain field? A). Use “Focus” property of “GetRoProperty” method. 49.Any limitation to XML checkpoints? A). Mercury has determined that 1.4MB is the maximum size of XML file that QTP 6.5 can handle. 50.How to make arguments optional in a function? A). This is not possible as default VBS doesn’t support this. Instead you can pass a blank scring and have a default value if arguments are not required. 51.How to covert a string to an interger? A). CInt()--- > a conversion function available. 52.Inserting a call to Action is not Importing all columns in Datatable of globalsheet. Why? A). Inserting a call to action will only Import the columns of the Action called. www.ramupalanki.com