qtp - objective questions & answers

18
1) Identify the recording mode, by which you can record the non-standard object in QTP A) Standard recording B) Analog recording C) Low level recording D) None 2) By default, how many no of tables would be there in a script? a) One b) Two c) Three d) Four 3) By default, how many no of actions would be there in a script? a) One b) Two c) Three d) Four 4) The file extension of Local object repository file is a) .MTR b) .TSR c) .QRS d) None 5) The file extension of Shared object repository file is a. .MTR b. .TSR c. .QRS d. None 6) When a procedure is created in the Function Library editor, what is the extension of the file? A. .INI B. .TXT C. .QFL

Upload: kapil-samadhiya

Post on 11-Apr-2015

19.086 views

Category:

Documents


5 download

DESCRIPTION

This is Useful document for all Testing Professional. Specially for Testers who are working on Automation Testing and need to learn more about : Quick Test Professional (QTP) Test Automation Tool.Please go through it ans feel free to ask in case of any doubt.GOOD LUCK !Kapil Samadhiya

TRANSCRIPT

Page 1: QTP - Objective Questions & Answers

1)      Identify the recording mode, by which you can record the non-standard object in QTP

 A)    Standard recordingB)    Analog recordingC)    Low level recordingD)    None

 2)      By default, how many no of tables would be there in a script?

a)      Oneb)      Twoc)      Threed)     Four

 3)      By default, how many no of actions would be there in a script?

a)      Oneb)      Twoc)      Threed)     Four

 4)      The file extension of Local object repository file is

a)      .MTRb)      .TSRc)      .QRSd)     None

 5)      The file extension of Shared object repository file is

a.       .MTRb.      .TSRc.       .QRSd.      None

 6)      When a procedure is created in the Function Library editor, what is the extension of the file? 

A.     .INIB.     .TXTC.     .QFLD.     .VBS

 7)      What are the categories in the Step Generator? 

E.      Object, Operation, ValueF.      Library, Built-in, Local ScriptG.     Operation, Arguments, Return ValueH.     Test Objects, Utility Objects, Functions

 8)      In Test Settings -> Run the Data Table iteration options are for which data sheet? 

Page 2: QTP - Objective Questions & Answers

I.        LocalJ.       GlobalK.     Run-time Data TableL.      Design-time Data Table 

9)      What can you use to handle unpredictable testing exceptions? 

M.    A Do LoopN.     Recovery ScenarioO.     IF Then statementP.      Select Case statement 

10)  In which command can you associate a function library to a test? 

Q.     Run OptionsR.     Test SettingsS.      View OptionsT.      Function Definition Generator

 11)  To invoke the function which does not return any value, we can use

 a.       call function nameb.      function namec.       Both A & Bd.      None

 12)  The result of the checkpoints can be stored in a variable

a.       Trueb.      False

 13)  Parameterization generally involves

a.       Data tableb.      Random numberc.       Environmentd.      Both A & Be.       Both A, B & C

 14)  The file which is used for recovering from the run time errors known as

                                                                           i.      QRS                                                                        ii.      TSR                                                                      iii.      PNG                                                                      iv.      DAT 

15)  Among the following recording modes, which method uses both the objects and mouse coordinates

 a.       Normal

Page 3: QTP - Objective Questions & Answers

b.      Low levelc.       Analogd.      All of the above

16)  Where do you set the action iterations for a specified action? 

a.       Action Settingsb.      Action Propertiesc.       Action Run Propertiesd.      Action Call Properties

 17)  Where do you mark an action as reusable?

 a.       Action Settingsb.      Action Propertiesc.       Action Run Propertiesd.      Action Call Properties

 18)  After running a test that contains both input and output parameters, where can the results of

an output parameter be found? 

a.       Local Data Sheetb.      Global Data Sheetc.       Run-time Data Tabled.      Design-time Data Table

 19)  If you have a Virtual Object Collection stored on your machine, and you don’t want to use it

what you must do? 

a.       Disable Virtual Objects in Test Settingsb.      Remove the Collection from your machinec.       Disable Virtual Objects in General Optionsd.      Remove the Collections from the Resources list

 20)  Which method for the Data Table utility object will allow you to retrieve information from

the Data Table during a test run? 

a.       Valueb.      Importc.       GetCelld.      GetValue

 21)  Statement to return the value from the function

                                                                           i.      Return (return value)                                                                        ii.      Exit (Return value)                                                                      iii.      Function name = Return value                                                                      iv.      None 

