QTP Interview questions

Document Sample
QTP Interview questions Powered By Docstoc
					 More such tips – http://softwaretesting.supergoodtips.com . For
  more tips on testing follow me on Twitter - @TriagedTester



QUESTIONS & ANSWERS

  1. Different Types of Recording
  1. Analog and Context sensitive.
     Analog for graphical applications and

     Context sensitive for Event driven applications




  2. Different Types of Play back


  2. Verify – Default way and it will give the result
     Debug – To check the syntax error and flows, without result

     Update – To update the expected result of checkpoint




  3. Different Types of Check points
  3. Gui Checkpoint – single Property, object/window and multiple objects.
     Bitmap checkpoints -- object/window and screen area.

     Database Check Points – Default, Custom, Runtime




  4. Different Types of Synchronization points
  4. Object/window Property, Object/window bitmap, Screen bitmap.
     Automatic synchronization – web_sync and set_window.

     Hard code – Wait
More such tips – http://softwaretesting.supergoodtips.com . For
 more tips on testing follow me on Twitter - @TriagedTester

5. What is compiled module
5. Compiled module is one type of script which is used to create the functions which can be called
   from any scripts




6. Different Types of exception Handling
More such tips – http://softwaretesting.supergoodtips.com . For
 more tips on testing follow me on Twitter - @TriagedTester

6. Object exception, Popup Exception, Tsl Exception




7.      How to call function in compiled module?
7. First we have to load the module using reload(“Path”,<1>,<1>); Then we can call directly the
   function and finally we have unload the module



8.     What is startup script
More such tips – http://softwaretesting.supergoodtips.com . For
 more tips on testing follow me on Twitter - @TriagedTester

8. Startup script is script which will load when winrunner opens. In Startup script we have to put
   Gui_load, reload of modules, constants, and function generator codes


9.     How to do data driven test
9. There is a wizard Data driven wizard. First that will select the code and it will ask the file name
   path and parameter name for all hard coded values. If u want you can skip also. It will create the
   script to open take the values and close it




10.      When to do data driven test
10. if the application is behaving for different data then we have to use data driven method.




11.    What is GUI Map file
11. GUI map file is the file which contains all the objects logical name and physical description




12.    What are two types of modes in using GUI Map?
12. Global GUi Map mode
    GUI Map file per test Mode




13.      If u select file per test script what is the gui map name and path?
13. file name is default.gui and
      path is script path




14.     When u save the file what winrunner will do?
14. It will create the following folders db and exp. if checkpoints in the script it will create chklist
    folder also. If u run in debug mode it will create debug folder. If u run in verify it will ask the
    folder name and it will create that folder.


15.      What is the concept behind in check points
More such tips – http://softwaretesting.supergoodtips.com . For
 more tips on testing follow me on Twitter - @TriagedTester

15. when u are creating the check point it will create two file, list* and gui*. This list* file will be
    stored in chklist folder and gui* will be stored in exp folder. List* file contains what are the
    objects and properties your are checkingand gui* fiel contains those expected result. So when u
    playback wirnunner will get the object and properties from list file and take those values. Then
    compare those values with expected result in gui file. If any mismatch then report it as fial




16.     What is the logic behind in recording and play back
16. While u r recording winrunner will capture the physical description of that object and store the
    description with one logical name in Gui map file. While u r playback take the logical description
    from the script and get the physical description for the logical description and recognize the
    control and do the actions.


17.     What is Spy
17. Spy is used to identity the objects. Spy will show the recognized properties and values as well as
    method for active x controls




