Documente Academic
Documente Profesional
Documente Cultură
What is Automation?
Test Automation is the use of software to control the execution of tests & the comparison of results- actual with the predicted/expected. A software program that is used to test another software program, this is referred to as Automated software testing. A third party tool is used to test the application. Use of automation tools reduces the test time as well as the cost
Why Automation Avoid the errors that human make when they get tired after multiple repetitions. The test program wont skip any test by mistakes. Each feature test cycle will take less time & Required less human intervention. Required for Easy cycle of Regression Testing.
Introduction to QTP Developed by Mercury interactive But Now owned by HP Developed for web functionality QTP supports both web applications & windows applications QTP Developed in 2002 Test Script developed on VB Script
QTP - Main Window Test Pane: Test Pane contains two labs to view the tests, - Keyword View - Expert View
Keyword View: Quick Test Pro displays your test in the form of a user actions, icon based tree Expert View: Quick Test Pro displays the scripts (VB Script) of the tests in this view.
Overview of QTP Testing Process of QTP Windows Structure of QTP Add Ins of QTP Recording Modes in QTP Object Repository Object Spy Synchronization point Regular Expressions Parameterization Check Points Data Driver Output Values Transaction Breakpoints Virtual Objects Working with Actions Recovery Scenario Manager
Add Ins of QTP It gives information about the technology supported by the QTP By default three Add Ins are there in QTP 1) ActiveX 2) VB 3) Web Additional Add ins: 1) Java 2) Oracle 3) People soft 4) .NET 5) Terminal Emulator 6) SAP 7) Siebel
Add In Manager
Record a Test
Object Repository
Object Repository is nothing but a storage location. It contains the collection logical name and physical description of a particular object. Logical Name: For Naming Convention Physical Description : is Nothing but expected physical properties Two types of Object Repositories are available in QTP1) Per Action (.mtr) 2) Shared Object Repository (.tsr)
Object Spy
Object spy is used to display or view all the physical properties and methods of an object or a window based on the requirement.
Synchronization point
Two types: 1. wait() 2. Synchronization point 1. Wait(): pause the test for fixed time specified in the wait statement. 2. Synchronization point :To define the time mapping between the QTP and application, we use this concept. If we dont want to perform any operation until an object in our application achieves certain status then we can insert synchronization point to instruct QTP to pause the test until the object getting the certain value.
Regular Expressions
It enables quick test to identify test string with varying value (varying means changing) Regular Expressions can be used in the following areas: 1) Check Points 2) In parameterization 3) Data Driven test 4) Actions 5) Exception Handling.etc
Parameterization
A parameter is a variable that is assigned a value from an external data source at run time. We use parameterization when we want to change the value of properties at run time. Parameterization can be done in three ways using Quick Test. Datatable Environment variables Random numbers A property of an object can be parameterised from the object repository.Select the property to be parameterised and check the Parameter option from the configure vlue frame and enter the value in the data table column.
Check Points
Check Point is a verification point that compares the current value of the specified property with the expected value for that property. There are 7 types of check points are available in QTP. They are1) Standard Check Point 2) Text Check Point 3) Text Area Check Point 4) Bitmap Check point 5) Database Check Point 6) XML Check Point 7) Accessibility Check Point
Checkpoint Types
6. It will open "Object Selection - Checkpoint Properties" window (with WinButton:FLIGHT highlighted). Click ok.
7..It will open checkpoint properties window. (only one property will be checked in it i.e. 'enabled' with a value of False.) 8. Click ok. Click on Stop in order to stop the Recording & Save the test
Text Checkpoint - It is used for checking the Text present on a object. It can be inserted through application as well as through active screen. Text Area Checkpoint - It is used for checking the test present in a specified area. It can be inserted only through application but not through active screen. Data Base Check Point -It is used for checking the contents of a database. 6) XML (Extended Markup Language) Checkpoint It is used for checking the contents of an XML file. It is a universally understandable language and used for data transformations. Accessibility Checkpoint - It is used for checking whether the page can be accessible by more number of people or not. In order to check the same actually it checks whether the page is developed according to the WWW (world wide web Consorted) standards or not.
Output Values
Output Value is used to retrieve the current value of any object in the application and stores it in a specified location. Output values can be added in the following ways During Recording: In the Keyword View or Expert View, choose Insert -> Output Value and select the type of output value and the object for which the value is to be outputted. During Editing: Right click the object in the Active screen and select the type of output value to be added.If the location clicked is associated with more than one object, then the Object Selection Output Value Properties dialog box opens. From here select the required object.
Transaction
Transaction in used for performance analysis.
Wherever you want to measure the time taken for any task in your application, start the transaction (Start Transaction) and when the task is done, end the transaction (End Transaction).
The run results will show the time taken between start and end transaction.
Breakpoints
Breakpoints are basically used in debugging of the test, when you add breakpoint to a line of code, we can check whats that line of code is doing Operations we can perform on Breakpoints: * Setting Breakpoints * Enabling and Disabling Breakpoints * Removing Breakpoints
Virtual Object
Virtual Object is used to identify the properties of similar objects in a particular Area. Example: In normal recording if we select the paint brush window, the script will look like thiswindow(Paint).Activate Window(Paint).Winobject(colors).Click 72,16Window(Paint).Winobject(colors).Click 80,14window(Paint).Close If we are using Virtual object, the script will look like thiswindow(Paint).Activate Window(Paint).Winobject(colors).Virtual Button(RED) Window(Paint).Winobject(colors).Virtual Button(BLUE) window(Paint).Close
guides you through the process of defining a recovery scenario, which includes a definition of an unexpected event and the operations necessary to recover the run session.
Pop-up window Test run error
pop-up window
To handle unwanted windows of application build at runtime we can use this event
Thank You