Beruflich Dokumente
Kultur Dokumente
Client Logo
Agenda
Basic Automation using QTP - Functional Testing Overview - Functional Testing Elements - Script Development with QTP - QTP Automation Benefits - Record and Run - Checkpoints and Synchronization Advanced QTP Features - Parameterization - Multiple Actions - Recovery Scenario - Runtime Objects & Test Objects - Object Identification - Test Results
Client Logo
Process
Validate application functions against the functional specification, i.e., functions yield the expected results? Report and track defects Measure test coverage and track application quality
Client Logo
Client Logo
Client Logo
QTP Demonstration
Client Logo
Run modes
Normal Speed Update run
Client Logo
Variable Declaration
-Dim sText -Dim iNumber -Dim aArray() Dynamic Array -Dim aArray(10, 2, 5)
Variable Assignment
-sText = String Value -iNumber = 10 -aArray = (ABC, XYZ)
Client Logo
Scripting in QuickTestPro
Note: VB Script is used in QuickTestPro for automating Testcases. Function Screen_Display(sButtonName1,sButtonName2) Window("OsaSimulator").Page("Page").WebButton("name:="&sButtonName1).Click Window("OsaSimulator").Page("Page").WebButton("Apply").Click Window("OsaSimulator").Page("Page").WebButton("name:="&sButtonName2).Click bScreen = Window("OsaSimulator").Page("Page").WebEdit("Screen").Exist If bScreen Then reporter.ReportEvent micPass, "Custom Step", "Pass: Verify the " & sButtonName2 & " screen displays" Report_Result 4, "Verify the " & sButtonName & " screen displays", "Pass" Else reporter.ReportEvent micFail, "Custom Step", "Fail: Verify the " & sButtonName2 & " screen displays" Report_Result 4, "Verify the " & sButtonName & " screen displays", "Fail" End If End Function
Client Logo
Client Logo
Window("Flight Window("Flight Window("Flight Window("Flight Window("Flight Window("Flight Window("Flight Window("Flight Window("Flight Window("Flight Window("Flight true, 10000 Window("Flight
Reservation").Activate Reservation").WinButton("FLIGHT").Check CheckPoint("FLIGHT") Reservation").WinObject("Date of Flight:").Type "111111" Reservation").WinComboBox("Fly From:").Select "Frankfurt" Reservation").WinComboBox("Fly To:").Select "Los Angeles" Reservation").WinButton("FLIGHT").Check CheckPoint("FLIGHT_2") Reservation").WinButton("FLIGHT").Click Reservation").Dialog("Flights Table").WinButton("OK").Click Reservation").WinEdit("Name:").Set "aaaa" Reservation").WinButton("Insert Order").Click Reservation").WinButton("Update Order").WaitProperty "enabled", Reservation").WinButton("Button").Click
Client Logo
Synchronization
Options to Synchronize tests
Call wait Exist wait property Sync
Client Logo
Client Logo
Parameterizing Testing
Different groups of parameters
Data table parameter Other parameters
Data driver
Client Logo
Client Logo
Client Logo
Client Logo
Client Logo
Client Logo
One Object?
Is Smart Identification Create a list of objects (within Match base Smart turned on for this object the ID? parent object) that match properties class? the description (mandatory + recorded assistive properties) that were recorded for this One Are there more than two object. Object &(If Smart Identification Object? Multiple Identification objects in the list? Objects? there was only one, wed Forget everything we know, have returned it). Does this object If the selector location, index, for or this object identifies an object creation time selector? in the original set, return the object. If not error.
Smart ID successfully used to identify object (but have a ordinal identifier) used
Create a list of objects under the parent object that match all the base properties for this object class.
Selector?
start over from scratch Optional and look for the object Props? based on what we think it should look like
Return Object
Warning: Identification would probably not have been possible without Smart ID check your Object Repository!
Smart Identification
Properties for Smart ID are recorded, but not used during replay When Smart ID is invoked, QT uses the properties that were recorded to identify the object Base and Optional Filter properties for Smart Identification must be set before-hand (so that QTP knows to record them). Use only if required. Because QTP has to record more properties, enabling Smart Identification degrades performance
Client Logo
Smart Identification
Configuring Smart Identification Tools Object Identification Disable for specific object Disable for test run Temporarily disable Smart Identification during replay Set App = CreateObject("QuickTest.Application") App.Launch App.Test.Settings.Run.DisableSmartIdentification = True App.Test.Settings.Run.DisableSmartIdentification = False Smart Identification in Test Results Client Logo Smart Identification Warning in Test Results
Test Results
Client Logo
Questions?
Client Logo
Thank you!
Client Logo