Beruflich Dokumente
Kultur Dokumente
31 August 2011
Agenda (Day 1)
Automated Tests vs Manual Tests Introduction to Test Automation Introduction to QTP Record / Playback The First Step Types of Recording What is Synchronization Checkpoints
31 August 2011
31 August 2011
ADVANTAGES
Automated Testing 1. If you have to run a set of tests repeatedly automation is a huge gain. 2. Helps performing "compatibility testing" testing the software on different configurations. 3. It gives you the ability to run automation scenarios to perform regressions in a shorter time. 4. It gives you the ability to run regressions on a code that is continuously changing. 5. Can be run simultaneously on different machines thus decreasing testing time. 6. Long term costs are reduced. Manual Testing 1. If Test Cases have to be run a small number of times it's more likely to perform manual testing. 2. It allows the tester to perform more ad-hoc (random testing). 3. Short term costs are reduced. 4. The more time tester spends testing a module the greater the odds to find real user bugs.
31 August 2011
DISADVANTAGES
Automated Testing 1. It's more expensive to automate. Initial investments are bigger than manual testing. 2. Can t automate visual references, some tests still have to be done manually. Manual Testing 1. Manual tests can be very time consuming. 2. For every release you must rerun the same set of tests which can be mundane and tiresome.
31 August 2011
31 August 2011
Need of Automation
Speed Automation Scripts run very fast when compared to human users (NOT ALWAYS) We can run automation scripts simultaneously on different machines without manual intervention. Reliable Tests perform precisely the same operations each time they are run, there by eliminating human error. Repeatable We can test how the application reacts after repeated execution of the same operation. We can rerun test cases for different set of test data. We can rerun test cases on different environment conditions. Comprehensive We can build a suite of tests that covers every feature in our application Reusable We can reuse tests on different versions of an application, even if the user interface changes.
31 August 2011
31 August 2011
What are the different tools available in the market- For Functional Test Automation
QuickTest Professional (HP) WinRunner (HP) Robot (IBM Rational) Functional Tester (IBM Rational) SilkTest (Borland) TestComplete (AutomatedQA) QAWizard (Seapine) TestPartner (Compuware) QEngine (AdventNet) Ranorex (EOSS Group) Open source tools (Sahi, Selenium, Watir)
31 August 2011
31 August 2011
10
31 August 2011
11
Introduction to QTP
31 August 2011
12
Introduction to QTP
Developed by Mercury Interactive now owned by HP QTP supports both web applications & windows applications Test Script developed on VB Script QTP supported Technology .NET. J2EE, Main Frame, XML, Java, Delphi, SAP, Seibel, People soft, Silverlight, Flex, Ajax, GWT, Dojo etc QTP run on only windows platform not supporting UNIX, Linux etc QTP supported multimedia RealAudio/RealVideo, Windows Media Player, Flash
31 August 2011
13
Web Browser
31 August 2011
14
Add-ins of QTP
Technology supported by the QTP By default three Add-ins are there in QTP ActiveX VB Web Additional Add-ins: Java Oracle People soft .NET Terminal Emulator (RTE) SAP Siebel Delphi
31 August 2011
15
31 August 2011
16
31 August 2011
17
31 August 2011
18
Reporting defects
31 August 2011
19
Let s Record
1. 2. 3. 4. 5. 6. 7. 8. Open "http://newtours.demoaut.com/" website Click Record to start recording Login user name/password (default as mercury/mercury) Fill the "Flight finder" form Click "continue Select flight Click "continue Book the flight Run the test twice. Do you face some problem? Why? Start / End condition Note - View QTP generated file in Windows Explorer
31 August 2011
20
31 August 2011
21
Types of Recording
31 August 2011
22
31 August 2011
23
Can switch recording modes in the middle of the recording sessions. Analog Require more disk space than normal recording mode. Use only when normal recording mode does not accurately record your operation.
Low Level
31 August 2011
24
If the operations you perform are on objects located within more than one window. QuickTest captures only the Active Screen image of the final state of the window on which we are recording. The steps recorded using analog recording are saved in a separate data file. This file is stored with the action in which the analog steps are recorded. QuickTest adds to our test, a RunAnalog statement that calls the recorded analog file.
31 August 2011
25
Analog Recording
Open Programs > Accessories >Paint application. In Paint: Go to Image > Attributes and set the width and height to 900 pixels and click OK. In QuickTest: click the Record button to begin a recording session. Click the Analog Recording button or choose Automation > Analog Recording. The Analog Recording Settings dialog box opens
31 August 2011
26
31 August 2011
27
Note: Practice analog recording in Record relative to a specified window and Record relative to the screen modes.
31 August 2011
28
31 August 2011
29
31 August 2011
30
31 August 2011
31
Window("Notepad").WinEditor("Edit").Type "This is a sample test If you perform the same action while in Low Level Recording Mode, QuickTest records the click in the Edit box, followed by the keyboard input. Your test is displayed as follows in the Keyword View and Expert View:
31 August 2011
32
Synchronization in QTP
31 August 2011
33
What is Synchronization
Inserts a synchronization point in the test, instructing QuickTest to pause the test until the object property value is achieved (or times out). There are several options that you can use to synchronize your test: You can insert a synchronization point by choosing Insert > Synchronization Point, and QuickTest generates a WaitProperty statement in the Expert View. You can insert Exist or Wait statements that instruct QuickTest to wait until an object exists or to wait a specified amount of time before continuing the test. You can modify the default amount of time that QuickTest waits for a Web page to load by changing Browser Navigation Timeout in the File > Settings > Web tab. When working with tests, you can increase the default timeout settings for a test to instruct QuickTest to allow more time for objects to appear by changing the Object Synchronization Timeout in the File > Settings > Run tab.
31 August 2011
34
Checkpoints in QTP
31 August 2011
35
Types of Checkpoints
A checkpoint verifies that expected information is displayed in your application while the test is running. Types of various checkpoints: 1. Standard Check Point : Checks the property value of an object in your application or Web page. Standard checkpoints are supported for all add-in environments. 2. Bitmap Check Point : Checks an area of your Web page or application as a bitmap. For example, suppose you have a Web site that can display a map of a city the user specifies. Bitmap checkpoints are supported for all add-in environments 3. Database Check Point : Checks the contents of a database accessed by your application. Database checkpoints are supported by all environments 4. Text Check Point : Checks that a text string is displayed in the appropriate place on a Web page or application. Text checkpoints are supported for the Web environment, plus some Web-based add-in environments. 5. Text Area Check Point : Checks only the text string captured from the defined area is displayed (Text Before and Text After are not displayed).
31 August 2011
36
31 August 2011
37
Standard Checkpoints
Standard Checkpoints 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, and so forth. Using Standard Checkpoints, we can create following checkpoints:
Image checkpoint : checks the value of an image in your application or Web page. Image checkpoints are supported for the Web environment Table checkpoint: checks information within a table. For example, suppose your application or Web site contains a table listing all available flights from New York to San Francisco. You can add a table checkpoint to check that the time of the first flight in the table is correct. Page checkpoint: checks the characteristics of a Web page. For example, you can check how long a Web page takes to load or whether a Web page contains broken links. Page checkpoints are supported for the Web environment
31 August 2011
38
Thank you.
31 August 2011