QTP指南中Action调用例子

上一篇 / 下一篇  2011-02-14 13:04:43 / 个人分类:QTP

如下是记录Action的一些知识点:

 

Call to copy of action

对于调用复制的Action的时候,此Action可以变更,不会影响和被其余的Action影响。相对独立。

 

 

Call to existing action

调用的已存在的Action是只读的,因此只能修改已保存的原Action,这有一个好处:

1.        可以从不同的Test调用Action

2.        维护Action变得简单,因为只需要更新最初的已存在的Action

 

如果原封不动,选择Calls to existing action

如果稍微改动,选择Copy of another existing action

 

 

From Test:选择你需要调用action所在的Test

Action:只显示Test中可复用的Action

 

Sign_in[ActionPractice] 

external action

 

所谓Test Flow就是Test主干部分

 

关于Action位置的放置问题:

只读的在前,可修改的在后面

 

 

调用的Action Item样子如下

Copy: Copy of FlightOrder

Existing: Sign_in[ActionPractice]

 

Parameterizing an action

参数化Action

DataTable显示

DataTableViewsheet显示为相关的Actions

Global,Sign_in [ActionA],ReturnHome [ActionA], andCopy of FlightOrder

 

The Global tab is data sheet whose data is used for the entire test. If five rows of data are displayed in the global table, the test will run five times. You can create data sets in each action using the relevant action sheet. So you can define action to run many times within each test iteration.

 

Note: The call action data sheets are displayed in gray and cannot be edited because each of these data sheets belong to the corresponding called action and can be edited from the called action’s original test only.

 

Exclusively

选择参数化的Action只可以用于当前Action

 

 

By default, QTP only runs one iteration of each action in a test.

 

Action Call Properties

Hint: When an action runs in iterations, it must end in the same condition in which it started.

Otherwise, the test run may fail when beginning a new iteration.


TAG:

 

评分:0

我来说两句

Open Toolbar