




下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Reusable and Multiple Actions,Objectives,After completing this chapter, you will be able to: Create multiple actions from a single action. Change the default action name to better describe the action. Define an action as reusable. Call a reusable action into a main test. Drive data using the global
2、and local data sheets.,Where are we?,Figure 1 Run Multiple, Integrated Tests,QuickTest Professional allows you to create a test with more than one action. You can create modular actions that can be used across several tests.,Single Action Test,New Order Business Process,Log-in,Create New Order,Log-o
3、ut,Action 1: Single Action Test,Single Action Test,QTP records all steps of the business process into a single action. By way of definition, Action refers to the QTP designation for a set of steps that you want to playback as a group. The figure* illustrates all three business processes (Log in, Cre
4、ate New Order and Logout) are recorded as a single Action. * Figure 8-2,Single Action Test,A Tests with Multiple Actions,New Order Business Process,Create New Order,Log-out,Multiple Action Test,Action1,Action2,Action3,Log-in,A Tests with Multiple Actions,Actions can be divided into logical sections,
5、 like the main sections of a transaction, or by specific business processes. When you create a new test, it contains one action. By dividing your tests into multiple actions, you can design more modular and efficient tests.,Create A New Action,Create A New Action,Create A New Action,You can create a
6、 test with multiple actions either while recording or after recording. Either way is efficient. Select INSERTCALL TO NEW ACTION from the QuickTest main menu. The INSERT CALL TO NEW ACTION window appears.,Modify An Action Name,Type action name here,Modify An Action Name,Once you have separated one ac
7、tion into multiple actions, give descriptive names to each action. Steps to modify an action name: Right-click on Action1 the Action Properties window appears. In the Action Properties window under the General tab enter a logical action name to modify the default Action name. Figure (8-5) illustrate
8、s changing Action1 to Login. This makes the test easier for others to understand when viewing the test from the keyword view tree.,One Action Used Many Times,Test-Create New Entry,Login,Create a new entry,1,Test-Update Order,Login,Updating an existing order,2,Test-Cancel Order,Login,Searching order
9、number than cancel order,3,When you plan a suite of tests, you may realize that each test requires one or more identical activities, such as logging in. Rather than recording the login process three times in three separate tests, and enhancing this part of the script (with checkpoints and parameteri
10、zation) separately for each test, you can create an action that logs into the application in one test. Inserting calls to existing actions and using reusable actions, makes it easier to maintain your tests; when an object or procedure in your application changes, it only needs to be updated one time
11、, in the original action. Be aware of how this could affect all tests using this action.,One Action Used Many Times,Set Actions as Reusable,Rename the Action,Mark the Action as Reusable,Create a reusable action from the ACTION PROPERTIES dialog. Check the RESUABLE ACTION checkbox and click OK. A mes
12、sage will appear stating a description of a reusable action. The action icon changes to a reusable action.,Set Actions as Reusable,Copied, Existing or New Action,Call a Copied,Existing,or New Action,Copied, Existing or New Action,After reusable actions are created, they can be called into a “Main Ca
13、lling” test in three ways: Call to New Action Call to Copy of Action Call to Existing Action,The Test Flow List,The Test Flow List,The Test Flow List,The Test Flow List: - Changes with the addition of a reusable action. - Enables viewing of the action tree for a selected reusable or external action.
14、 The test flow appears when a test is recognized as having called actions in it. An action tree displays all of the details of the selected reusable or external action. You can return a reusable action to its non-reusable state. However, all of the calls made to the action will be destroyed.,Action
15、Data Structure,Test File Structure,Action Data Structure,In the action data structure, each action has its own: Folder with a per-action object repository Local data table sheet Run settings,Delete An Action,Delete a Reusable Action,Delete a Non-Reusable Action,Delete An Action,Because reusable acti
16、ons can be used throughout your test or test set, when you delete an action, you must decide to delete a specific occurrence of the action and/or all of its calls. A different message appear when you are about to delete a non-reusable action.,We will be discussing: Parameters used in a test. Global
17、data sheets. Local data sheets How data is passed from the associated data sheet.,More Advanced Concepts,A Test Using Global and Local Data Sheets,Action1 Log In,Action2 New Order,Action3 LogOut,Entire test will run one global iteration for each row in the Global Data Sheet,Actions using a Local Dat
18、a Sheet will run all specified iterations before moving to the next action or to the Global Data Sheet,New Order (Local),LogIn (Global),This test represents the business process wherein the agent logs into the Mercury Flight application, creates a number of new reservation orders, then logs out. The
19、 test is run using a different agent name.,A Test Using Global and Local Data Sheets,Using Parameterized Data,Parameters set in both tests,Log On,Create Order,Open Order,Log Off,Flight Date,Outputs of test #1,Inputs to test#2,Use Output as Input,Using Parameterized Data,Test data can be passed from
20、one action to another action using the value of an input parameter. This creates a data flow between business processes. The values 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.,Data Table Sheets G
21、lobal,Global Data Sheet,Data Table Sheets Global,The global data sheet: Enables you to create a new column or select an existing column in the Global sheet of the data table. Inserts or outputs a value from or to the current row of the global data sheet during each global iteration at run-time. Valu
22、es found in the Global data sheet are driven into the parameter(s) of the action. The Global data sheet iterates data on all actions. Your entire test will run one time for each row in the data sheet.,Data Table Sheets Local,Cell Entry Data,Local Data Sheet,Data Table Sheets Local,When a local data
23、sheet is used: QTP will refer to the Run settings for the specified action. Data will iterate in the action independently of other actions. The parameters and data will appear with different tabs in the main calling tests data table.,Data Table Iterations,Data Table Iterations,Data Table Iterations,
24、To affect the run settings for a specified action, set them in the Action Call Properties dialog box. Right-click on the Action label in the keyword view, and choose Action Call Properties from the list provided. Action Call Properties allows you to set the number of times an action will iterate through its data.,External Action Properties,External Action Properties,External Action Properties,Right-click on the external action and select AC
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025-2030全球及中国信息技术设备处置行业市场现状供需分析及投资评估规划分析研究报告
- 2025-2030全球与中国绿豆粉面行业需求预测及发展创新前景研究报告
- 2025-2030儿童护肤品产业政府战略管理与区域发展战略研究咨询报告
- 2025-2030低能量饮料行业市场发展分析及前景趋势与投资战略研究报告
- 2025-2030仿生机器人市场发展行情监测与前景需求潜力分析研究报告
- 2025-2030中药粉碎机行业市场深度调研及前景趋势与投资研究报告
- 2025-2030中国黄芪市场销售规模及未来发展战略规划研究报告
- 2025-2030中国鹿茸行业经营模式与竞争趋势预测分析研究报告
- 2025-2030中国高通量筛选技术行业市场发展趋势与前景展望战略研究报告
- 2025-2030中国高分子防水材料行业市场发展趋势与前景展望战略研究报告
- 2024年江苏事业单位真题下载
- 房地产行业未来走势与机遇分析
- ISO27001:2022信息安全管理体系全套文件+表单
- 系统本地部署协议合同
- 2025年中国色度仪行业发展运行现状及投资策略研究报告
- 路基排水工程首件施工方案
- 上海市黄浦区2025届高三高考二模地理试卷(含答案)
- 2025年淄博市光明电力服务有限责任公司招聘笔试参考题库含答案解析
- 游乐场区块链数据共享-全面剖析
- 2024年陕西省县以下医疗卫生机构定向招聘考试真题
- 槽轮机构槽轮机构包头课件
评论
0/150
提交评论