reusable and multiple actions usingqtp65-student-01a
TRANSCRIPT
![Page 1: Reusable and Multiple Actions USINGQTP65-STUDENT-01A](https://reader036.vdocuments.net/reader036/viewer/2022083005/56649f265503460f94c3d594/html5/thumbnails/1.jpg)
Reusable and Multiple Actions
Reusable and Multiple Actions
USINGQTP65-STUDENT-01A
![Page 2: Reusable and Multiple Actions USINGQTP65-STUDENT-01A](https://reader036.vdocuments.net/reader036/viewer/2022083005/56649f265503460f94c3d594/html5/thumbnails/2.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022083005/56649f265503460f94c3d594/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022083005/56649f265503460f94c3d594/html5/thumbnails/4.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022083005/56649f265503460f94c3d594/html5/thumbnails/5.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022083005/56649f265503460f94c3d594/html5/thumbnails/6.jpg)
Set an Action as Reusable
A reusable action has blue arrows.
![Page 7: Reusable and Multiple Actions USINGQTP65-STUDENT-01A](https://reader036.vdocuments.net/reader036/viewer/2022083005/56649f265503460f94c3d594/html5/thumbnails/7.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022083005/56649f265503460f94c3d594/html5/thumbnails/8.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022083005/56649f265503460f94c3d594/html5/thumbnails/9.jpg)
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