Quick Test Professional 9.

2

Testing Process
    

Preparing to Record Recording Enhancing a Test Debugging Running the Test and Analyzing the Results Reporting Defects

Add-in Manager

Default Add-ins – ActiveX – Visual basic – Web Other Add-Ins – Siebel – Java – SAP – Oracle – .Net and many more

Record & Run Modes  Recording Modes – – – Normal Analog Low level  Run Modes – – Normal Fast .Quick Test Professional .

QTP Window .

.Create a Test Objectives  Create a basic test from a manual test case.  Run a test and check for errors.

The Object Repository • Object repository dialog box displays a test tree of all objects in the current action or the entire application. •Using Object repository we can a) Identify the Object b) View the Object Properties .

We can also view Object Methods.Object Spy   Using the Object Spy. we can view the properties of any Object in the open application. .

Mandatory Properties. 1. only a few properties are needed to uniquely identify an object. QTP has a default set of properties that it always learns.How Quick Test Recognizes Objects   For each object class. . 2.Ordinal Identifier. Usually.Assistive properties. 3.

A status message appears.Synchronization       Synchronization point enables the anticipated time problems between the application and QTP. A window opens and is ready for data entry. A progress bar reaches 100% completion. . A pop-up message appears in response to an operation. A button becomes enabled.

WinButton(“Update order”).Inserting a synchronization point Insert  Step  Synchronization point Window(“Flights”).WaitProperty”enabled”.Adding Exist and Wait statements status=Window(“Flights”).1.Exist Wait(10) .1000 2.Dialog(“Flights Table”).How to synchronize the Test  We can synchronize the test by 1.

From Menu Insert  Checkpoint  Standard Checkpoint 2.From the Active Screen .Checkpoints   A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property.From Keyword view 3. We can Insert checkpoint 1.

Bitmap Checkpoint 8.Image Checkpoint 3.Text Checkpoint 6.Database Checkpoint .Standard Checkpoint 2.Page Checkpoint 5.Table Checkpoint 4.Checkpoint Types 1.Text Area Checkpoint 7.

Right-click on the appropriate field and choose “Insert Standard Checkpoint”.Insert A Checkpoint From The Active Screen    A checkpoint can be added after a test is created. . Use the Active Screen to select the field on which the checkpoint will be added.

Regular Expressions  Regular expressions enable Quick Test to Identify Objects and text strings with varying values. .

you will answer No. it will ask you to treat it as a literal character. Generally. From the Checkpoint Properties window. Note: There are 4 steps to ensure that a regular expression is inserted correctly. By using special characters you define the conditions of the search. If QTP sees there are characters that can be misconstrued as a regular expression. Add the regular expression. ensure Constant is enabled and click on the note paper icon. Check Regular Expression checkbox. Figure 6-6 will use [A-Z az]+. .Use a Regular Expression        A regular expression is a string that specifies a complex search phrase. For example.

Parameterize a checkpoint.Parameters      Objectives Describe and use multiple parameter types. Drive data in multiple iterations. Analyze errors during iterations. .

Data driving allows one script to test application functionality with many sets of data. Speed. thus increasing test coverage. . free resources to do other kinds of quality control. repeatability.Input Parameters For Data driven Tests    Input Parameters For Data Driven Tests A data-driven test is one that runs a set of user actions with multiple input values. Automated data driven testing frees you to perform more tests.

. Input parameter values are input into the application from some outside data source. which represents an expandable range of values. recorded value in a step with a dynamic placeholder (parameter). Input parameter names and their values are located in QuickTest’s Data Table.Input Parameter    Input Parameters allow you to replace a static.

click on the current value.Steps to Create An Input Parameter      To create an input data table parameter: Select the step in the Keyword View that contains the recorded input value. Click on the parameterize button. From the Value column. The Constant value appears in the Value Configuration Options dialog box. .

From the Name drop down list. .Set the Parameter Value     In the VALUE CONFIGURATION OPTIONS dialog. select the Parameter radio button and ensure that Data Table is selected from the drop-down list. Enter the values that QTP will input after the test executes. enter a unique column name to create a new column in your data table or choose an existing column name from the data table. Use the default Global data sheet to store values.

If you want to show or hide the data sheet. .Supply Data to the Parameter     The design-time table is the central location for storing input parameter values. the design-time data table is displayed at the bottom of the QuickTest screen. As a default. The number of rows in the data table will cause the same number of test execution iterations to be run. click on the icon in the toolbar.

