Record a QTP Script
Total Page:16
File Type:pdf, Size:1020Kb
Aim : Description ::SeleniumSelenium is a free autoautomatedmated testing suite for web applications across different browsers and platforms. It is quite similar to HP QTP only that Selenium fofocusescuses on automating web- based applications. Procedure: Selenium is not just a single tool but a suite of ssoftwares,oftwares, each catering to different testing needs of an orgorganizaanizationtion..ItIt has four components.. •• Selenium Integrated Development Environment (IDE) •• Selenium Remote Control (RC) •• Web Driver •• Selenium Grid Selenium Remote Control (Selenium RC): Selenium RC was the flagship testing framework of the whole Selenium project for a long time. This is the first automated web testing tool that allowed users to use a programming language they prefer.As of version 22.25.0,.25.0, RC can support the following programming languages: •• Java •• CC## •• PHP •• Python •• Perl •• Ruby SelenSeleniumium Grid ::Selenium Grid was developed by Patrick Lightbody to address the need of minimizing test execution times as much as possible. It was capablecapable of capturing browser screenshotsscreenshots during significant stages, and also of sending out Selenium commands to different machines simultaneously. Selenium IDE :Shinya Kasatani of Japan created Selenium IDE,, aa FirefoxFirefox extension extension that that can can automate automate the browser through a record-and-playback feature. He came up with this idea to further increase the speed in creating test cases. SSeelenleniuiummWeWebbDrDriivveerr:: •• To use a certain programming lanlanguageguage in designing your test case. •• To test applications that are rich in AJAX-based functionalities. •• To execute tests on the HtmlUnit browser. •• To create customized test results. Advantages of Selenium: •• Very easy to use and install •• No programming experience iiss required ,though knowledge of HTML and COM isis required •• Provides support for extensions •• Communicates directly to the browser etc., •• Summary •• Selenium is more advantageous than QTP in terms of costs and flexibility. It also allows you toto run tests in pparalarallleell, unlike in QTP where you are only allowed to run ttestsests sequentially. 5. Create a test plan document for any application (e.g. Library ManagementManagement System) Library Management System Test Plan Version 1.0 Document Control PPrreeppaarreeddbby y:: NNaammee DDeessiiggnnaattiioonn:: DDaattee:: SSiiggnnaattuurree:: RReevviieewweedd:: NNaammee DDeessiiggnnaattiioonn:: DDaattee:: SSiiggnnaattuurree:: AApppprroovveeddbby y:: NNaammee DDeessiiggnnaattiioonn:: DDaattee:: SSiiggnnaattuurree:: Revision History DDaattee VVeerrssiioonn DDeessccrriippttiioonn AAuutthhoorr 2255thth NNoovveemmbbeerr,,22 001133 11..00 FFiirrssttvv eerrssiioonn TTeessttTT eeaamm Table of Contents 1.1. IntrIntroducoductiontion 2. Purpose 3. Scope 4. References 5. Document overview 6. Software Testing Strategies a. Unit testing b. Integration testing c. Validation testing d. System testing 7. Features to be tested 9. Features not to be tested INTRODUCTION The Library Management System is an online application for assisting a librarian in managing a book library in a University. The system would provide basic set of features to add/update clients, add/update books, search for books, and manage check-in / checkout processesprocesses.. OuOurr test grougroupp tested the system bbasedased on the requirement specificaspecification.tion. 22.Purpose To test the Library Management Functionality 2.1Test Scope To verify the functionalfunctionalityity of different features of the Library management system 2.2.Test Milestones SS..nnoo AAccttiivviittyy OOuuttppuutt DDaattee((dddd//mmmm//yyyyyyyy)) 11 TTeesstt PPll aannnniinngg TTeesstt ppll aann 1 ww eeeekk 22 PPrree AAcccceeppttaannccee TTeesstt ccaassee DDssiiggnniinngg Re acceptance test 2 weeks specification 33 SSyyaatteemm tteesstt ccaassee ddeessiiggnniinngg System test case 3 weeks specification 44 IInntteeggrraattiioonn TTeesstt ccaassee DDeessiiggiinniinngg Integration test case 2 weeks specification 55 EExxeeccuuttee IInntteeggrraattiioonn tteesstt ccaasseess IInntteeggrraattiioonn teesstt rreeppoorrtt 11 wweeeekk 66 EExxeeccuutteess yysstteemmtteesst tccaasseess SSyysstteemm tt eessttrr eeppoorrtt 11ww eeeekk 77 EExxeeccuuttee PPrree AAcccceeppttaannccee tteesstt ccaasseess Pre Acceptance test 1 week report 3.Project Reference Documents The Requirements document will be considered as refereerencence document 4.Entry Criteria 4.1 Integration testing 4.2 System testing 4.3 Pre-Acceptance testing 5. Test strategy TTeesstttt yyppeess RReeqquuiirreedd((YY//NN)) Integration testing FFuunnccttiioonnaalltteessttiinngg YYeess System testing FFuunnccttiioonnaalltteessttiinngg YYeess PPeerrffoorrmmaannccee tteessttiinngg NNoo LLooaaddtteessttiinngg NNoo SSttrreesssstt eessttiinngg NNoo GGUUIIttee ssttiinngg YYeess Pre AccAccepteptaanncceetestesttiinngg FFuunnccttiioonnaalltteessttiinngg YYeess PPeerrffoorrmmaanncceetteessttiinngg NNoo LLooaaddtteessttiinngg NNoo SSttrreesssstt eessttiinngg NNoo GGUUIIttee ssttiinngg YYeess 5.1 .Integration Testing 5.1.1 Types of testing : Functional testing Test Objective Verifying the library management system TTeecchhnniiqquuee BBllaacckkbb ooxxTT eessttiinngg CCoommpplleettiioonncc rriitteerriiaa NNAA SSppeecciiaallccoonnssiiddeerraattiioonnss NNAA 5.2 System testing 5.2.1 Types ooff testing Test Objective Technique Completion criteria Special considerations 11 EENNVVIIRROONNMMEENNTTAALL uusseedd 11..11 HHaarrddwwaarree:: CoCorere22DDuuoo 11..22 SSooffttwawarere:: MiMiccrroossoofftt WiWinnddowowss XP 6.Aim: Study of Any AutomatAutomationion Testing Tool. (Ex:QTP) Aim:To learn about automation testing tool Introduction : Quick Test Professional , popularly know by its acronym QTP is the functional automation testing tool from Mercury IntInteractiveeractive now acquired by HP. IItt is now called as HP Functional Test •• It is an icon based tool, which automates the functional & regression testing of an application •• QTP is easier to use and implement for both technical & non technical testers in comparcomparisonison to other functional testing tools available. •• QTP's Scripting Language is VB Script which is easy to use , understand and program •• Quick Test ProfessiProfessionalonal enableenabless Business Process Testing (BPT) •• SupporSupportsts larglargeepoolpool of softsoftwareware devedevelopmenlopmentt environenvironmentsments lilikeke SAP , Web , OraOraclecle etc. Flight Reservation •• Flight Reservation Application comes pre-installed with QTP •• Using Flight Reservation , yoyouu can bobookok a fflightlight betwebetweenen two citiecities,s, even momodifydify or deldeleteete and existiexistingng bookingbooking.. •• The application has been designed to help learn all the features provided bbyy QTP QTP IDE •• To launch QTP, In Start Menu, Choose PrProgramsograms > Quick Test ProfessProfessionalional Folder > Quick Test Professional •• The firfirstst time yoyouu start QTPQTP,,thethe Add-in Manager dialog box opens.It Displays list of all installed add-in along with license expiry date.. •• It is recommended to select only the add-ins required for your particular testing session .. The Start Page descridescribesbes the new featfeaturesures in this release — including links to more information about these features. •• Title Bar Displays the name of the active document. If changes have been made since it was last saved, an asterisk (*) is displayed next to the document name in the title bar. •• Menu Bar Displays menus of QTP commands.. •• Toolbars Contains buttons to assist you in managing your document •• Document Tabs Enables you to navigate open documents •• Keyword View Displays test steps in a graphical representation •• Expert View Displays test steps as a VB Script line. •• Active Screen Provides a snapshot of your application as it appeared when you performed a certain step during the recording session. •• Data Table Assists you to parametrize your test. •• Test Flow Displays the hierarchy of actions and action calls in the current test, and shows the order in whiwhichch they aarere run. •• Below are Tabs For Other Panes. •• You can change the look and feel of the main QTP window, as required •• In the QTP window, select View > Window Theme, and then select the way the window should appear from the list of available themes. TESTESTTSTSTEPEPSS Lets Record Our FirFirstst Script.FScript.Foror Our Application Under Test i.e. Flight Reservation --letslets validate a simple test scenario out of possible many The Scenario Would Be"Check that user successfully logs in to the application on inputting valid Agent Name & Password"" Test Steps required to validate this scenario would be Step 1) Open Flight Reservation Application Step 2) Enter Valid Agent Name Step 3) Enter Valid Password Step 4) Press Ok Step 5) Close Application After Successful Login. RecRecordord A QTQTPPscrscriptipt In QTP click the record button.The Record and RRunun ssettingsettings Dialog Box Opens.This box opens automaautomaticalticallyly each titimeme you begin rerecordincordingg a new testtest.. Record & Run settings shows a tabs corresponding to add-ins installed and loaded for your test.. The Windows Application tab is always available and be used for envirenvironmentonments,s, ssuchuch as Visual Basic, ActiveX, and terminal emulators. •• For any Environment, the Record and Run settings cacann be classified into two generic groups 1) Record & Run on ANY window belonging to that parparticularticular