22)  constant “2” with the reporter statement returns  

Page 4: QTP - Objective Questions & Answers

a.       Passb.      Failc.       Doned.      Warning

  

23)  The standard timing delay for windows application is                                                                            i.      20 seconds                                                                        ii.      60 seconds                                                                      iii.      Infinite                                                                      iv.      100 seconds 

24)  The standard timing delay for web based application is                                                                           i.      20 seconds                                                                        ii.      60 seconds                                                                      iii.      Infinite                                                                      iv.      100 seconds

 25)  In VB Script functions, which one is false among the following

 a.       Variables must be declared before useb.      Variables may not be declared before usec.       Variables  may be declared without data types

None  

26)  What does the source property of a database checkpoint object represent? 

A.     The SQL queryB.     The identification number of the databaseC.     The number of rows returned from the queryD.     The connection string used to connect to the database

 27)  What is created, by default, with each new action?

 A.     Local Data Sheet, Global Data Sheet, FolderB.     Local Object Repository, Local Data Sheet, FolderC.     Global Data Sheet, Local Object Repository, FolderD.     Local Data Sheet, Global Data Sheet, Local Object Repository 

28)  What are the available environment variable types? 

A.     Built-inB.     User-definedC.     User-functionD.     Built-in, User-definedE.      Built-in, User-function

Page 5: QTP - Objective Questions & Answers

 29)  If the Global Data sheet contains no data and the Local Datasheet contains two rows of data,

how many times will the test iterate? 

A.     1B.     2C.     3D.     5 

30)  What is the first thing that must be defined in a Recovery Scenario? 

A.     TriggerB.     Recovery OperationC.     Recovery Scenario NameD.     The Function used in the scenario

 31)  To count the no of rows in a table

 a.       getrowcountb.      Getlinecountc.       Getcountd.      Count

 32)  Object which is used for calling the win32 api functions in QTP, we use

                                                                           i.      extern                                                                        ii.      description                                                                      iii.      environment                                                                      iv.      None 

33)  By default, the all actions in QTP are 

a.       non – reusableb.      reusablec.       external d.      None

 34)  The active screen images are stored in a file called

a.       GIFb.      BMPc.       JPEGd.      PNG

 35)  To refer the global data sheet, we can use the statement

 a.       dtglobalsheetb.      Globalc.       Both A & B

Page 6: QTP - Objective Questions & Answers

d.      None  

36)  What are bitmap checkpoints sensitive to? 

A.     Image size and object typeB.     Object type and image typeC.     Screen resolution and object typeD.     Screen Resolution and image size  

37)  If the Local Data sheet contains two rows of data, how many times will the action iterate, by default?

 A.     1B.     2C.     3D.     5

 38)  How do you close the database session after examining the results of an SQL query?

 A.     Call the ADO.Close functionB.     Use the close method for the RecordSet objectC.     Set the RecordSet and Connection objects equal to NothingD.     Use the close method for the RecordSet and Connection objects 

39)  What are the available trigger event types? 

A.     Pop-up window, object state, VBScript eventB.     Object state, VBScript event, Application crashC.     Pop-up window, object state, test run error, QTP crashD.     Pop-up window, object state, test run error, Application crash 

40)   What is the keyword used to define how the counter variable in a For Next loop increments? 

A.     ++B.     NextC.     SkipD.     Step

41)  Select Case statement is end with                                                               i.      end case                                                            ii.      exit case                                                          iii.      esac                                                          iv.      end select 

42)  To specify the “Not Equal to” in QTP, symbol used is 

A.    !=B.     <> 

Page 7: QTP - Objective Questions & Answers

C.     NOT =D.    ==

 43)  which one is the default data type of QTP

 A.    integerB.     StringC.     VariantD.    Double

 44)  To differentiate similar objects in one screen, QTP uses

 A.    object identificationB.     Smart identificationC.     Object repositoryD.    Object spy

 45)  To use the non-standard windows object, we can go for

 A.    Object spyB.     Virtual objectsC.     Object identificationD.    None

 46)  What are the two most commonly used ADO objects?

 A.     FieldsB.     ExecuteC.     Connection, RecordSetD.     Open, ConnectionString

 47)  How do you declare a constant?

 A.     Dim statementB.     Con statementC.     Const statementD.     Option Explicit statement

 48)  What method is used to retrieve the number of columns in the query results?

 A.     Fields.CountB.     Fields.Item(EOF)C.     Fields.Count(BOF)D.     Fields.Count.Value

 49)  To bypass the Object Repository you can:

 A.     Turn the Object Repository offB.     Use a programmatic description

