管理 给我的留言
- 342423669 | 2012-05-29 16:20:01
- 悄悄话,只给空间主人查看...
- Paulawang | 2011-12-28 11:18:46
- ebay上海急聘高级性能测试工程师,联系QQ:498761418;MSN:wangchunyan2011@live.cn
- qinet | 2008-05-15 14:26:55
-
你好,看过你的《用loadrunner参数化下载的文件名》文章,用在自己的工作中,可是执行不过去,不知道问题在哪里,因为工作时间很紧,所以来麻烦能不能给我看一下。要录制一个从网页中点击“下载”,然后系统弹出“另存为”窗口,将文件保存在本地并覆盖原文件的操作,现在改后的脚本总是出现问题:Action.c (51): syntax error; found `;' expecting `)'
d:\\\317\356\304\277\316\304\274\376\\rfnet\\\320\324\304\334\\resdownload_79_1\\\\combined_resdownload_79_1.c (4): 1 errors, not writing pre_cci.ci
不知道自己哪里写错了,现在只希望脚本可以顺利的把文件下载到本地。希望可以帮帮我,非常感谢,可以发到我的邮箱中:qinet@163.com,脚本如下:
#include "web_api.h"
Action()
{
int flen;
long filedes;
char file[256]="\0";
char fuzhi[10]="\0";
char * chNumber=fuzhi;
chNumber=lr_eval_string("{随机码}");
//lr_think_time( 11 );
strcat(file,"c:\\NetQin_P");
strcat(file,chNumber);
strcat(file,"_CommMaster.SIS");
//设置参数的最大长度,注意该值必须大于文件的大小
web_set_max_html_param_len("2000000");
//获取响应的全部内容,作为文件内容保存
eb_reg_save_param("fcontent", "LB=", "RB=", "SEARCH=BODY", LAST);
lr_start_transaction("download");
//web_concurrent_start(NULL);
web_url("button.gif_2",
"URL=http://172.16.24.79/cn/images/ctrl/button.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://172.16.24.79/cn/resources/index.php?class=zy",
LAST);
web_url("download.php",
"URL=http://172.16.24.79/cn/resources/download.php?id=443",
"Resource=1",
"RecContentType=application/force-download",
"Referer=",
LAST);*/
web_url("button.gif_3",
"URL=http://172.16.24.79/cn/images/ctrl/button.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://172.16.24.79/cn/resources/index.php?class=zy",
//获取响应中的文件长度
flen = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
if(flen > 0)
{
//以写方式打开文件
if((filedes = fopen(file, "wb")) == NULL)
{
lr_output_message("Open File Failed!");
return -1;
}
//写入文件内容
fwrite(lr_eval_string("{fcontent}"), flen, 1, filedes);
//关闭文件
fclose(filedes);
}
lr_end_transaction("down",LR_AUTO);
// lr_think_time(3);
return 0;
}
- 12qwsa | 2008-03-27 10:10:00
-
用LoadRunner监控linux机器的性能的那一篇
为什么我会找不到 /etc/xinetd.d/下的三个conf文件 rlogin ,rsh,rexec 这三个配置文件
- crazysusan | 2007-11-09 15:12:20
- 悄悄话,只给空间主人查看...
- love510775 | 2007-10-31 17:09:15
- 悄悄话,只给空间主人查看...
- Spark.lee | 2007-09-26 16:59:56
- 悄悄话,只给空间主人查看...
- zhizi | 2007-08-06 09:37:32
- 悄悄话,只给空间主人查看...
标题搜索
我的存档
数据统计
- 访问量: 328225
- 日志数: 218
- 图片数: 5
- 文件数: 7
- 建立时间: 2007-01-08
- 更新时间: 2012-11-03