• Differences between Win runner and QTP. • Versions in QTP. • Explaining the UI part. • The Testing process in QTP. • Types of Recording • Add in Manager • Check points. Features that are to be discussed. • Object repository and Object spy. • Data Driven testing. • Exception handling. Differences between Win runner and QTP. 1) The first and foremost difference is the scripting language that it uses. • Win runner --- TSL(Test script Language) • QTP --- VB Script. 2) There are certain Environments which are not supported by Win runner but are totally supported by QTP. Example: - SAP, .Net, J2EE, etc.. Cont… Differences between Win runner and QTP. 3) The data driven testing and parameterization of data is a lot more easier in QTP when compared to that of Win runner. 4) The test report is more robust in QTP when compared to that of Win runner. 5) XML Support is provided in QTP which is not there in Win runner. Version’s in QTP. • QTP was earlier called as Astra Quick Test(AQT) which was not so advanced and not so popular. • QTP Version 6.5. • QTP Version 8.0. • QTP Version 8.2(Latest version). Explaining the UI part. Types of Recording • Other than the Normal recording in QTP, there are two types of recording. – 1) Analog Recording and – 2) Low level recording. Types of Recording • 1) Analog Recording:- enables you to record the exact mouse and keyboard operations you perform in relation to either the screen or the application window • 2) Low level recording:- enables you to record on any object in your application, whether or not QuickTest recognizes the specific object or the specific operation. Testing process in QTP. • 1) Preparing to record: - This particular step is to make sure that the particular addin is selected for the test. And also check the Record and run settings, where the user needs to specify to record and run the test on any open browser or to specifically give the browser name. Cont.. Testing process in QTP • 2) Recording a session on your application : - As the user does some actions on the application, the actions are recorded like wise in the QTP application. Script will be displayed in iconic form in the keyword view and a detailed script is visible in the Expert view. Testing process in QTP 3) Enhancing the test: - Enhancing the test includes Inserting the check points, replacing fixed values with parameters and checking how the application behaves for multiple sets of data. cont.. Testing process in QTP 4) Debugging the test:- To check it operates smoothly without any interruption like giving break points and using debug viewer . cont.. Testing process in QTP • Executing:- Running the test in order to check how the application is actually behaving. Testing process in QTP 6) Result Analysis:- Next is analyzing the test results to check for the defects in the application. Testing process in QTP 7) Reporting defects in the specified bug tracking tool. Addin Manager Check point. • What is a check point? – A checkpoint is a step in your test that compares the actual values and expected values of a specified object property. Types of Check points in QTP • Standard Check point. • Text/Text area Check point. • Bitmap Check point. • Database Check point. • Accessibility Check point. • XML Check point. – These are some of the check points present in QTP. Standard Check point. • Checks the property value of an object in your application or Web page. The standard checkpoint checks a variety of objects such as buttons, radio buttons, combo boxes, lists, etc. Text Check point. • Checks that a text string is displayed in the appropriate place in your application or on a Web page. Bitmap Check point • Checks whether the screen shot matches with the actual specified requirements. Database Check point. Checks the contents of a database accessed by your application. Accessibility Check point. • Identifies areas of your Web site that may not conform to the World Wide Web Consortium (W3C) Web Content Accessibility Guidelines XML Check point. • Checks the data content of XML documents in XML files or XML documents in Web pages and frames. Sample QTP Script • i=1 • while(i<3) • '{ • Window("Flight Reservation").WinObject("Date of Flight:").Type "090909" • Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt" • Window("Flight Reservation").WinComboBox("Fly To:").Select "London" • Window("Flight Reservation").WinButton("FLIGHT").Click • Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "13508 FRA 10:24 AM LON 11:09 AM SR $160.20" • Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click • Window("Flight Reservation").WinEdit("Name:").Set "Name" • Window("Flight Reservation").WinRadioButton("Business").Set • Window("Flight Reservation").WinEdit("Tickets:").Set "2" • Window("Flight Reservation").WinButton("Insert Order").Click • Window("Flight Reservation").Activate • Window("Flight Reservation").WinButton("Button").Click • '} • 'i++; • 'endif • i=i+1 • msgbox("i") • wend Object repository and Object Spy Object Spy