Page 8: QTP - Objective Questions & Answers

C.     Delete all objects in all repositoriesD.     Add the object to the Object Repository Manager 

50)  What does the ChildObjects method return? 

A.     A Collection objectB.     A string true/ falseC.     A Boolean TRUE/ FALSED.     The number of objects matching the ChildObject description

 51)  To use the constant timing delay between process, QTP uses,

a.       waitb.      pausec.       Synchronization pointd.      None

 52)  To terminate the script execution, during running, QTP uses

a.       Exit runb.      Stop runc.       Quitd.      None

53)  We can access the objects of the application without using object repository. 

a.       Trueb.      False

 54)  Checkpoints statements can be manually added to the script without using menus.

 a.       Trueb.      False

 55)  while statement always end with

 a.       end whileb.      End doc.       Wendd.      Loop

56)  What object is used to read information from a text file? 

a.       Readb.      ReadLinec.       TextStreamd.      FileSysteme.       OpenTextFile

 57)  If you are typing in Expert View and you type an object followed by a dot, what does th

QuickTest display? 

Page 9: QTP - Objective Questions & Answers

a.       Nothingb.      The arguments for that objectc.       The methods and properties for that objectd.      The child objects and methods for that object

 58)  By default, how does QuickTest pass arguments to the procedure?

 a.       ByValb.      ByRefc.       ByArgd.      ByRes

 59)  What object is used to send information to test results at the completion of the test run

 a.       Resultb.      Reporterc.       ReportEventd.      ResultReport

 60)  If a procedure is defined in a test script, that procedure is accessible to which tests/ scripts?

 a.       Only to other proceduresb.      It is not usable to any test scriptsc.       The test script in which it is definedd.      Using the Step Generator, it is available to any test script

 61)  Do statement always end with

 a.       end whileb.      End doc.       Wendd.      Loop

 62)  Utility to measure the timing delays between transactions, we use

 a.       synchronizationb.      syncc.       servicesd.      wait

 63)  If the same object is present in the local and shared repository, QTP will refer which

one? 

a.       shared b.      Localc.       Both A & Bd.      None

 64)  The default addins with QTP are

Page 10: QTP - Objective Questions & Answers

a.       Active Xb.      Visual Basicc.       Webd.      All of the above

 65)  Which one is not true about “Copy of action”

a.       Tester can edit the scriptb.      Tester can’t edit the scriptc.       Tester can view the scriptd.      None

 66)  When does a Do loop statements evaluate for continuation?

 A.     At the end of the loopB.     At the start of the loopC.     At the start or the end of the loopD.     This loop uses a counter varaible

 67)  How can you retrieve the number of items in the list for a WebList object?

 A.     GetListB.     GetItemC.     GetItemsCountD.     GetROProperty

 68)  What is the difference between a subroutine and a function?

 A.     A subroutine can call itself; a function cannotB.     A function returns a value; a subroutine cannotC.     A function can accept arguments; a subroutine cannotD.     A subroutine can call other procedures; a function cannot

 69)  What method is used to send a run-time Data sheet to an Excel file?

 A.     SendB.     ExportC.     SendSheetD.     ExportSheet

 70)  What looping statements are available in QuickTest?

 A.     While end, Do Loop, If ThenB.     Switch Case, If Then, For NextC.     For Next, While end, Do LoopD.     For Next, Do Loop Switch Case

71)  Which one is not true about “Call of action” 

A.    Tester can edit the script

Page 11: QTP - Objective Questions & Answers

B.     Tester can’t edit the scriptC.     Tester can view the scriptD.    None

 72)  Which one is true about “Do” statement

                                                               i.      End with “Loop while false”                                                            ii.      End with “Until True”                                                          iii.      End with “Wend”

d)   Both A and B

73)  Checkpoint which is being used for verifying the web page with W3C standard is  

A.    Bitmap checkpointB.     Standard checkpointC.     Accessibility checkpointD.    XML checkpoint 

