录制脚本时可以打开网页链接,回放的时候不能打开?在线等解决方案,谢谢各位。
脚本:#include "web_api.h"
Action()
{
web_add_cookie("PREF=ID=e361092731fc1837:NW=1:TM=1236832339:LM=1236832339:S=0mYhdI50NcNVyp76; DOMAIN=www.google.cn");
web_add_cookie("NID=21=sYgB7spAZy1F2x7Vpw5riyrlNh5EFWzLXu-MSWsQbK2MPVlYjUjpKMdWQQ1PTdip8unVrMyo6UtQ7CXbHqvgmC8FgO_7yY1yHUmxZ5fmap9qnClYsbv5EyGrRPDkznvV; DOMAIN=www.google.cn");
web_url("webhp",
"URL=http://www.google.cn/webhp?source=g_cn",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/extern_js/f/CgV6aC1DThICY24rMAo4DUACLCswDjgFLCswETgQLCswFjgJLCswFzgBLCswGDgDLCswJTjJiAEsKzAmOAQsKzAnOAAs/IfRECXLbJC8.js", "Referer=http://www.google.cn/webhp?source=g_cn", ENDITEM,
"Url=/images/nav_logo4.png", "Referer=http://www.google.cn/webhp?source=g_cn", ENDITEM,
"Url=/intl/zh-CN/images/toolbar_animation_20090316.png", "Referer=http://www.google.cn/webhp?source=g_cn", ENDITEM,
LAST);
web_url("csi",
"URL=http://www.google.cn/csi?v=3&s=webhp&action=&tran=undefined&ei=QfPbSZLeKIuBkQX8w93eCA&e=17259,20233&rt=prt.16,ol.2250,xjs.2469",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.google.cn/webhp?source=g_cn",
"Mode=HTML",
LAST);
lr_think_time( 5 );
web_url("search",
"URL=http://www.google.cn/search?hl=zh-CN&q=&btnG=Google+%E6%90%9C%E7%B4%A2&meta=&aq=f&oq=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.google.cn/webhp?source=g_cn",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"Url=/extern_js/f/CgV6aC1DThICY24rMAo4DUACLCswDjgFLCswETgQLCswFjgJLCswFzgBLCswGDgDLCswJTjJiAEsKzAmOAQsKzAnOAAs/IfRECXLbJC8.js", "Referer=http://www.google.cn/webhp?hl=zh-CN&btnG=Google+%E6%90%9C%E7%B4%A2", ENDITEM,
"Url=/images/nav_logo4.png", "Referer=http://www.google.cn/webhp?hl=zh-CN&btnG=Google+%E6%90%9C%E7%B4%A2", ENDITEM,
LAST);
web_url("csi_2",
"URL=http://www.google.cn/csi?v=3&s=webhp&action=&tran=undefined&ei=TPPbSazMHI6HkQW-o9jMCA&e=17259,20233&rt=prt.0,ol.281,xjs.422",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.google.cn/webhp?hl=zh-CN&btnG=Google+%E6%90%9C%E7%B4%A2",
"Mode=HTML",
EXTRARES,
"Url=/intl/zh-CN/images/toolbar_animation_20090316.png", "Referer=http://www.google.cn/webhp?hl=zh-CN&btnG=Google+%E6%90%9C%E7%B4%A2", ENDITEM,
LAST);
return 0;
}
报错日志:
Error -27796: Failed to connect to server "127.0.0.1:9415": Connection refused
Fatal Error -27098: Could not download the proxy automatic configuration script (URL="http://127.0.0.1:9415/tudouva.pac"). See previous messages.Refer to the 'Run-time settings/Internet Protocol/Proxy'
Fatal Error -27072: The URL of the proxy automatic configuration script was explicitly specified in "Run-time settings/Internet Protocol/Proxy".Aborting 代理的问题。 Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 9.10.0 for WINXP; WebReplay85 build 5896
Run Mode: HTML
Run-Time Settings file: "C:\Documents and Settings\zxy\Local Settings\Temp\noname11\\default.cfg"
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(6): web_add_cookie was successful
Action.c(8): web_add_cookie was successful
Action.c(10): Downloading resource "http://www.google.cn/extern_js/f/CgV6aC1DThICY24rMAo4DUACLCswDjgFLCswETgQLCswFjgJLCswFzgBLCswGDgDLCswJTjJiAEsKzAmOAQsKzAnOAAs/IfRECXLbJC8.js" (specified by argument number 9)
Action.c(10): Downloading resource "http://www.google.cn/images/nav_logo4.png" (specified by argument number 12)
Action.c(10): Downloading resource "http://www.google.cn/intl/zh-CN/images/toolbar_animation_20090316.png" (specified by argument number 15)
Action.c(10): Found resource "http://www.google.cn/intl/zh-CN/images/logo_cn.gif" in HTML "http://www.google.cn/webhp?source=g_cn"
Action.c(10): Found resource "http://www.google.cn/intl/zh-CN_cn/images/cn_icp.gif" in HTML "http://www.google.cn/webhp?source=g_cn"
Action.c(10): web_url("webhp") was successful, 37633 body bytes, 1576 header bytes, 45 chunking overhead bytes
Action.c(23): web_url("csi") was successful, 0 body bytes, 215 header bytes
Action.c(33): Redirecting "http://www.google.cn/search?hl=zh-CN&q=&btnG=Google+%E6%90%9C%E7%B4%A2&meta=&aq=f&oq=" (redirection depth is 0)
Action.c(33): To location "http://www.google.cn/webhp?hl=zh-CN&btnG=Google+%E6%90%9C%E7%B4%A2"
Action.c(33): Resource "http://www.google.cn/extern_js/f/CgV6aC1DThICY24rMAo4DUACLCswDjgFLCswETgQLCswFjgJLCswFzgBLCswGDgDLCswJTjJiAEsKzAmOAQsKzAnOAAs/IfRECXLbJC8.js" is in the cache already and will not be downloaded again
Action.c(33): Resource "http://www.google.cn/images/nav_logo4.png" is in the cache already and will not be downloaded again
Action.c(33): Resource "http://www.google.cn/intl/zh-CN/images/logo_cn.gif" is in the cache already and will not be downloaded again
Action.c(33): Resource "http://www.google.cn/intl/zh-CN_cn/images/cn_icp.gif" is in the cache already and will not be downloaded again
Action.c(33): web_url("search") was successful, 3824 body bytes, 475 header bytes, 43 chunking overhead bytes
Action.c(45): Resource "http://www.google.cn/intl/zh-CN/images/toolbar_animation_20090316.png" is in the cache already and will not be downloaded again
Action.c(45): web_url("csi_2") was successful, 0 body bytes, 215 header bytes
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
脚本是没问题的,在我机器上完全能运行。
你检查下网络设置之类的吧。 原帖由 archonwang 于 2009-4-8 13:34 发表 http://bbs.51testing.com/images/common/back.gif
代理的问题。
呵呵,感谢,确实是代理问题。 你好,我出现了和你同样的问题,麻烦你能否把具体的解决方法告诉我吗,谢谢
页:
[1]