1. Trang chủ
  2. » Luận Văn - Báo Cáo

QUICK TEST Professional.pdf

80 1,3K 12
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Quick Test Professional 8.2
Thể loại Tài liệu
Định dạng
Số trang 80
Dung lượng 4,48 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

QUICK TEST Professional

Trang 1

QTP 8.2

QUICK TEST PROFESSIONAL 8.2

Trang 3

Mercury Quick Test Professional 8.2 provides the industry’s best solution for functional test and regression test

automation - addressing every major software application and environment.

Trang 4

Why QTP

 Ease of use:

1 QTP allows even novice testers to be productive in minutes You can create a test script by simply pressing a Record button and using an application to perform a typical business process

2 Using the Active Screen facility, several types of checkpoints for any object to verify that components behave as expected can be created simply by clicking on that object in the Active Screen.

3 Data Table, an integrated spreadsheet with the full functionality

of Excel, is used to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage.

 QuickTest Professional supports functional testing of all popular

environments, including Windows, Web, Net, Visual Basic, ActiveX, Java, SAP, Siebel, Oracle, PeopleSoft, terminal emulators, and Web services

Trang 5

Add-in Manager

Trang 6

Keyword View

Trang 7

Expert View

Trang 8

Create the Basic Test

 Record user actions

 Save the test

 Verify successful playback

Trang 9

Record User Actions

Trang 10

Start recording on the Mercury Tours Web site.

Choose Test > Record or click the Record button The Record and

Run Settings dialog box

Trang 11

In the Windows Applications tab, confirm that Record and run on these applications (opened on session start) is selected, and that

there are no applications listed.

 This setting prevents you from inadvertently recording operations

Trang 12

Recording Modes

Normal: recognizes the objects in the application

irrespective of their location in the screen

Analog: records the exact keyboard and mouse

operations with respect to the screen coordinates or the application window

Low level: records any object irrespective of support

from QTP Recognizes all run time objects as

windows objects It is used when an object is not

identified by Quick test

Trang 13

Save the Test

 The test can be saved into a Windows file system (as below).

 If TestDirector is available and connected with QTP, the test can be saved there.

 QTP creates an entire structure of files and directories to support a single QuickTest script for each saved test.

Trang 14

Verify Successful Playback

 Use the ‘Run’ button to begin playback from the top of the test.

 Select the location of the test results- either a new results folder

or a temporary folder.

Trang 15

enables us to check a specific part of the application or

to confirm that a certain part of the test runs correctly

 The Update Run option in the Test menu is used to

update the Active screens, Checkpoints and the test

object descriptions

Trang 16

Viewing the Test Results

 Test results can be stored in their own location (for

documentation) or in a temporary location that is overwritten each time the test is run (debugging).

Trang 17

How QuickTest Works with Objects

What are Object Properties?

A set of characteristics that defines an object’s appearance, values, state and identity in an application.

– QTP captures these object properties during recording.

– Logical Name – Logical name is a value QuickTest usually takes

from one of the object properties (like TEXT) to refer to the

object in the recorded script.

Trang 18

Object Repository

 What is Object Repository?

Object Repository is a location within the test structure where QuickTest stores object information captured during recording

The Object Repository can be used to:

– Rename logical names for readability.

– Add a new object in the repository.

– Configure the object properties used to identify an

object

Trang 19

Object Repository

Object Name and Class

Trang 21

Object Spy

 It can be used to view the properties and values

of an object in any open application Click the pointing hand to select the object in the

application The object’s properties (Test object properties and Run-Time object properties) and methods can be identified The object’s

hierarchy tree is also displayed To perform

other events such as mouse clicks or window focus hold the CTRL key.

Trang 23

Object Identification

Trang 24

SynchronizationWHAT IS SYNCHRONIZATION ?

Synchronization refers to adding a step in the script that instructs Quick Test to wait for a particular object before proceeding to the next step during playback

When do you need SYNCHRONIZATION ?

