reusable and multiple actions usingqtp65-student-01a

9
Reusable and Multiple Actions USINGQTP65-STUDENT-01A

Upload: erick-malone

Post on 05-Jan-2016

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Reusable and Multiple Actions USINGQTP65-STUDENT-01A

Reusable and Multiple Actions

Reusable and Multiple Actions

USINGQTP65-STUDENT-01A

Page 2: Reusable and Multiple Actions USINGQTP65-STUDENT-01A

Recall the Objective – Test a Business Scenario

Create automated tests to test a business scenario

Login

Insert New Order

Update Order

Register

Sign-In

Add New Reserv

Windows Flight Application Mercury Tours Web Site

Verify that the order number generated in Insert New Order is used to open and update an order

Verify that the user name and password created during registration is used to sign into the web site

Page 3: Reusable and Multiple Actions USINGQTP65-STUDENT-01A

Lesson Objectives

At the end of this lesson, you will be able to:

Create a reusable action

Call a reusable action from an external test

Discuss how reusable actions affect data and parameters

Page 4: Reusable and Multiple Actions USINGQTP65-STUDENT-01A

A Test Can Have Multiple Actions

Main Menu Screen

Input Purchase Info

Select Source of Supply

Save the test

Action 1

TEST – Purchase Requisition

Return to Main Menu

Logoff

Action 2

Action 3

Action 1

TEST – Purchase Requisition

Input Purchase Info

Select Source of Supply

Save the test

Return to Main Menu

Logoff

Main Menu Screen

Page 5: Reusable and Multiple Actions USINGQTP65-STUDENT-01A

One Action Repeatedly Recorded

Login

TEST – Create New Entry

Create a new entry

Login

TEST – Update Order

Update an existing order

Login

TEST – Cancel Order

Search order number then cancel order

Three tests, three times login was recorded. Can the same action be recorded once and reused?

What are the What are the advantages of advantages of using only one using only one login test?login test?

Page 6: Reusable and Multiple Actions USINGQTP65-STUDENT-01A

Set an Action as Reusable

A reusable action has blue arrows.

Page 7: Reusable and Multiple Actions USINGQTP65-STUDENT-01A

Calling Reusable Actions from a Main Test

Action 1

CALL Login

CALL UpdateOrd

My Plan for my Test

•John made a reusable Login test.

• I can make Update Order reusable.

• I can call both tests.

QuickTest test

Page 8: Reusable and Multiple Actions USINGQTP65-STUDENT-01A

Call a Reusable Action

Select a test with reusable actionsSelect a test with reusable actions

Select from the list of reusable

actions

Select from the list of reusable

actions

Specify where the action will be

inserted

Specify where the action will be

inserted

Specify local editable copy if you want to edit

parameter values

Specify local editable copy if you want to edit

parameter values

Page 9: Reusable and Multiple Actions USINGQTP65-STUDENT-01A

Things to Consider when Using Multiple/Reusable Actions Actions can be called or copied

Run settings have to be set per action

Each action in a test with multiple actions has its own Object Repository

Parameters and data are reflected into the calling test