51Testing软件测试论坛

标题: 重新启动机器后,怎么让WR自动执行脚本,请教高手! [打印本页]

作者: shorelew@    时间: 2005-5-17 09:53
标题: 重新启动机器后,怎么让WR自动执行脚本,请教高手!
如题,望高手指点!
作者: yuxingxin    时间: 2005-5-17 10:23
很有难度!
作者: shorelew@    时间: 2005-5-20 12:34
难道我的帖子就这样沉下去了!
作者: elmar    时间: 2005-5-23 11:42
写一个批处理文件:
@echo off
"C:\Program Files\Mercury Interactive\WinRunner\arch\wrun.exe" -t YourTestFile -animate -addins_select_timeout 0 -dont_show_welcome

winrunner的路径改成自己机器上的安装路径,YourTestFile改成你想自动测试的脚本的路径加名字。
然后把这个批处理文件加到运行里,或加到autoexec.bat里。大致是这样吧
作者: shorelew@    时间: 2005-5-23 13:53
命令产生了错误,大哥帮忙看看,在桌面上创建了一个文件:wrstderr,我用记事本打开里面是这样的:
wrun: Unknown option on the command line: Files\Mercury
usage: wrun [-f <filename>] [-D|-E] [-t <testname>] [-run_minimized | -animate] [-invisible]
            [-speed <normal|fast>] [-batch <on|off>] [-min_diff <threshold>] [-report_view <winrunner|unified>] [-create_unirep_info <on|off>]
            [-cs_run_delay <time-miliseconds>] [-timeout <time>] [-timeout_msec <time-miliseconds>] [-delay <time>] [-delay_msec <time-miliseconds>]
            [-beep <on|off>] [-mismatch_break <on|off>] [-capture_bitmap <on|off>] [-create_text_report <on|off>]
            [-search_path <path>] [-exp <expected>] [-verify <result>] [-tslinit_exp <expected of TSLINIT test>]
            [-fontgrp <groupname>] [-rec_item_name <on|off>] [-text_indentation <on|off>] [-gui_buf_per_test <on|off>]
            [-silent_init] [-ini <ini file name>] [-update_ini] [-cs_fail <on|off>] [-auto_save <minutes>]
            [-addins <addins>] [-addins_select_timeout <time>] [-dont_quit] [-dont_show_welcome] [-start_minimized <on|off>] [-email_service <on|off>]
            [-auto_load <on|off>] [-auto_load_dir <path>] [-run] [-td_log_dirname <path>] [-def_replay_mode <verify|debug|update>]
            [-scenario <scenarioid>] [-sgroup <sgroupname>] [-vuser <vusernum>]
            [-masterhost <hostname>] [-masterprogn <prognum>]
            [-mastervern <vernum>] [-masterstdport <portnum>]
            [-time_diff <time diff>][-single_prop_check_fail <on|off>]
            [-td_connection <on|off>] [-td_server_name <server name>] [-td_database_name <database name>]
            [-td_user_name <user name>] [-td_cycle_name <cycle name>] [-td_password <password>] [-dont_connect]
            [-wr_exception_file <filename>] [-web_exception_file <filename>]
            [-app <app_name>] [-app_params<app_params>] [-wr_wait_time <wr_wait_time>] [-app_open_win <app_open_win>]
作者: elmar    时间: 2005-5-23 13:58
你桌面上有winrunner的快捷方式吧?查看它的属性,把“目标”路径贴出来
作者: elmar    时间: 2005-5-23 14:02
另外,如果安装路径出现空格的话(比如:Program Files,Mercury Interactive),一定要加上双引号。参考我上面帖子里的写法。你的问题多半是没有加引号
作者: shorelew@    时间: 2005-5-23 14:54
搞定了  原来是YourTestFile没有加上引号!谢谢,有联系方式吗?望能共同讨论!
作者: elmar    时间: 2005-5-23 15:10
呵呵,大家就在论坛上讨论吧。我有qq,但现在很少用
作者: RandyTsai    时间: 2005-5-25 17:44
怎么建立批处理文件?
作者: qiqi_baba    时间: 2005-5-25 18:31
1。直接加入Windows的 Task中就可以
2。BAT中
3。加入Windows的启动Script中
4。更酷的-把WinRunner加入Start菜单条,然后在WinRunner的Startup脚本中调用你要执行的脚本。
5。其它。。。N多
作者: kper5    时间: 2005-5-26 09:33
我是利用修改 wrun.ini ,不断的向各测试PC发出命令,然后自动更改 wrun.ini 里面的参数,当然利用了自己写的第三方程序

其实办法是很多的,正如楼上所说。。。。。。

http://bbs.51testing.com/viewthr ... ge=1&highlight=




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2