When you observe that the application takes a longer time to process information sent or respond to a client request, add a synchronization step while recording For example:

- A progress bar to reach 100%

- A button to become enabled

- A window or pop-up message to open

Trang 25

How to ADD Synchronization

 Synchronization can be added ONLY during recording

 Identify the object to be synchronized

 Navigate to the window where the object is located

 Locate the step in the test that corresponds to the object

 Start recording and add the synchronization point

Trang 26

Two ways to set Synchronization

 Global synchronization value for all Objects

Instructs Quick Test to wait for all the objects for a specific amount of time

 Synchronization of a specific Object

Instructs Quick Test to wait for a specific object only

Trang 27

Global synchronization value

for all Objects

 Menu  Test 

Settings  Run

 For every object

in the test, Quick

Test can wait a

maximum

number of

milliseconds

Trang 28

Synchronization of a Specific Object

 Menu  Insert 

Step 

Synchronization

Point

 Quick Test shall

pause the test until

the object property

achieves the value

specified here (or

until the specific

waiting criteria E.g

‘Text’ property for

window, ‘Label’

Trang 29

Checkpoints In QTP

 A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property

Trang 31

Types and Their Use

 Checks the value of

an image in the application.

Trang 32

 Text Checkpoint

text string is displayed in the appropriate place in your application or

on a Web page

Trang 33

 Checks the data content of XML documents in the application.

Trang 34

When to Use Checkpoints

 Before creating checkpoints on web objects we have to select web-test option in ADD-IN Manager.

 If the objects developed in HTML we can use Standard Check point.

 If the Objects developed in XML we can use XML Check point.

Trang 35

How Checkpoints Work -

Playback

Script Expected Result

Execute checkpoint Object: Button

Actual = expect

ed ?

Test Results PASS

Trang 36

Sample Objects that QuickTest can

Verify

Tables/ Grids

Radio Button Text Area

Checkbox Status Bar

Drop down list Windows Object

Edit Field Checkbox

Image Link Radio Button

Images Menu command

Text Link Drop down list

Text Area Edit Field

Browser Window

WEB WINDOWS

Trang 37

How to Add a Checkpoint

»Select the object in the Active Screen

»Right Click on it and Select ‘Insert Standard Checkpoint’

or

Menu Insert Checkpoint  Standard Checkpoint

Trang 38

How to Add a Checkpoint… set

expected value

» Do not automatically select the pre-defined list of properties to check.

» Scroll down the property list to find the property( or properties) that best meets the test

Trang 39

Table Checkpoint

Trang 41

Database Checkpoint

 Choose Insert > Checkpoint > Database Checkpoint The Database Query Wizard opens.

Trang 42

Database Checkpoint contd

Trang 44

How to Add a Checkpoint…

Test Result

Trang 46

Insert

Output Value Select the type of output value.

Right click the object in the Active screen and select the type of output value to be added

Trang 47

Types of Output Values

 Standard Output

Values

 Text Output Values

 To output the property values of most objects like editbox,button,radi

o button,list box,etc

 To output text strings displayed in the application

Trang 48

 Text Area Output

of the application

contents of database cells, based on the results of a query on the database

of XML elements and attributes in XML

documents

Trang 49

How to use Output Value

Select the

output to be

considered

Select the Property

Trang 50

How to use Output Value…

Contd.

Output Value

Trang 51

Parameterization

 A parameter is a variable that is

assigned a value from an external

data source at run time We use

parameterization when we want to

change the value of properties at run time.

Trang 53

DataTable Parameters

 The Test runs once for each line of data in the DataTable Each iteration takes a

different value from the datatable

choose the Run tab

Test

Settings

Specify an option in the Datatable iterations

Trang 54

Environment variable Parameters

 The Environment variables can have Quick Test generated values or values supplied from external files

Trang 55

Random number Parameters

 It enables us to use random numbers

as values in the test We can specify the range from which the random

number is generated By default, the random number range is between 0 and 100.

Trang 56

How to Parameterize an Input

Trang 57

How to Parameterize an Input

Trang 58

How to Parameterize an Input

Value…contd

Trang 59

 A test is composed of actions or

logical sections The steps we add to the test are added within the test’s actions By default, each test begins with a single action

 When we run a test with multiple

actions, the Test Results are divided

by actions so that we can view the

Trang 60

 Each action has its own sheet in the Data Table so that we can insert data that

applies only to that action.

Actions can be of three types:

 Non-re-usable: Action can be used in the local test, only once.

 Reusable: Action can be used in the local test, multiple times.

Trang 61

 External: These are reusable actions

created in another test This can be of two types If a call to an external action is

used the action is read only in the calling test But, any existing action can be

inserted as a copy of the original action In this case, we can modify this copy of the

Trang 62

Actions on Quick Test Window

(Keyword View):

Actions Tool Bar contains buttons and a

list of actions, enabling us to view the

details of an individual action or the entire test flow The test flow displays the overall flow of the test with all the actions in the test.

Trang 64

How to set an Action as

Reusable

Trang 65

How to Call a Reusable Action

Trang 66

Recovery Scenario Manager

The recovery scenario manager is used to :

 defining the trigger event that interrupts the run session

 specifying the recovery operation(s) required to continue

 choosing a post-recovery test run operation

 specifying a name and description for the

recovery scenario

 specifying whether to associate the recovery scenario to the current test and/or to all new

tests.

Trang 68

Components of a Recovery

Scenario

The event that interrupts

the test run (e.g a pop

up screen or run error)

The operation that

needs to be performed

in order to continue

running the test.

The instructions on how

the test should proceed

once the recovery

operation is performed.

Trang 69

Steps to add a Recovery

Scenario…contd

Trang 70

Steps to add a Recovery

Scenario…contd

Trang 71

Steps to add a Recovery

Scenario…contd

Trang 72

Steps to add a Recovery

Scenario…contd

Trang 73

Steps to add a Recovery

Scenario…contd

Give a name and description to the recovery scenario

Trang 74

Steps to add a Recovery

Scenario…contd

Trang 75

 The Pause option in the Debug menu is used to temporarily suspend the run To resume running

a paused test, click the Run button

 The StepInto(F11) option in the Debug menu is used to run the current line of the test If the

current line of the active test or component calls another action or a function, the called

action/function is displayed in the QuickTest

window, and the test or component pauses at the first line of the called action/function

Step Out Choose Debug > Step Out or click the

Step Out button, or press SHIFT+F11 only after using Step Into to enter a action or a user-

Trang 76

The Insert\Remove Breakpoint(F9) option in the Debug menu is used to stop a test run at a pre-determined place in a test

To set a breakpoint:

1 Click a step or a line in the test or component

where you want the run to stop

2 Choose Debug > Insert/Remove Breakpoint, press F9, or click the Insert/Remove

Breakpoint button The breakpoint symbol is

displayed in the left margin of the Keyword View and Expert View

Trang 77

Debug Viewer

is used to view, set, or modify the current value of objects or variables in the

test,when a test stops at a breakpoint

To open the Debug Viewer pane:

1 Run a test or component with one or more breakpoints.

2 When it pauses at a breakpoint, choose

Trang 78

Debug Viewer

Trang 79

Debug Viewer Cntd

Watch Expressions Tab: Use the Watch Expressions tab to view the current value of any variable or VBScript object that you enter in the Watch Expressions table

Paste or type the name of the object or variable into the

Name column and press ENTER to view the current

value in the Value column

Variables Tab :Use the Variables tab to view the current value of all variables, in the current action or selected

subroutine, identified up to the point where the test or

component stopped

Command Tab :Use the Command tab to execute a line

of script in order to set or modify the current value of a

Trang 80

Concepts Thank You

Ngày đăng: 25/08/2012, 10:23

TỪ KHÓA LIÊN QUAN

w