51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3061|回复: 6
打印 上一主题 下一主题

[Robot] 如何自定义VP比较方法?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2006-1-11 15:51:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
各位高手,在VP的比较中,Robot允许使用自己定义的函数对actual data和baseline进行比较。不知道是否有这方面的例子,请高手们指教。
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2006-1-11 16:12:53 | 只看该作者
为什么要自己定义函数
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2006-1-12 09:49:04 | 只看该作者
发掘新鲜事物阿,而且这样的话,可以在自定义比较函数中做更多的事情,比如同步文件内容,或者通知某应用程序做一些工作等等。
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2006-1-12 10:30:47 | 只看该作者
vp只是个简单的判断,我看不出来楼主想问什么,要例子就免了
回复 支持 反对

使用道具 举报

该用户从未签到

5#
发表于 2006-2-10 22:49:47 | 只看该作者
这个问题曾经问过ibm的人
回答如下:

关于对验证点的直接操作,我们建议使用Custom VP的方法:

有三个函数和这一操作密切相关:

1〉、   currFilepath = SQAVpGetCurrentBaselineFileName("MyVP","CSV")

该函数返回当前验证点基线文件名(含路径):currentbaseline

The currentbaseline takes the directory path to the verification point
as it appears in the Robot GUI script. The directory path should include
the name of the verification point file. That file can be found in the
project's TestDatastore\DefaultTestScriptDatastore\TMS_Scripts\vp
folder.

The naming convention for file is

ScriptName.VerificationPointName.base.grd (for Clipboard, Menu & Object
Data VPs)
ScriptName.VerificationPointName.base.img (for Region & Window Image
VPs)
ScriptName.VerificationPointName.base.obp (for Object Property VPs)
ScriptName.VerificationPointName.base.txt (for Alphanumeric VPs).

2>、     ExpectedFilepath = SQAVpGetBaselineFileName("MyVP","CSV")
该函数返回当前验证点基线文件名(含路径):expected baseline ,它包含运行
时我们对验证点的期望值

The expected baseline takes the directory path to the expected
verification point as it appears in the log. This is the result that
Robot expects to capture during playback. The directory path should
include the name of the verification point file. That file can be found
in the project's TestDatastore\TMS_Builds\BuildName.Build\LogFolderName.
LogFolder\LogName.Log\vp folder (where BuildName, LogFolderName and
LogName are the names of the build, log folder and log to which the
script was played back).

The naming convention of the expected baseline file is the same as the
currentbaseline file, except that the expected baseline file uses exp
instead of base.

3>、actFilepath = SQAVpGetActualFileName("MyVP","CSV")
该函数返回包含当前验证点实际获得值的文件名(含路径):actual baseline
The actual baseline takes the directory path to the actual verification
point. This will only be generated if the results captured on playback
differ from the expected verification point. The directory path should
include the name of the verification point file.

The actual baseline file, it is exists, is in the same location as the
expected baseline file. The naming convention of the actual file is the
same as the expected baseline file, except that the actual baseline file
uses actXXXX instead of exp. XXXX is a random 4 character alphanumeric
string that is generated during playback. The user will need to browse
to the LogName.log\vp folder to find out the what the XXXX actually is.



不过我没看懂……因为又发现了比较简单的办法(也是ibm的人提供的,直接写日志的方法达到类似于验证点的作用):
1>.If you want a customer VP log , you need do it as :(I have sent you
this example)
If compareResult = False Then
        Call SQAVpLog(sqaFail,"MyVP","",loggedFilepath,actFilepath)
      Else
        Call SQAVpLog(sqaPass,"MyVP","",loggedFilepath,"")      

    End If
2>.if you just want have a log message :
You can use
SQAlogmsg(...)

[[i] 本帖最后由 youyun 于 2006-2-10 22:54 编辑 [/i]]
回复 支持 反对

使用道具 举报

该用户从未签到

6#
发表于 2006-2-27 14:46:49 | 只看该作者
不清楚楼主的意思
回复 支持 反对

使用道具 举报

该用户从未签到

7#
发表于 2006-2-27 19:03:38 | 只看该作者
好像youyun说的和楼主说的不一样,楼主是想直接自己定义一些比较函数,如sqapropertyget这样的,youyun说的是对已存在验证点文件的操作。
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-11-13 03:37 , Processed in 0.070238 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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