74)  Planning for the no of iteration for the action is done at 

                                                              i.      Action properties                                                            ii.      Action call properties                                                          iii.      Call to existing action                                                          iv.      None 

75)  To enter the non-executable statement in QTP , we use 

A.    single quotesB.     RemC.     Both  A and BD.    None

 76)  What does the GetTOProperty method do?

 A.     Retrieves the value of a property from a test objectB.     Retrieves the available properties from a test objectC.     Retrieves the value of a property from a run-time objectD.     Retrieves the available properties from a run-time object

 77)  To use low-level recording, what must you do first?

 A.     Start a new testB.     Be in the Keyword viewC.     Be recording in Normal modeD.     Click Low Level Recoding under the Automation Menu

 78)  What is the correct set of add-ins installed automatically with QuickTest 9.2?

 

Page 12: QTP - Objective Questions & Answers

A.     Net, Web, JavaB.     Web, SAP, Visual BasicC.     Active X, Visual Basic, WebD.     Active X, TE, Web Services

 79)  What information can be seen in the information pane?

 A.     Syntax errorsB.     The test name and authorC.     The QTP license informationD.     The machine id and operating system

    

80)  What does a breakpoint do? 

A.     Stops test execution at the specified step, after executing that stepB.     Stops test execution at the specified step, before executing that stepC.     Pauses test execution at the specified step, after executing that stepD.     Pauses test execution at the specified step, before executing that step

 81)  Which of the following is an example of a missing resource?

 A.     An objectB.     Run ResultsC.     A Regular ActionD.     An External Action

 82)  What are the available step commands in QuickTest?

 A.     Step, step Into, Step OutB.     Step Into, Step Over, Step OutC.     Step Test, Step Action, Step FunctionD.     Run from Step, Debug from Step, Run from Step

 83)  When a test is run in update mode, what is updated?

 A.     The test resultsB.     The object descriptionsC.     The action names in the testD.     The logical names in the test

 84)  What are the phases in the QuickTest workflow?

 A.     Plan, Record, Enhance, RunB.     Prepare, Record, Verify, RunC.     Plan, Create, Verify & EnhanceD.     Prepare, Create, Verify & Enhance, Integrate

 85)  Why is low-level recording mode useful?

Page 13: QTP - Objective Questions & Answers

 A.     It records exact keyboard operations on an object. B.     It records exact coordinates of all mouse movements.C.     It uses the object repository to determine what methods can be used.

 86)  What are test object properties?

 A.     Those properties as defined in a description object.B.     Those properties as defined in Object IdentificationC.     Those properties displayed by an object at run-timeD.     Those properties used in the Object Repository for an object identification   

87)  What is the function of the Object Repository Manager? 

A.     Assign variable names to test objectsB.     View/ Make/ Modify a Local Object RepositoryC.     View/ Make/ Modify a Shared Object RepositoryD.     Define new test objects using programmatic descriptions

   

88)  Where are virtual object collections stored? 

A.     In a Function LibraryB.     In the local Object RepositoryC.     In the Object Repository ManagerD.     Dat folder inside of the QTP installation directory   

89)  In the Object Identification dialog box, which properties can be viewed? 

A.     The base filter and optional propertiesB.     The mandatory and optional propertiesC.     The base filter and assistive propertiesD.     The mandatory and assistive properties

 90)  Where do you turn Smart Identification IN?

 A.     The Object RepositoryB.     The Test Settings dialogC.     The General Options dialogD.     The Object Identification dialog

 

Page 14: QTP - Objective Questions & Answers

91)  How do you know if Smart Identification has been used in a test? 

A.     The Smart Identification icon appears in the test resultsB.     The test results will show a run error, causing a test failureC.     The properties used by the object repository will be changedD.     The Object Repository will show the Smart Identification icon

 92)  What options are available to filter objects in the Target Object Repository pane when

merging object repositories? 

A.     Show all objects or Show only objects with conflicting object typesB.     Show all objects or Show only objects with conflicting descriptionsC.     Show only objects with conflicting logical names or Show only objects with conflicting

object typesD.     Show only objects with conflicting logical names or Show only objects with conflicting

descriptions 

93)  What is the default ordinal identifier? 

A.     The locationB.     The object idC.     The nativeclassD.     The index number

  

94)  Which statement is used to associate a procedure with a test object class? 

A.     RegisterFunctionB.     RegisterUserProcC.     RegisterUserFuncD.     RegisterProcedure