1 / 105

UNIFIED FUNCTIONAL TESTER

UNIFIED FUNCTIONAL TESTER. Overview on Test Automation. Overview on Test Automation. Overview of UFT. UFT Product Information. It is a functional and regression testing tool. UFT is developed using .NET technology.

helenortiz
Télécharger la présentation

UNIFIED FUNCTIONAL TESTER

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UNIFIED FUNCTIONAL TESTER UFT

  2. Overview on Test Automation MANUAL TESTING

  3. Overview on Test Automation MANUAL TESTING

  4. Overview of UFT MANUAL TESTING

  5. UFT Product Information • It is a functional and regression testing tool. • UFT is developed using .NET technology. • It is an object based test tool , but no front end object reference required. • Windows Based: • Window, Dialog box, Button, Edit Box, Check Box etc. • Web Based: • Browser, Page, image, Link etc. MANUAL TESTING

  6. UFT Version History • Astra QuickTest Version 1.0 to 5.0 • QTP 5.6 – 2002 • QTP 6.5 – 2003 • QTP 8.0 – 2004 • QTP 8.2 – 2005 • QTP 9.0 – 2006 • QTP 9.2 – 2007 ---------MERCURY INTERACTIVE------------------ • QTP 9.5 – 2008 ---------HP------------ • QTP 10.0 – 2009 • QTP 11.0 – 2010 • UFT 11.5 - 2012 MANUAL TESTING

  7. UFT License 1. Seat License: This license is tied to the computer on which it is installed. The trial or a demo license of UFT is a seat license which has a validity of 30 days. You don’t require any keys for the trial license. 2. Concurrent License: This is also known as floating license. This license type requires a concurrent license server to be installed in your office/local network. With concurrent license, a pool of licenses are assigned to the concurrent license server. Anybody in a local network can connect to this pool as long as at least a single license is available. 2a) Commuter License: This can be said as a special type of concurrent license which can be used when you don’t have access to the license server. In this case, you checkout a license from the concurrent license server for ‘n’ days where n <= 180. 2b) RemoteCommuter License: This is used when you want a license for a particular machine but that machine is not able to connect to the license server for checkout purposes. In that case, you would take help of a machine B which IS able to connect to the license server and checkout a license for John’s machine. A  MANUAL TESTING

  8. UFT Addin • Internal Add ins: • a. Standard Windows • b. ActiveX • c. Visual Basic • d. Web • 2. External Add ins: • a. Java • b. .NET for Windows Forms • c. .NET for Web Forms • d. WPF • e. SAP for Windows Forms • f. SAP for Web Forms • g. People Soft • h. Delphi • i. Power Builder • j. Oracle • k. SIEBEL • L. Web Services etc.. MANUAL TESTING

  9. Frameworks in UFT MANUAL TESTING

  10. Frameworks in UFT • There are 3 types of Frameworks. • Data Driven Framework • Keyword Driven Framework • Hybrid Framework MANUAL TESTING

  11. Data Driven Framework The general steps involved in the data driven framework are: Prepare the Test Case for the Application Under Test Add the Objects from AUT to Object Repository Write the scripts based on the Test Case MANUAL TESTING

  12. Prepare the Test Case for the Application Under Test The External source for this sample is an Excel file. The VB script in QTP must be written to open an Excel file in order to read the test data. This can be achieved in a hierarchical manner. 1. An excel file is first opened an as Application 2. Then the workbook must be opened from the specified location 3. The sheet where the test data are present. 4. Finally the cell must be read. MANUAL TESTING

  13. 2. Add the Objects from AUT to Object Repository Once the Test case is ready, start adding all the required objects to the repository. 1. Record your scenario and all the objects will be added in the object repository. MANUAL TESTING

  14. Write the scripts based on the Test Case Before running the script, ensure that the excel file containing the test data has been saved and is closed. MANUAL TESTING

  15. Advantages of Data Driven Framework • Large number of test data can be read and written in to the external file in a single test. • Loop statement is used to repeat the same steps for several iterations. Hence coding effort is reduced. • Since the data are read and written directly into the external file, there is no need to copy, paste or export data in order to use them. • Test Data can be read from any external file and the outputs can be written into any other external file. MANUAL TESTING

  16. Disadvantages of Data Driven Framework • Scripting knowledge is required to develop this framework. • Sometimes more number or combinations of data from an external source like Database may slow down or even crash the QTP. MANUAL TESTING

  17. Keyword Driven Framework • Keyword Driven Framework is a framework where keywords drive the test. Here keyword refers to the user defined functions. MANUAL TESTING

  18. Keyword Driven Framework • Record and run the test. • Add objects to the local repository and write the scripts for all test steps. • Write descriptive programming for all test steps. MANUAL TESTING

  19. Keyword Driven Framework The functions that are created for different test cases are saved in a function library and are associated with the main test. It is enough to call the keywords for the needed test cases in the main test thereby reducing the size of the driver script in the main test. The Driver Script for this simple framework looks as: MANUAL TESTING

  20. Advantages of Keyword Driven Framework • Any number of test cases can be run on a single test just by calling their respective keywords. • Writing general descriptive programming for all web/ windows objects & calling them as keywords will help in running the same test for different dynamic applications. • Reduces the size of the driver script. MANUAL TESTING

  21. Disadvantages of Keyword Driven Framework • Time taken to develop these frameworks is very high if there are very few number of test cases to run. • Recording the steps is not always used when designing KDF for many applications on a same test. MANUAL TESTING

  22. Recording Modes in UFT MANUAL TESTING

  23. Recording Modes in UFT • Below are the types of recording modes • Normal Recording: This is the default Recording mode that records the objects and the operations performed on the application under test. • 2. Analog Recording: This records not only the keyboard actions but also the mouse movements relative to the screen or the application window. • 3. Low-Level Recording: This records the exact co-ordinates of the objects independent of the fact whether UFT recognizes the object or NOT. It just records the co-ordinates, hence does NOT record mouse movements. • 4. Insight Recording: UFT records operation based on its appearance and NOT based on its native properties. MANUAL TESTING

  24. Normal/Default Recording Mode: Whenever user starts recording by default recording done in this recording mode.This recording mode is used to recognize standard objects of the AUT and save the object properties into the Object Repository (OR), it is also uses to record mouse movements & keyboard inputs. And this is how scripts recorded in normal mode are looks like: MANUAL TESTING

  25. Low level Recording Mode: Low level recording is used to record mouse clicks, drag & drop, and type operation on an object. But the recording is done on the bases of co-ordinates not its properties and i.e. why this recording mode is known as Low Level Recording mode, because in this mode QTP/UFT records the co-ordinate location of the object on which action has been performed. Following is the code of Low level recording mode: MANUAL TESTING

  26. Analog Recording Mode: Whenever we need to record continues mouse movements, we can go with Analog Recording mode. The main funda behind this recording mode is it records your continues mouse movements in the form of a track and save this track file on your computer. MANUAL TESTING

  27. Insight Recording Mode: There are cases when UFT is not able to recognize objects using their defined properties; the reason could be like developer has not assigned properties to object, or the properties assigned to object are not enough that UFT can recognize that object. In this situation we can take help of Insight Recording mode, which records object screenshots and perform actions on that. MANUAL TESTING

  28. Object Repository MANUAL TESTING

  29. Object Spy and it Features • Object Spy is a utility/option within QTP to add objects to the Object Repository. • Upon Clicking on the Object Spy icon, the Object Spy Dialog box opens. The Objects can be added to the repository upon clicking the pointing hand. • After Spying the object, the object hierarchy will be shown. • After Spying an object, we can click on "Highlight" option to highlight the object in the application. • For adding the object into the Object Repository, one should click on "Add objects" button in the Object spy dialog. • The properties and its values are displayed for the selected object in the dialog box which should be Unique for QTP to recognize the objects while the script executes. • The supported operations on the object can be retrieved by clicking on the operation tab. Operations such as "click" for a button, "Set" for a text box are retrieved from the "operations" tab. MANUAL TESTING

  30. Object Spy and it Features MANUAL TESTING

  31. Object Repositories • After Spying the object, adding the objects into Repository is the first step. The Script can execute successfully if and only if the objects are added into the Object Repository. Upon Clicking "Add Objects to OR", the objects are added into Object repository. • After adding objects to the OR, we can verify by navigating to "Resources" -> "Object Repository". The Object Repository Window opens and we can locate the added object in the Repository. MANUAL TESTING

  32. Object Repositories • 2. One can add the properties additionally apart from the default ones by clicking on • "+" button and remove it using "x" button. If we want to restore to defaults we can • click on the "circular arrow" button. • 3. One can change the object's Name which will NOT have any effect on identifying the object uniquely. If there is a change in logical name, the same name should be used while scripting. Only the Object's Name can be changed and NOT its Properties MANUAL TESTING

  33. Object Repositories • 4. Properties of any object must be unique so that QTP will be able to recognize the objects and act on it. If the object properties are same for two or more objects then during execution an error would be thrown that "More than one object is matched for the specified properties". • 5. After adding the objects, the same can be used in script by simple drag-drop. • When the object is dragged and dropped, the default operation is set. Eg : Click for a button, Set for a Text Box etc. MANUAL TESTING

  34. Types of Object Repositories • Local Object Repository- As the Name Suggests, the Object Repository is applicable only for that Action. • Shared Object Repository - The Object Repository is Shared across actions/modules which would be mapped for two or more actions. Local objects can be exported to be saved into Shared Object Repository by using the option "Export Local Objects" Options. MANUAL TESTING

  35. Types of Object Repositories MANUAL TESTING

  36. Ordinal Identifiers • Sometimes there are series of objects with same class name and properties. Lets us say in a window there are series of checkboxes with the same set of properties. If we want to act on those objects we need to uniquely identify them so that QTP will be able to act on it. • An Ordinal Identifier assigns a numerical value to the test objects which indicates its location or order relative to its group. The Ordered value enables QTP to recognize it uniquely when the inbuilt properties are NOT sufficient to do so. • There are 3 Ordinal Identifiers in QTP that can be used in different context: • Index • Location • Creation Time MANUAL TESTING

  37. Index • An object appearing first in the page/Window will have a smaller Index value when compared to another object that comes later in the same page/Window. MANUAL TESTING

  38. Location • The Location property works vertically from top to bottom and from left to right positions. MANUAL TESTING

  39. Creation Time • The Creation Time property holds good only for web based application. When we open 2 browser sessions of the same website, QTP will not be able to recognize the window as both the window will have the same set of properties. Hence we can use creation time with which QTP will be able to act on the window. MANUAL TESTING

  40. Actions MANUAL TESTING

  41. Actions MANUAL TESTING

  42. Types of Actions Types of Actions: There are three types of actions: Non-reusable action - An action that can be called only in that specific test in which it has been designed and can be called only once. Reusable action - An action that can be called multiple times any test in which it resides and can also be used by any other tests. External Reusable action - It is a reusable action stored in another test. External actions are read-only in the calling test, but it can be used locally with the editable copy of the Data Table information for the external action. MANUAL TESTING

  43. Working with Actions MANUAL TESTING

  44. Inserting call to New Action: Step: 1 - Right Click on the Scripting area and select "Call to New Action“ MANUAL TESTING

  45. Inserting call to New Action: Step: 2 - In the "Insert Call to New Action" Window, give the test name, description, and also specify if it is a reusable action or not. MANUAL TESTING

  46. Inserting call to New Action: Step: 3 - User Can check the changes graphically in the test Name Tab. MANUAL TESTING

  47. Inserting call to New Action: 'Input to the action num1 = 5 num2 = 10 Dim value1 'Run the action with parameters OutputValue = RunAction("Calculate", oneIteration, num1, num2, value1) 'Display the output print OutputValue MANUAL TESTING

  48. Inserting Call to Copy of Action: Step : 1 - Right Click on the Scripting area and select "Call to Copy of Action“. MANUAL TESTING

  49. Inserting Call to Copy of Action: Step : 2 - In the "Insert Call to Copy of Action" Window, Select the "Test Name", "Action Name" and also select the location the action to be inserted. MANUAL TESTING

  50. Inserting Call to Copy of Action: Step : 3 - Immediately script is auto generated to show that the copy of an action is inserted. RunAction "Copy of Calculate", oneIteration MANUAL TESTING

More Related