Expand the tree for each iteration (Row#) to view specific information about the execution of the specific row.Verify The Test Run   View the Test Results window to verify that each of the rows from the Design Time Data Table was used during the test run. .

. A checkpoint on a parameterized field.Parameterize a Checkpoint    You can use parameterized expected values to make your checkpoints dynamic. They Can be set on: An object property in the Object Repository.

or by specific business processes. By dividing your tests into multiple actions.A Test with Multiple Actions  Actions can be divided into logical sections. like the main sections of a transaction.  . When you create a new test. it contains one action. you can design more modular and efficient tests.

Types of Actions  There are two kinds of actions: Regular (Non-reusable) Reusable Tests that contain reusable actions can be used: Locally Externally  .

The Insert New Action window appears. Select Insert ? New Action from the QuickTest main menu.Insert Call to a New Action    You can add a new action during or after recording. Or use the “lego” icon on the toolbar to insert new action. .

Using Parameterized Data  Test data can be passed from one test to another test using the value of an input parameter. This creates a data flow between business processes. The value passed from one business process to another will come from the Data Table.    . Be aware of any data dependencies that occur within the business process.

they can be called into a “Main Calling” test in three ways: Call to New Action Call to Copy of Action Call to Existing Action . Existing or New Action     After reusable actions are created.Copied.

A message will appear stating a description of a reusable action.Set Actions as Reusable    Create a reusable action from the Action properties dialog. Check the checkbox and click OK. .

.Call An Action          You can do number of things with a reusable action. such as: Call it multiple times within a test. View the components of the action tree (you cannot modify them except in the original script) Insert a call to an external action (the action is inserted in read-only format) as local editable copy use the (read only) data from the original action Insert copies of non-reusable actions into your test. but you cannot insert calls to non-reusable actions. Call it from other tests.

A Recovery scenario consists of a) Trigger Event b) Recovery Operation c) Post Recovery Run Option .Recovery Scenarios   To instruct Quick test to recover from unexpected events and errors that occur in the testing environment during the run session.

.Recovery Scenario Wizard   We can create the recovery scenario using recovery scenario wizard. Recovery scenario wizard consists of a) Define the trigger event that interrupts the run session b) Specifying the recovery operations required to continue c) Choosing a post recovery test run operation d) Specifying a name and description for the recovery scenario e) Specifying whether to associate the recovery scenario to the current test and / or to all new tests.

Recovery Scenario Wizard .

Types of Programmatic descriptions a) We can list the set of properties and values that describe the object directly in a test statement.Set”impetus” b) We can add a collection of properties and values to a description object and then enter the description object in the statement.value:=“agentname” myobject(“html tag”). Set myobject=Description.Creating Tests without Object Repository   We can use programmatic descriptions to perform an operation on an object that is not stored in the Object Repository.WinEdit (myobject).g: Dialog(“name:=Login”).Set”impetus” .value:=“a” Dialog(“name:=Login”).Create() myobject(“attachedtext”). e.WinEdit(“attachedtext:=agentname”).

Enhance TestCases With Descriptive Programming  Interact with Test Objects not stored in the Object Repository – You can also instruct QT to perform methods on objects without referring to the object repository without referring to the object’s logical name. To do this you provide QT with a list of properties and values that QT can use to identify the object or objects on which you want to perform a method .

Enter Programmatic Descriptions Directly into Test Statements     You can describe an object directly in a test statement by specifying property : = value pairs describing the object instead of specifying an object’s logical name. “…”. Syntax:TestObject(“PropertyName1:=PropertyValue”. “PropertyNameX:=PropertyValueX”) Where “Test Object” is test object class .

50 . For Example: Window(“Text:=Myfile.e. you may want to assign the object you create to a variable.txt-Notepad”) MyWin.Move 50.Contd….50 If you want to use the same programmatic description several times in one test. For Ex:. Each property:= value pair should be separated by commas and quotation marks.       PropertyName is PropertyValue i.Set MyWin := Window(“Text:=Myfile.txt-Notepad”).Move 50. the test object property and its value .

 Once we have filled the Properties collection with a set of Property objects (properties and values).Value=50 Window(“Error”).click IF Entered… Set MyDescription= Description.Contd….Click . “width:=50”).WInbutton(“text:=OK”.(Instead of Entering) Window(“Error”). For Ex:.Value=“OK” MyDescription(“width”). you Can specify the Properties object in place of a logical name in a test statement.Create() MyDescription(“text”).WinButton(MyDescription).

190!745079084-0.75943 /9 '.3.75943 .:0 3/4 7747 3:9943 08.3/..010/90!74507908.9089 89.3850./4139073 3/4 7747 3-:9943 909   /9 .041.80941!745079 4-0.90 08.902039 47 3890...75943 70.:08 4: .935.4.98 574507908.75943 909 '.439/  3.40.203..9439. 39070/ $0908.00.:0  08.7594308. ..

Sign up to vote on this title
UsefulNot useful