51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2265|回复: 4
打印 上一主题 下一主题

请教如何在多个测试脚本中调用同一个function啊?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2006-6-7 17:00:49 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
我想在多个测试脚本中调用同一个文件中的函数,该怎么做啊
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

5#
发表于 2006-6-13 14:09:36 | 只看该作者
1.将这些函数定义成public function
2.在要调用的文件中call 包含这些public function的文件
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2006-6-8 11:39:54 | 只看该作者
File-Test Properties- Test Type--Compiled Modules.

http://bbs.51testing.com/viewthr ... &extra=page%3D1
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2006-6-7 18:47:19 | 只看该作者
compiled modules.

Function Viewer

Enables you to load and unload compiled modules, to copy, paste, and execute the functions of loaded compiled modules and tests, and to open compiled modules and tests containing loaded functions.
You can see all loaded compiled modules and tests containing loaded functions in the Function Viewer.
If you expand a compiled module or test, you can see the functions it contains.
If you expand a function, you can see the arguments, if any, that the function uses.

Function Viewer Options

Load: Opens the Load Functions dialog box. Enables you to load a compiled module. When a compiled module is loaded, your tests can call its functions.
Unload: Unloads the selected compiled module and all its functions. This works only for a compiled module that was loaded either using the Load button or using the load
function from another test. A compiled module that was loaded by running it in WinRunner can be unloaded only by clicking the Stop button.

Unload All Modules: Unloads all compiled modules and their functions. This works only for a compiled module that was loaded either using the Load button or using the
load function from another test. A compiled module that was loaded by running it in WinRunner can be unloaded only by clicking the Stop button.
Copy: Copies the prototype of the selected function to the clipboard. You can then paste it to another application.
Paste: Copies and pastes the prototype of the selected function to the current cursor position in the test window. You can also use drag-and-drop to paste the prototype of a function to the test window.

Execute: Runs the selected function. If the function requires you to enter arguments, the Function Arguments dialog box is displayed.
Go to: Opens the selected compiled module, test, or function in the test window. If you open a function, the entire test in which that function is defined is opened, and the function’s first line is marked by the execution marker.
回复 支持 反对

使用道具 举报

该用户从未签到

2#
发表于 2006-6-7 18:39:43 | 只看该作者
打开->运行
其它文件中就可以调用了.
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-24 14:51 , Processed in 0.069604 second(s), 26 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表