90 likes | 394 Views
Reusable and Multiple Actions. USINGQTP65-STUDENT-01A. Recall the Objective – Test a Business Scenario . Create automated tests to test a business scenario. Windows Flight Application. Mercury Tours Web Site.
E N D
Reusable and Multiple Actions USINGQTP65-STUDENT-01A
Recall the Objective – Test a Business Scenario Create automated tests to test a business scenario Windows Flight Application Mercury Tours Web Site Verify that the user name and password created during registration is used to sign into the web site Login Register Verify that the order number generated in Insert New Order is used to open and update an order Insert New Order Sign-In Update Order Add New Reserv
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
A Test Can Have Multiple Actions TEST – Purchase Requisition TEST – Purchase Requisition Action 1 Action 1 Main Menu Screen Main Menu Screen Action 2 Input Purchase Info Input Purchase Info Select Source of Supply Select Source of Supply Save the test Save the test Return to Main Menu Return to Main Menu Logoff Action 3 Logoff
One Action Repeatedly Recorded TEST – Create New Entry Three tests, three times login was recorded. Can the same action be recorded once and reused? Login Create a new entry TEST – Update Order Login Update an existing order What are the advantages of using only one login test? TEST – Cancel Order Login Search order number then cancel order
Set an Action as Reusable A reusable action has blue arrows.
My Plan for my Test • John made a reusable Login test. • I can make Update Order reusable. • I can call both tests. Calling Reusable Actions from a Main Test QuickTest test Action 1 CALL Login CALL UpdateOrd
Select a test with reusable actions Select from the list of reusable actions Specify where the action will be inserted Specify local editable copy if you want to edit parameter values Call a Reusable Action
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