18.      What is GUI Map configuration?
18. If the object is recognized as custom object we cant use the standard objects method. To
    overcome this problem we have to map the custom object to standard object. We can do the
    above using GUi map configuration. When u click gui map configuration you have to click Add. It
    will ask u to browse the control. After selecting the control it will show the list of standard
    objects. We have to select the appropriate standard object. We can specify the properties also
    to recognize. Then that will create following three statements
    set_class_map("_WwG", "object");

      set_record_attr("_WwG", "class regexp_MSW_class label", "attached_text MSW_id
      MSW_class", "location");

      set_record_method("_WwG", RM_RECORD);

      But this will work in only the current session. If u want permanent we have to paste the above
      statements in startup script




19.       What is virtual object wizard?
More such tips – http://softwaretesting.supergoodtips.com . For
 more tips on testing follow me on Twitter - @TriagedTester

19. Virutal object wizard is used to recognize the object as standard object. It will ask you to mark
    the control. Then we have to map the object to standard class. When u mark it will recognize
    the x and y coordinates of the object. Using these coordinates it will recognize




20.      In which situation you will the above two methods?
20. if the object is not at all recognized we have to use vitual object wizard. If the object is
    recognized but recognized as custom object then we have to use GUi map configuration




21.      What is the disadvantage of Virtual object vizard?
21. If the developer moved the object in the application it will fail as it is recognizing by co ordinates




22.     What is function generator?
22. function generator is used to add the functions in the winrunner. So that no need to open the
    compiled modules to see the functions.


23.     What is the difference b/n load and reload
23. Load--loads a compiled module into memory.
    Reload --removes a compiled module from memory and loads it again.



24.      What is the difference b/n call and call_close
24. call will open the script and execute and come back to the called script without closing the
    script.
    Call close will open the script and execute and close and come back to the called script.



25.     Have u used regular expression?
25. Yes .


26.      At what situation you will use regular expression? Example.
26. If the object is changing dynamically with certain logic then we can use regular expression.
    Example if u r recording something in the notepad. At that time window label is
    Chandra.Notepad. When u play back it is mohan.Notepad. So wirnunner cannot identify the
    notepad. SO what we have to do is change the physical description as “!.*Notepad”. ! means “=”
More such tips – http://softwaretesting.supergoodtips.com . For
 more tips on testing follow me on Twitter - @TriagedTester

      and * will replace any character. So winrunner can identify any window, which has the label,
      appended with any character with NotePad. The other one is “^.*Notepad”. Here ^ means not
      equal to


27.      In your application if the physical description is changing dynamically how will u handle the
         situation
27. if u know the description then we can add the object in gui map dynamically using gui_add


28.     Can u change the GUI Map contents dynamically
28. Yes we can use …..    gui_desc_get_attr
                                  and

                              gui_desc_set_attr



29.     What are the add ins u used
29. Visual Basic, Web_addin, Active x


30.      Which version u are using?
30. 7.0, 7.5, 6.0


31.     What are the problems u faced in your application and how u solved?
31. I have faced only recognize problems but I solved using GUI map configuration and virtual object
    wizard


32.    How parameterize the script?
32. We have to add parameters by selecting the test properties


33.     How to call the parameterized script
33. Using eval function eval("call_close \"" & StrProjectRoot & "\\LoginScript\""
      & "(\"" & StrSource & "\",\"" & StrDestination & "\");");


34.     Have u used file operations
34. Yes, file_open, file_getline,file_pritnf,file_close(0)


35.     Can Script can return the value
35. Yes, using treturn

36.      Have u used eval function?
More such tips – http://softwaretesting.supergoodtips.com . For
 more tips on testing follow me on Twitter - @TriagedTester

36. Yes


37.     Have u used texit function?
37. texit is used to exit the script at any time


38.     How to invoke application
38. invoke_application ()


39.    How to execute Dos command
39. dos_system


40.    How to open web application
40. web_browser_invoke ()


41.     Can we execute the scripts in different browse? If yes how?
41. Using browser name
42.     What is selective recording?
42. when u select selective recording winrunner will record only in that application




43.      When I record the application winrunner is not writing any script. What are the possible
         reasons?
43. if selective recording is on then we have to remove that option.
More such tips – http://softwaretesting.supergoodtips.com . For
 more tips on testing follow me on Twitter - @TriagedTester


44.     Can we record in both the modes in single script
44. Yes


45.     What is the disadvantage in analog recording
45. U cant use any functions and if the object moves script will fail


46.     Will update mode will update all the checkpoint expected result?
46. except single property check point

				
DOCUMENT INFO
Description: Document, Guidelines, templates to help any software tester.