Automation Testing Own

  • View
    73

  • Download
    8

Embed Size (px)

Text of Automation Testing Own

QUICK TEST PROFESSIONAL (QTP) By Venkata Krishna

2/17/2012

Venkata Krishna

Automation Testing: This is the process of testing the application by taking help of any tool is called automation testing. Ways of Testing: 1. Manual Testing 2. Automation Testing When we need to go for automation testing: Whenever we are having number of test cases and need to execute repeatedly, then it require automation testing to overcome below drawbacks of the manual testing. More resources are required More time is required No accuracy No repeatability No reusability More budget is required Test team may get bored and tiredness The pre-requisite for automation is application should be stable like more than 70%. (it may vary based on the company)2/17/2012

Venkata Krishna

So automation testing is not the replacement for manual testing. To overcome all the drawbacks of manual testing, just it is a continuation to the automation testing. Why we need to go for automation: Once application is stable then we can continue generating the instructions with the help of any tool. By using tool or automation will give below advantages: Required less time Less no. of resources are required Accuracy Repeatability Reusability In the long span of time, budget also gets reduced. How to work with automation testing: Application TC s 1 2 3 QTP Test Partner WinrunnerVenkata Krishna Instructions

TC s pass TC s fail

2/17/2012

About QTPQTP is a graphical user interface functional regression testing tool Vendor for QTP is mercury interactive and later it was undertaken by the HP in 2006. Scripting language required for QTP is VB Script . Note: It also supports Java Script. QTP is used for perform GUI and regression testing. QTP supports only windows operating system all versions expect window 97. QTP supports applications like java, .net, web, windows, siebel, SAP, ERP, mainframes, cobol, flex and powerbuilder applications. QTP supports databases like oracle, SQL server, sybase, mybase, mysql QTP supported environments are windows, client-server, web and distributed The latest version of QTP is 11.0.2/17/2012 Venkata Krishna

Different Versions of QTP are 5.5,6.0,6.5,7.0,8.0,8.2,9.0, 9.2, 9.5, 10.0, 11.0

11.0 - Released in 2010 10.0 - Released in 2009 9.5 - Released in 2007 9.2 - Released in 2007 9.0 - Released in 2006 8.2 - Released in 2005 8.0 - Released in 2004 7.0 - Never released. 6.5 - Released in 2003 6.0 - Released in 2002 5.5 - First release. Released in 2001

2/17/2012

Venkata Krishna

Browsers supporting QTP are IE ( all versions ), FireFox 3.5 and QTP 11.0 version is supporting safari also. Note: Firefox 4.0 will be supported by the QTP but we need to install corresponding patch 6.11.3 ADD-IN Manager: It is a interface between QTP tool and different applications. By using this window we can tune, different type of applications will get recognize by QTP. Each type of application will be having specific add-in which we need to get it from the HP and it is licenced. Default add-ins supported by QTP are VB, ActiveX and Web. For any other type of application we need to install corresponding add-in then automatically, add-in name will be displayed in add-in manager window. What are all the add-ins we have selected based on that QTP is going to allow for generating the instructions or identifying the application.2/17/2012 Venkata Krishna

ApplicationsNet Web VB Java Oracle apps SAP PeopleSoft Siebel Terminal Emulators

Add-in manager VB ActiveX Web Java

Support By

QTP

Licenses:1. Seat License: It can be used in the single system and also it is not possible to share it to the other systems.(Mapped with single system and it is not sharable) 2. Concurrent License: This license can be used by the n number of persons simultaneously and also this can be transferrable to other systems.

2/17/2012

Venkata Krishna

QTP Installation Procedure: Way 1: 1. Install from QTP.exe ( Trial version for 14 days.) Format is required for every installation. To overcome the same we need to download QTP Uninstaller.exe from KnowledgeInbox.com site and remove all your registry files and Install again without format also as it will work fine. Way 2: (Permanent License) 1. Install QTP 9.2 with Crack.exe(It will become permanent license) 2. Uninstall QTP from Control Panel(Dont use above QTP Uninstaller.exe) 3. On top of QTP 9.2, Install QTP 10.0 then it will become Permanent License. NOTE: Trial for 14 days pop up is not displaying then confirm it is Permanent Version only.

2/17/2012

Venkata Krishna

2/17/2012

Venkata Krishna

Standard Class Names: Controls Button Text field Label Dropdown box Check box Radio button Links Dialog Browser Menu Windows Winbutton Winedit Static Wincombobox Wincheckbox Winradiobutton ----------Dialog ------------WinMenu Web Webbutton Webedit WebElement Webcombobox Webcheckbox Webradiobutton Links -----------Browser Java Javabutton Javaedit Label Javacombobox Javacheckbox Javaradiobutton JavaLink Javadialog JavaBrowser JavaMenu

