|
我需要测试利用socket上传图象,脚本录制到了如下,但是如果我需要要做参数化处理的时候,需要如何参数话处理啊!也就是需要模拟上传不同大小的图片了
脚本录制如下:
/*********************************************************************
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Fri Sep 29 14:48:21
*********************************************************************/
#include "lrs.h"
Action()
{
lr_think_time(41);
lrs_create_socket("socket9", "TCP", "RemoteHost=10.1.100.170:8022", LrsLastArg);
lrs_send("socket9", "buf228", LrsLastArg);
lrs_receive("socket9", "buf229", LrsLastArg);
lrs_send("socket9", "buf230", LrsLastArg);
lrs_receive("socket9", "buf231", LrsLastArg);
lrs_send("socket9", "buf232", LrsLastArg);
lrs_receive("socket9", "buf233", LrsLastArg);
lrs_send("socket9", "buf234", LrsLastArg);
lrs_receive("socket9", "buf235", LrsLastArg);
lrs_send("socket9", "buf236", LrsLastArg);
lrs_receive("socket9", "buf237", LrsLastArg);
lrs_send("socket9", "buf238", LrsLastArg);
lrs_receive("socket9", "buf239", LrsLastArg);
lrs_send("socket9", "buf240", LrsLastArg);
lr_think_time(6);
lrs_receive("socket9", "buf241", LrsLastArg);
lrs_send("socket9", "buf242", LrsLastArg);
lrs_receive("socket9", "buf243", LrsLastArg);
lrs_disable_socket("socket9", DISABLE_SEND_RECV);
lrs_close_socket("socket9");
lrs_create_socket("socket10", "TCP", "LocalHost=0", "RemoteHost=NANTIANE-K5C4EN:808", LrsLastArg);
lrs_send("socket10", "buf244", LrsLastArg);
lrs_receive("socket10", "buf245", LrsLastArg);
lrs_close_socket("socket10");
lrs_create_socket("socket11", "TCP", "LocalHost=0", "RemoteHost=NANTIANE-K5C4EN:808", LrsLastArg);
lrs_send("socket11", "buf246", LrsLastArg);
lrs_receive("socket11", "buf247", LrsLastArg);
lrs_close_socket("socket11");
return 0;
} |
|