51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3427|回复: 8
打印 上一主题 下一主题

我想得到测试用例的路径,用函数getvar()怎么不可以呢?

[复制链接]

该用户从未签到

1#
发表于 2004-10-27 10:19:00 | 显示全部楼层
In the following example, the values of the timeout and delay test options are set for the duration of a batch test run. After the run, the previous values are restored.


static old_t,old_d;

# Saves the original timeout values in the "old_t" variable.

old_t = getvar ("timeout");

# Saves the original delay values in the "old_d" variable.

old_d = getvar ("delay");

# Set the values of timeout and delay for a batch test.

setvar ("timeout", 30);
setvar ("delay", 3);
call batch();

# At the end of the test return the values.

setvar ("timeout", old_t);
setvar ("delay", old_d);
回复 支持 反对

使用道具 举报

该用户从未签到

2#
发表于 2004-10-27 10:38:47 | 显示全部楼层
Originally posted by lanxn at 2004-10-27 10:33 AM:
我看过这个例子了,它和我的不太一样.我想得到程序运行的路径用getvar()是否能实现呢,如果不能实现应该用什么函数?你在加载GUI Map文件的时候,写的路径是直接写d:\\b\\..吗?

示例:GUI_load("D:\\1\\test\\安装实体按钮.gui");
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2004-10-27 13:06:02 | 显示全部楼层
static app_name="C:\\XXXX\\wpsview.exe";
        if(invoke_application(app_name,"","",SW_SHOW)!=0)
把这个改成
if(invoke_application("C:\\XXXX\\wpsview.exe“,"","",SW_SHOW)!=0)
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2004-10-27 13:23:31 | 显示全部楼层
要测试的程序都不存在,当然要texit;(退出测试)
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-6-8 10:56 , Processed in 0.071022 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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