初次接触loadrunner,用loadrunner 写一script , 上传文件到服务器 ,设了一个参数(用来指定要上传的文件),脚本如下,
Action()
{
lr_think_time(5);
/*
file <paraData>;
*/
lrs_create_socket("socket0", "TCP", "RemoteHost=192.168.1.112:80", LrsLastArg);
/* lrs_save_param ("socket0","buf0","paraData",0,strlen(lr_eval_string ("paraData"));
*/
lrs_save_param_ex("socket0","static","buf0",0,strlen (lr_eval_string (paraData)),,paraData);
lr_start_transaction("Tran1");
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_close_socket("socket0");
lr_end_transaction("Tran1", LR_AUTO);
return 0;
}
可总是有错误,请各位高手帮忙改一下,在线等,万分感谢!
你换一下端口试试....
这里有一个应用实例:http://servers.pconline.com.cn/skills/0709/1113200_2.html
还有就是百度百科上面有一些资料:http://baike.baidu.com/view/812367.htm
嘿嘿,谢啦,给了我一个测试工具....
希望大家多多交流:hongtenzone@foxmail.com