QTP的那些事--可重用action(call to existing action)的使用

简介:
+关注继续查看

参考了下QTP的帮助文档中的飞机订票系统的使用方式。

在被重用的action中设置action properties中的parameters属性,设置输出或者是返回的值。

parameter(“属性值”),即可,返回值也需要采用这种方式即可。

callAction “action名称[action所在的test的名称]”,action中输入参数1,action中输入参数2,…,action中输出参数,例如如下:

 

RunAction "销售日报表查询 [销售日报表]", oneIteration,"BJ-kk123-SH ","ON","ON","","",res
QTP的帮助文档对对于RunAction,说明是有三个参数,第一个参数是需要运行的action的路径,第二个是运行的迭代的次数(对于被运行的action如果参数是datatable的时候可能会用上),第三个参数就是被运行的action运行的输入参数值,parameter的介绍如下:

第一个参数ActionName参数

String

The name of the action.

Note: 在语句中必须要强制赋值给actionname不能使用变量进行设置. Do not use a variable. For example, write: 
RunAction="Action1[ExternalTest]" 
and not:
aName="Action1[ExternalTest]"
RunAction aName

第三个参数Parameters参数:

Variant

Optional.

The values and storage locations for the called action's input and output parameters. Input parameters are listed before output parameters.

For an input parameter, specify either a fixed value or the name of another defined parameter (可以是Data Table 参数, environment 参数, or 一个action中call action properties中的input parameter参数) from which the argument should take its value.

For an output parameter, specify either a variable in which you want to store the value or the name of a defined parameter (Data Table parameter, environment parameter, or an action output parameter of the calling action).

大致就是输入参数需要输入一个特定的值,而对于输出参数只需要指定一个变量赋值即可。在被调用的action中的输入参数或者是输出参数可以使datatable对象,可以使environment对象,可以使action属性中的输出参数属性。

 


本文转自hcy's workbench博客园博客,原文链接:http://www.cnblogs.com/alterhu/archive/2012/03/25/2416726.html,如需转载请自行联系原作者。
目录
相关文章
Flutter的setState的使用注意事项以及报错The method ‘setState‘ isn‘t defined for the type
Flutter的setState的使用注意事项以及报错The method ‘setState‘ isn‘t defined for the type
|
JavaScript
一步一步实现call和apply方法,超简单!
前言 this 指向问题一直是一个老生常谈的问题了!我们对它可以说是又爱又恨,因为 this 指向常常没有按照我们的想法去指向谁,导致程序无缘出现许多 bug。所以我们常常直接强制改变程序中的 this 指向,我们常用的方法有 bind、apply 和 call,bind 与其它两个稍许不同,所以我们本篇文章专门讲解 call 和 apply 方法,并且手动模拟实现它们。
96 0
一步一步实现call和apply方法,超简单!
在S4 key user tool里创建Custom Logic的后台实现
在S4 key user tool里创建Custom Logic的后台实现
在S4 key user tool里创建Custom Logic的后台实现
SAP Spartacus user-addresses.effect.ts里发送地址加载成功的action,会触发我们自己的reducer
SAP Spartacus user-addresses.effect.ts里发送地址加载成功的action,会触发我们自己的reducer
53 0
SAP Spartacus user-addresses.effect.ts里发送地址加载成功的action,会触发我们自己的reducer
使用action framework 实现order change时自动发送邮件
Created by Jerry Wang, last modified on May 01, 2014 具体说明可以参考这个blog
使用action framework 实现order change时自动发送邮件
Action framework BAdI Definition TRIGGER_EXECUTED
Created by Jerry Wang, last modified on May 28, 2014
118 0
Action framework BAdI Definition TRIGGER_EXECUTED
Action framework - Table PPFTTRIGG
Created by Jerry Wang, last modified on May 01, 2014
72 0
Action framework - Table PPFTTRIGG
Action Framework- Table PPFSFMLRU
Created by Jerry Wang, last modified on Apr 30, 2014
82 0
Action Framework- Table PPFSFMLRU
|
JavaScript
call,apply,方法的使用
//apply和call的使用方法 /* * apply的使用语法 * 函数名字.apply(对象,[参数1,参数2,...]); * 方法名字.apply(对象,[参数1,参数2,.
939 0
推荐文章
更多