QTP Questions and Answers

Q1. What are the Features and Benifits if Quick Test Professional?
Ans: It operates on stand-alone, or integrated into Memory Business process Testing and Mercury Quality Center. Introduces next-generation zero-configuration Keyword driven testing technology in Quick Test Professional 8.0 allowing for fast test creation, easier maintaince, and more powerful data-driven capability. Identifies objects with Unique Smart Object Recoginition, even if they change from build to build, enabling reliable unatteneded script execution. Collapses test documentation and test creation to a single step with Auto-documentation technology. Enables through validation of appliations through a full complement of checkpoints.
Q2. How to handle the exceptions using recovery scenario manager in QTP?
Ans:There are four trigger events during which a recovery scenario should be activated. A pop up window appears in an opened application during the test run: A property of an object changes its state or value, a step in the test does not run successfully, an open application fails during the test run, these triggers are considered as exceptions. You can instruct QTP to recover unexpected events or errors that occured in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps: 1. Triggered Events 2. Recovery steps 3. Post Recovery Test-Run
Q3.What is the use of Text output value in QTP?
Ans: Output values enable to view the values that the application talks during run time. When parameterized, the values change for each iteration. Thus by creating output values, we ca capture the values that the application takes for each run and output them to the data table
Q4. How to use the Object spy in QTP 8.0 version?
Ans: There are two ways to spy the objects in QTP:
1) Though file toolbar, In File Toolbar click on the last toolbar button (an icon showing a person with hat)
2) True Object repository Dialog, In object repository dialog click on the button object spy. In the object spy dialog click on the button showing hand symbol. The pointer now changes in to a hand symbol and we have to point out the object to spy the state of the object if at all the object is not visible or window is minimized then, hold the Ctrl button and activate the required window to and release the Ctrl button.
Q5. How does Run time data (Parameterization) is handled in QTP?
Ans: You can enter test data into the Data Table, an integrated spreadsheet with the full functionality of excel, to manipulate data sets and createmultiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files
Q6. What is keyword view and expert view in QTP?
Ans: Quick Test's keyword driven approach, test 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 VB Script that Quick Test Professional automatically generates. Any changes made in the expert view are automatically synchronized with the keyword view.
Q7. Explain about the Test Fusion Report of QTP?
Ans: Once a tester has run a test, a Test Fussion report displays all aspects of the test run: a high-level results overview, and expandable Tree View of the Test specifing exactly where application failuers occured, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explainations of each checkpoint pass and failure. By combining Test Fusion reports with Qucik Test Professional, you can share reports across an entire QA and development team
Q8. Which environment does QTP support?
Ans: Quick Test Professional supports functional tsting of all enterprise environments, including windows, web,..NET, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic, ActiveX, mainframe terminal emulators and Web services
Q9. What is QTP?
Quick Test is a grahical interface reocord-playback automation tool. It is 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, Quick Test Professional 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
Q10. Explain QTP Testing process.
Ans: QTP testing process consists of seven main phases:
1) Create your Test Plan: Prior to automating there should be detailed description of the test including the exact steps to follow, data to be input, and all items to be verified by the test. The verification information should include both data validations and existence or state verifications of objects in the application.
2) Recording a session on your application: As you navigate through your application, Quick Test graphically displays each step you perform in the form of collapsible icon based tree. A step is any user action that causes or makes a change in your site, such as clicking a link or image, or entering data in a form.
3) Enhancing the test: Inserting checkpoints into the test lets you search for a specific value of a page, object or text string, which helps to identify whether or not your applicationis functioning correctly. NOTE: Checkpoints can be added to a test as you record it or after the fact via the Active Screen. It is much easier and faster to add the checkpoints during the recording process. Broadening the scope of the test by replacing fixed values with parameters lets you check how the application performs the same operations with multiple sets of data. Adding logic and conditional statements to the test enables to add sophisticated checks to your test.
4) Debugging the test: If changes were made to the script, we need to debug it to check that it operates smoothly and without interruption.
5) Running the test on a new version of the application: You run a test to check the behavior of the application. While running, Quick Test connects to the application and performs each step in the test.
6) Analyzing the test results: You examine the test results to pinpoint defects in the application.
7) Reporting defects: As we encounter failuers in the application when analyzing test results, we need to create defect reports in the Defect Reporting Tool.
Q11. Explain the QTP Tool interface.
Ans: QTP tool interface contains the following key elements: Title bar, displaying the name of the currectly open test, Menu bar, displaying menus of Quick Test commands, File toolbar, containing buttons to assists in managing the tests, Test toolbar, containing buttons used while creating and maintaining tests, Debug toolbar, containing buttons used while debugging tests.
Note:The debug toolbar by choosing View - Toolbars - Debug. Action toolbar, containing buttons and a list of actions, enabling to view the details of an individual action or the entire test flow. Note: The Action toolbar is not displayed when you open Quick Test for the first time. You can display Action toolbar by choosing View - Toolbars - Action. If a reusable or external action is inserted in a test, the Action toolbar is displayed automatically. Test pane, containing two tabs to view your test-the Tree View and Expert View, Test Details pane, containing the Active Screen. data Table, containing two tabs, Global and Action, to assits you in parameterizing the test. Debug Viewer pane, containing three tabs to assist in debugging the test-watch expressions, variables and command (The Debug viewer pane can be opened only when a test run pauses at a breakpoint). Status bar, displaying the status of the test.
Q12. How does QTP recognize Objects in AUT?
Ans: Quick Test stores the defnitions for application objects in a file called the object repository. As you record the 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 phusical, descriptive properties.
Q13. What are the types of Object Repositories in QTP?
Ans: Quick Test has two types of object repositories for storing object information: shared object repositories and action object repositories. We can choose which type of object repository we want to use as the default type for new tests, and we 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 the test so that we can create and run tests without creating, choosing or modifing object repository files. However, if you do modify values in an action object repository, the changes do not have any effect on other actions. Therefore, if the same test object exists in more than one action and we can modify an object's property values in one action, we may need to make the same change in every action (and any test) containing the object.
Q14. Explain the check points in QTP?
Ans: A check point verifies that expected information is displayed in an application while the test is running. We can add eight types of check points to the test for standard web objects using QTP. A page check point checks the characteristics of an application. A text check point checks that a text string is displayed in the appropriate place on an application. An object check point (Standard) checks the values of an object on an application. An image check point checks the values of an image on an application. A table check point checks information within a table on a application. An accessibility check point checks the web page for Section 508 compliance. An XML check point checks the contents of individual XML data files or XML documents that are part of the web application. A database check point checks the contents of databases accessed by the web site.
Q15. In how many ways we can add check points to an application using QTP?
Ans: We can add check points 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).
Q16. How does QTP identify objects in the application?
Ans: QTP identifies the object in the application by logical name and class.
Q17. What is Parameterizing Tests?
Ans: When you test the application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how the application responds to ten seperate sets of data. We could record ten seperate tests, each with its own set of data. Alternatively, we can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.
Q18. What is test object model in QTP?
Ans: The test object model is a large set of object types or classes that Quick Test uses to represent the objects in the 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.
Q19. What is Object Spy in QTP?
Ans: Using the Object Spy, we can view the properties of any object in an open application. We 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.
Q20. What is the difference between Image check point and Bitmap check point?
Ans: Image check points enables to check the properties of a web image. We can check an area of a web page or application as a bitmap. While creating a test or component, we specify the area you want to check by selecting an object. We can check entire object or any area within an object. Quick Test captures the specified object as a bitmap, and insets a check point in the test or component. We can also choose to save only the selected area of the object with the test or component in order to save disk space. For example, suppose we have a web site that can display a map of a city the user specifies. The map has control keys for zooming. We can record the new map that is displayed after one click on the control key that zooms in the map. Using the bitmap check point, we can check that the map zooms in correctly. We can create bitmap check points for all supported testing environments (as long as the appropriate add-ins are loaded). Note: The results of bitmap check points may be affected by factors such as operating system, screen resolution and color settings.
Q21. How many ways we can parameterize data in QTP?
Ans: There are four types of parameters: Test, action or component parameters enable you to use values passed from the test or component, or values from other actions in the test. Data table parameters enable to create a data-driven test (or action) that runs several times using the data we supply. In each repetition, or iteration, Quick Test uses a different value from the Data table. Environment variable parameters enable to use variables values from other sources during the run sessions. these may be the values you supply, or values that Quick Test generates based on conditions and options we choose. Random number parameters enable to insert random numbers as values in the test or component. For example, to check how the application handles small and large ticket orders, we can have Quick Test generate a random number and insert it in a number of tickets edit field.
Q22. How do you do batch testing in Win runner and is it possible to do in QTP, if so explain?
Ans: Batch Testing in Win runner is running the whole test set by selecting Run Test set from the Execution Grid. The same is possible with QTP also. If 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.
Q23. If I give some thousand tests to execute in two days what do you do?
Ans: Adhoc testing is done. It covers the least basic functionalities  to verify that the system is working fine. 
Q24. What does it mean a check point is in red color? What do you do?
Ans: A red color indicates failure. Here we analyze the cause for failure whether it is a script issue, environment issue or an application issue.
Q25. What is Object spy in QTP?
Ans: Using the object spy, we can view the properties of any object in an open application. We can 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.
Q26. What is the file extension of the code file and object repository file in QTP?
Ans: Code file extension is .vbs and object repository is .tsr
Q27. Explain the concept of object repository and how QTP recognizes objects?
Ans: Object Repository: displays a tree of all objects in the current component or in the current action or entire test (depending on the object repository mode you selected). We can view or modify the test object description of any test object in the repository or to add new objects to the repository. QTP learns the default property values and determines in which test object class it fits. If is not enough it adds assistive properties, one by one to the description until it has compiled the unique description. If no assistive properties are available, then it adds a special ordinal identifier such as objects location on the page or in the source code.
Q28. What are the properties you would use for identifying a browser and page when using descriptive programming?
Ans: Name would be anotherproperty apart from title we can use.
Q29. Give me an example where you have used a COM interface in your QTP project?
Ans: com interface appears in the scenario of front end and back end. For example if you are using oracle as back end and front end as VB or any language then for better compatibility we will go far an interface of which COM will be one among those interfaces. Create Object creates handle to the instance of the specified object so that we program can use the methods on the specified object. It is used for implementing automation (as defined by Microsoft).
Q30.Explain in brief about the QTP automation Object Model.
Ans: Essentially all configuration and run functionality provided via the Quick Test interface is in some way represented in the Quick Test automation object model via objects, methods and properties. Although a one-on-one comparison cannot always be made most dialog boxes in Quick Test have a corresponding automation object, most options in dialog boxes can be set and/or retrived using the corresponding object property, and most menu commands and other operations have corresponding automation methods. We can use the objects, methods and properties exposed by the Quick Test automation object model along with standard programming elements such as loops and conditional statements to design the program.
Q31. What is the abbrevation of QTP?
Ans: Quick Test Professional
Q32. What is QTP?
Ans: QTP is was Mercury Interactive Functional Testing Tool now its HP has owned it.
Q33. What is the basic concept of QTP?
Ans: QTP is based on two concept
1) Recording
2) Playback
Q34. Which scripting language used by QTP?
Ans: QTP uses VB scripting
Q35. How many types of recording facility are available in QTP?
Ans: QTP provides three types of recording methods
1) Context Recording (Normal)
2) Analog Recording
3) Low level Recording
Q36. How many types of Parameters are available in QTP?
Ans: QTP provides three types of Parameter
1) Method Argument
2) Data Driven
3) Dynamic
Q37. What's the QTP testing process?
Ans: QTP testing process consist of seven steps
1) Preparing to recording
2) Recording
3) Enhancing your script
4) Debugging
5) Run
6) Analyze
7) Report Defects
Q38. What's the Active Screen?
Ans: It provides the snapshots of the application as it appeared when we perform certain steps during recording session
Q39. What's the Test Pane?
Ans: Test Pane contains tree view and expert view tabs
Q40. What's the Data Table?
Ans: It assists to parameterizing the test
Q41. What's the Test Tree?
Ans: It provides graphical representation of the operations which is performed with the application.
Q42. Which all environment QTP supports?
Ans: QTP supports
ERP/CRM, Java/J2EE, VB, .NET, Multimedia, XML, Web Objects, ActiveX controls, SAP, Oracle, Siebel, PeopleSoft, Web Services, Terminal Emulator, IE, NN, AOL.
Q43. How can you view the Test Tree?
Ans: The Test Tree is displayed through Tree view tab.
Q44. What's the Expert view?
Ans: Expert view display the test script
Q45. Which keyword is used for Normal recording?
Ans: "F3"
Q46. Which keyword is used for run the test script?
Ans: "F5"
Q47. Which keyword is used for stop recording?
Ans: "F4"
Q48. Which keywod is used for Analog recording?
Ans: "Ctrl+Shift+F4"
Q49. Which keyword used for Low level recording?
Ans: "Ctrl+Shift+F3"
Q50. Which keyword is used for switch between tree view and expert view?
Ans: "Ctrl+Tab"
Note: 1) QTP records each steps we perform and generates a test tree and test script.
2) QTP records in normal recording mode
3) If you are creating a test on web object, we can record the test on one browser and run it on another browser
4) Analog recording and low level recording require more disk space than normal recording mode.
Q51. What's the Transaction?
Ans: One can measure how long it takes to run a section of the test by defining transactions.
Q52. Where you can view the results of the checkpoints?
Ans: One can view the results of the checkpoints in the Test Result window.
Note:
If you want to retrieve the return value of a checkpoint ( a boolean value that indicates whether the checkpoint passed or failed) we must add parentheses around the checkpoint argument in the statement in the expert view.
Q53. What are the Standard Checkpoints?
Ans: Standard checkpoints checks the property value of an object in the application or web page.
Q54. Which environment are supported by Standard checkpoint?
Ans: Standard checkpoints are supported for all add-in environments.
Q55. What is Image checkpoint?
Ans: Image checkpoint checks the value of an image in the application or web page.
Q56. Which environments are supported by Image checkpoint?
Ans: Image checkpoint are supported only web environment.
Q57. What is Bitmap checkpoint?
Ans: Bitmap checkpoint checks the bitmap images in the web page or in an application.
Q58. Which environment are supported by Bitmap checkpoints?
Ans: Bitmap checkpoints are supported all add-in environments.
Q59. What are the Table checkpoints?
Ans: Table checkpoint checks the information with in a table.
Q60. Which environments are supported by Table checkpoint?
Ans: Table checkpoints are supported only in ActiveX environment.
Q61. What are the Text checkpoints?
Ans: Text checkpoint checks that a test string is displayed in the appropriate place in the application or on a web page.
Q62. Which environment are supported by Text checkpoint?
Ans: Text checkpoints are supported all add-in environments.

No comments:

Post a Comment