2/17/2012

Venkata Krishna

Object Repository: QTP is required objects or controls properties information for recognizing the objects/ controls for performing one test case navigation. QTP contains a object repository which is used for maintaining all the object property information for recognizing the object. By default it takes care of all the properties required for identification. Options: 1. Add objects to local: It is used for adding the application objects along with properties. 2. Highlight in Application: It used for justifying added objects are getting recognized by QTP tool 3. Navigation for Object Repository: resource object repository

2/17/2012

Venkata Krishna

QTP Script1) Button: Syntax: (Parent window standard type)(parent window object name).(child standard type)(child object name).operation Ex: Dialog("Login").WinButton("OK").Click Dialog("Login").WinButton("Help").Click Dialog("Login").WinButton("Cancel").Click Msgbox Dialog("Login").WinButton("OK").GetROProperty("enabled") Msgbox Dialog("Login").WinButton("OK").GetROProperty("focused") Msgbox Dialog("Login").WinButton("OK").GetROProperty("visible")

2/17/2012

Venkata Krishna

2. Text Box 1. enter/clear 2. enabled/disabled 3. existence 4. verifying entered data 5.visible 6.focused 7. length and width Ex: Dialog("Login").WinEdit("Agent Name:").Set "Venkata" Dialog("Login").WinEdit("Agent Name:").Set " Dialog("Login").WinEdit("Agent Name:").GetROProperty("enabled") ----> True/False Dialog("Login").WinEdit("Agent Name:").Exist ---> True/False Dialog("Login").WinEdit("Agent Name:").GetROProperty("text") ---> Get entered value Dialog("Login").WinEdit("Agent Name:").GetROProperty("visible") ---> True/False Dialog("Login").WinEdit("Agent Name:").GetROProperty("focused") ---> True/False Dialog("Login").WinEdit("Agent Name:").GetROProperty("length") Dialog("Login").WinEdit("Agent Name:").GetROProperty("width")

2/17/2012

Venkata Krishna

3. List Box/combobox 1. Select item name/index 2. Get All items / Get Content 3. Get current selected item 4. Get item count 5. enabled 6. Focused 7. visible 8. Exist

Window("Flight Reservation").WinComboBox("Fly From:").Select "London" Window("Flight Reservation").WinComboBox("Fly From:").Select 2 msgbox Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("all items") msgbox Window("Flight Reservation").WinComboBox("Fly From:").GetContent msgbox Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("text") msgbox Window("Flight Reservation").WinComboBox("Fly From:").GetSelection2/17/2012 Venkata Krishna

msgbox Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount msgbox Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("enabled") msgbox Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("focused") msgbox Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("visible") msgbox Window("Flight Reservation").WinComboBox("Fly From:").Exist Note: Above all methods will be same for list box in both WINDOWS or WEB applications.

2/17/2012

Venkata Krishna

4. CheckBox 1. Set 2. deselect 3. enabled 4. exist 5. checked or not 6. focused window("Flight Reservation").Dialog("Open Order").WinCheckBox("Customer Name").Set "ON" window("Flight Reservation").Dialog("Open Order").WinCheckBox("Customer Name").Set "OFF" window("Flight Reservation").Dialog("Open Order").WinCheckBox("Customer Name").GetROProperty("enabled") Msgbox window("Flight Reservation").Dialog("Open Order").WinCheckBox("Customer Name").Exist msgbox window("Flight Reservation").Dialog("Open Order").WinCheckBox("Customer Name").GetROProperty("checked") msgbox window("Flight Reservation").Dialog("Open Order").WinCheckBox("Customer Name").GetROProperty("focused")2/17/2012 Venkata Krishna

5. Radio Button: 1. set radio button 2. Verify Checked 3. Exist 4. visible 5. enabled Window("Flight Reservation").WinRadioButton("First").Set msgbox Window("FlightReservation").WinRadioButton("First").GetROProperty("checked") ---> ON/OFF msgbox Window("Flight Reservation").WinRadioButton("First").Exist msgbox Window("Flight Reservation").WinRadioButton("First").GetROProperty("visible") msgbox Window("FlightReservation").WinRadioButton("First").GetROProperty("enabled")

2/17/2012

Venkata Krishna

6. Menu: 1. Exist 2. Select msgbox Window("Flight Reservation").WinMenu("Menu").Exist Window("Flight Reservation").WinMenu("Menu").Select "File;New Order Window("Flight Reservation").WinMenu("Menu").Select "File;Open Order..."

2/17/2012

Venkata Krishna

7. Browser: 1. open 2. exist 3. close 4. Full Screen 5. Refresh 6. maxim