TA的每日心情 | 开心 2016-1-22 08:21 |
---|
签到天数: 2 天 连续签到: 2 天 [LV.1]测试小兵
|
需求:公司产品,C/S架构,一个包文件,在打开的过程中需要从服务器获取验证权限,验证通过才能够打开。用loadrunner录制这个打开过程,然后修改录制脚本,并发测试,看这个打开包文件的过程对服务器产生的压力。
问题:
1、因该应用是C/S架构,选用winsocket协议录制了打开这个过程的脚本;不知道该在哪里修改脚本?求大侠指点。
2、与研发沟通,客户端与服务器端通讯是http协议,那么winsocket协议录制的脚本虽然是录制了操作,但是又该怎么修改呢?
选用winsocket协议,loadrunner录制的脚本:
#include "lrs.h"
Action()
{
lr_think_time(8);
lrs_create_socket("socket0", "TCP", "LocalHost=0", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_send("socket0", "buf2", LrsLastArg);
lrs_receive("socket0", "buf3", LrsLastArg);
lrs_close_socket("socket0");
lrs_create_socket("socket1", "TCP", "LocalHost=0", LrsLastArg);
lrs_send("socket1", "buf4", LrsLastArg);
lrs_receive("socket1", "buf5", LrsLastArg);
lrs_send("socket1", "buf6", LrsLastArg);
lrs_receive("socket1", "buf7", LrsLastArg);
lrs_close_socket("socket1");
lrs_create_socket("socket2", "TCP", "LocalHost=0", LrsLastArg);
lrs_send("socket2", "buf8", LrsLastArg);
lrs_receive("socket2", "buf9", LrsLastArg);
lrs_send("socket2", "buf10", LrsLastArg);
lrs_receive("socket2", "buf11", LrsLastArg);
lrs_close_socket("socket2");
lrs_create_socket("socket3", "TCP", "LocalHost=0", LrsLastArg);
lrs_send("socket3", "buf12", LrsLastArg);
lrs_receive("socket3", "buf13", LrsLastArg);
lrs_send("socket3", "buf14", LrsLastArg);
lrs_close_socket("socket3");
lrs_create_socket("socket4", "TCP", "LocalHost=0", LrsLastArg);
lrs_send("socket4", "buf15", LrsLastArg);
lrs_receive("socket4", "buf16", LrsLastArg);
lrs_send("socket4", "buf17", LrsLastArg);
lrs_receive("socket4", "buf18", LrsLastArg);
lrs_close_socket("socket4");
lrs_create_socket("socket5", "TCP", "LocalHost=0", LrsLastArg);
lrs_send("socket5", "buf19", LrsLastArg);
lrs_receive("socket5", "buf20", LrsLastArg);
lrs_send("socket5", "buf21", LrsLastArg);
return 0;
}
data.ws文件内容如下:
;WSRData 2 1
send buf0 90
"\x16\x03\x01\x00"
"U"
"\x01\x00\x00"
"Q"
"\x03\x01"
"Vg哰瀥V侜.{J"
"\xb4"
"/j"
"\x18"
"暧鱼"
"\x80\xf7"
"3靠Q"
"\x17"
"16揖"
"\xdd\x00\x00\x18\x00"
"/"
"\x00"
"5"
"\x00\x05\x00"
"\n"
"\xc0\x13\xc0\x14\xc0"
"\t"
"\xc0"
"\n"
"\x00"
"2"
"\x00"
"8"
"\x00\x13\x00\x04\x01\x00\x00\x10\x00"
"\n"
"\x00\x06\x00\x04\x00\x17\x00\x18\x00"
"\v"
"\x00\x02\x01\x00"
recv buf1 929
"\x16\x03\x01\x03\x9c\x02\x00\x00"
"F"
"\x03\x01"
"Vg員I顈"
"\x15"
"堻"
"\xfb\x1f"
"\b"
"\x01"
"爣窏\r"
"\x01\xee"
";"
"\x7f"
"栀絧㏎"
"\xd2"
" Vg員Gv"
省略。。。
-1
|
|