LoadRunner如何录制聊天工具
我用LoadRunner录制了一个聊天工具的登录脚本编译通过,可是回放时却报错vuser_init.c(44): Error : socket0 - Software caused connection abort. Error code : 10053.
我不知道是什么问题
我用的是windows sockets,odbc协议
我是不是协议错了还是录制步骤有问题
我的脚本为:
vuser_init()
{
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=MYLINUXTEST:1214", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_send("socket0", "buf2", LrsLastArg);
lrs_receive("socket0", "buf3", LrsLastArg);
lrs_send("socket0", "buf4", LrsLastArg);
lrs_receive("socket0", "buf5", LrsLastArg);
lrs_send("socket0", "buf6", LrsLastArg);
lrs_receive("socket0", "buf7", LrsLastArg);
lrs_send("socket0", "buf8", LrsLastArg);
lrs_receive("socket0", "buf9", LrsLastArg);
lrs_send("socket0", "buf10", LrsLastArg);
lrs_receive("socket0", "buf11", LrsLastArg);
lrs_send("socket0", "buf12", LrsLastArg);
lrs_receive("socket0", "buf13", LrsLastArg);
lrs_send("socket0", "buf14", LrsLastArg);
lrs_receive("socket0", "buf15", LrsLastArg);
lrs_send("socket0", "buf16", LrsLastArg);
lrs_receive("socket0", "buf17", LrsLastArg);
lr_think_time(4);
lrs_send("socket0", "buf18", LrsLastArg);
return 0;
}
回放为:
Virtual User Script started
Starting action vuser_init.
vuser_init.c(12): lrs_create_socket(socket0, TCP, ...)
vuser_init.c(14): lrs_send(socket0, buf0)
vuser_init.c(16): lrs_receive(socket0, buf1)
vuser_init.c(18): lrs_send(socket0, buf2)
vuser_init.c(20): lrs_receive(socket0, buf3)
vuser_init.c(22): lrs_send(socket0, buf4)
vuser_init.c(24): lrs_receive(socket0, buf5)
vuser_init.c(26): lrs_send(socket0, buf6)
vuser_init.c(28): lrs_receive(socket0, buf7)
vuser_init.c(30): lrs_send(socket0, buf8)
vuser_init.c(32): lrs_receive(socket0, buf9)
vuser_init.c(34): lrs_send(socket0, buf10)
vuser_init.c(36): lrs_receive(socket0, buf11)
vuser_init.c(38): lrs_send(socket0, buf12)
vuser_init.c(40): lrs_receive(socket0, buf13)
vuser_init.c(40): Mismatch (expected 244 bytes, 245 bytes actually received)
vuser_init.c(42): lrs_send(socket0, buf14)
vuser_init.c(44): lrs_receive(socket0, buf15)
vuser_init.c(44): Error : socket0 - Software caused connection abort. Error code : 10053.
Abort was called from an action. 协议没有问题
楼主应该试试关联,因为有很多receive的动态数据,那回放时再用以前的数据去send这样肯定是行不通的。
建议楼主在录制脚本的时候做好comment,这样方便查错。 奇怪,我录的是这样的。我的脚本里每收到一个包就关闭,下次再开一个socket。呵呵,可能是开发人员的代码实现机制不同吧。我觉得你那种比较好哦。
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=192.168.1.26:8080",LrsLastArg);
lrs_send("socket1", "buf2", LrsLastArg);
lrs_receive("socket1", "buf3", LrsLastArg);
lrs_disable_socket("socket1", DISABLE_SEND);
lrs_close_socket("socket1");
lrs_create_socket("socket2", "TCP", "LocalHost=0", "RemoteHost=192.168.1.26:8080",LrsLastArg);
lrs_send("socket2", "buf4", LrsLastArg);
lrs_receive("socket2", "buf5", LrsLastArg);
lrs_disable_socket("socket2", DISABLE_SEND);
lrs_close_socket("socket2");
[ 本帖最后由 ireneyao 于 2007-4-26 10:06 编辑 ] 问题描述不清楚。你自己有没有对比过data.ws?
我的data.ws显示的都是乱马
;WSRData 2 1send buf0 210
"\x1f\x8b"
"\b"
"\x00\x00\x00\
"泂髅卒"
"\xa4\x0f"
"蘱"
"\xa1"
")r\tI"
"\xf1"
")窳"
"\xf1"
"1r北"
"\x0e"
"伭裝O"
"\x14\xb4"
"9"
"\x1c"
"岌鍑_"
"\x0e"
"筑n螙鰒F"
"\x1f"
"~$D"
"\xfb\x07"
"G;ZB橊﹒)"
"\x96\x1f\xbe\
"檻!"
"\x96\x1f\xbe\
"殇痊P"
"\x9b\x0f\x7f\
"S\"覤鞷c傿揜>
"\x05\xa6\x05"
"是"
"\x04"
"茀"
"\xcb"
";"
"\xa7"
"$E茀k踿U"
"\x07"
""
"\x85"
"%~塞鹧O("
"\x17"
""
"\xd9\x1b"
"S"
"\x83"
"7XCH`J`蕠O轋"
"\x19"
"\t\f"
"\x1f"
">|<"
"\xfd\x01\x02\
"_S>|WT"
"\x00\x01"
"諗"
"\x0f"
"_"
"\x15"
"晹UT"
"\x13\x12\x00"
"⑦瓻"
"\xe6\x00\x00\
recv buf1 206
"\x1f\x8b"
"\b"
"\x00\x00\x00\
"泂髅卒"
"\xa4\x0f"
"蘱"
"\xa1"
")r\tI"
"\xf1"
")窳"
"\xf1"
"1r北"
"\x0e"
"伭裝O"
"\x14\xb4"
"9"
"\x1c"
"岌鍑_"
"\x0e"
"筑n螙鰒F"
"\x1f"
"~$D"
"\xfb\x07"
"G;ZB橊﹒)"
"\x96\x1f\xbe\
"檻!"
"\x96\x1f\xbe\
"殇痊P"
"\x9b\x0f\x7f\
"S\"覤鞷c傿揜>
"\x05\xa6\x05"
"是"
"\x04"
"茀"
"\xcb"
";"
"\xa7"
"$E茀k踿U"
"\x07"
""
"\x85"
"%~塞鹧O("
"\x17"
""
"\xd9\x1b"
"S"
"\x83"
"7XCH`J`蕠O轋"
"\x19"
"\t\f"
"\x1f"
">|<"
"\xfd\x01"
"H"
"\x14"
"|"
"\xf8\x00"
"d"
"\x03"
"]戲岖摡gB"
"\x02\x00"
"<鶜"
"\x16\xdd\x00\
send buf2 211
"\x1f\x8b"
"\b"
"\x00\x00\x00\
"泂髅卒"
"\xa4\x0f"
"蘱"
"\xa1"
")r\tI"
"\xf1"
")窳"
"\xf1"
"1r北"
"\x0e"
"伭裝O"
"\x14\xb4"
"9"
"\x1c"
"岌鍑_"
"\x0e"
"筑n螙鰒F"
"\x1f"
"~$D"
"\xfb\x07"
"G;ZB橊﹒)"
"\x96\x1f\xbe\
"檻!"
"\x96\x1f\xbe\
"殇痊P"
"\x9b\x0f\x7f\
"S\"覤鞷c傿揜>
"\x05\xa6\x05"
"是"
"\x04"
"茀"
"\xcb"
";"
"\xa7"
"$E茀k踿U"
"\x07"
""
"\x85"
"%~塞鹧O("
"\x17"
""
"\xd9\x1b"
"S"
"\x83"
"7XCH`J`蕠O轋"
"\x19"
"\t\f"
"\x1f"
">|荟"
"\x01"
"H"
"\x00\xb1\x00\
"I]Q"
"\x01\x04"
"TS>|眜6VLH"
"\x00\x00"
"蹌w"
"\x00\x00\x00"
recv buf3 208
"\x1f\x8b"
"\b"
"\x00\x00\x00\
"e"
"\x8b"
";"
"\x0e"
"侤"
"\x14"
"E峫朗"
"\x12"
"bmП槇J$薄0"
"\x03\x02"
"Ad"
"\x18"
"瘛坡"
"\xb8"
"\n"
"W"
"\xe1"
":lM剓笒"
"\x10"
"?"
"\xb1\x10"
"?澱979wwF>K"
"\xa0"
"\b桾櫮"
"\x14"
";馜"
"\x8d"
"\""
"\x83"
";a醢8m镀1脻醓
"\x03"
"7"
"\x19\x0e"
"澬L#稣8"
"\x15"
"膼"
"\x17\x1a\x8c\
"g潦振"
"\x14"
"渹观M#跰\be}?
"\x88\x13"
"'dVc)K纄"
"\x0f"
" "
"\xdb\x00"
"晜"
"\xb9"
"$鋾庂琁"
"\xf9\x02"
"!]C螺"
"\x00\x00\x00"
send buf4 211
"\x1f\x8b"
"\b"
"\x00\x00\x00\
"泂髅卒"
"\xa4\x0f"
"蘱"
"\xa1"
")r\tI"
"\xf1"
")窳"
"\xf1"
"1r北"
"\x0e"
"伭裝O"
"\x14\xb4"
"9"
"\x1c"
"岌鍑_"
"\x0e"
"筑n螙鰒F"
"\x1f"
"~$D"
"\xfb\x07"
"G;ZB橊﹒)"
"\x96\x1f\xbe\
"檻!"
"\x96\x1f\xbe\
"殇痊P"
"\x9b\x0f\x7f\
"S\"覤鞷c傿揜>
"\x05\xa6\x05"
"是"
"\x04"
"茀"
"\xcb"
";"
"\xa7"
"$E茀k踿U"
"\x07"
""
"\x85"
"%~塞鹧O("
"\x17"
""
"\xd9\x1b"
"S"
"\x83"
"7XCH`J`蕠O轋"
"\x19"
"\t\f"
"\x1f"
">|d崦' V"
"\x00"
"庀)"
"\x1f\xbe"
"+*"
"\x80\x80"
"j蕠隙&"
"\xaa"
"\t\t"
"\x00"
"市%虽"
"\x00\x00\x00"
recv buf5 204
"\x1f\x8b"
"\b"
"\x00\x00\x00\
"e嬁"
"\x0e"
"罰"
"\x1c"
"F"
"\x05"
"蟕,嬌"
"\xd6"
"0"
"\xdc"
"("
"\x1a"
"M,"
"\x1d"
"毇J獄{寨%"
"\x06"
"镾x\n"
"\xef"
"\"1y\t镳﹫?1?
"\xb8"
".B攧C"
"\x8a"
"\f"
"\x03"
"\n"
"靈疚m_"
"\x1e"
"摥~H馺x阭k嘘"
"\x1b"
"Uq棡e{F涑"
"\xaf\x06\x91"
" 嗠G"
"\xdd\x11"
"庙脜籿4"
"\xbc\x04"
"'7v簯?tBBQ涷?
"\xaa\x06"
"叜"
"\x98"
"4醇"
"\x1e"
"F泷"
"\x1c\x1b"
"淢<~3隟"
"\xe6\xff"
"撂"
"\x0f"
"#N湊氷J"
"\x16\x80"
"s"
"\x19\xc0"
"%"
"\x01"
"j"
"\x19"
"%嵋i芝|"
"\x03"
"xg"
"\x06"
"溘"
"\x00\x00\x00"
send buf6 208
"\x1f\x8b"
"\b"
"\x00\x00\x00\
"泂髅卒"
"\xa4\x0f"
"蘱"
"\xa1"
")r\tI"
"\xf1"
")窳"
"\xf1"
"1r北"
"\x0e"
"伭裝O"
"\x14\xb4"
"9"
"\x1c"
"岌鍑_"
"\x0e"
"筑n螙鰒F"
"\x1f"
"~$D"
"\xfb\x07"
"G;ZB橊﹒)"
"\x96\x1f\xbe\
"檻!"
"\x96\x1f\xbe\
"殇痊P"
"\x9b\x0f\x7f\
"S\"覤鞷c傿揜>
"\x05\xa6\x05"
"是"
"\x04"
"茀"
"\xcb"
";"
"\xa7"
"$E茀k踿U"
"\x07"
""
"\x85"
"%~塞鹧O("
"\x17"
""
"\xd9\x1b"
"S"
"\x83"
"7XCH`J`蕠O轋"
"\x19"
"\t\f"
"\x1f"
">|"
"\xcc\xff"
"疳胓 6"
"\x00"
"怙)"
"\x1f\xbe"
"+*"
"\x80\x80"
"*热"
"\xaf"
"\t\t"
"\x00\x98\x05"
"oi"
"\xe3\x00\x00\
recv buf7 261
"\x1f\x8b"
"\b"
"\x00\x00\x00\
"泂髅卒"
"\xa4\x0f"
"蘱"
"\xa1"
")r\tI"
"\xf1"
")窳"
"\xf1"
"1r北"
"\x0e"
"伭裝O"
"\x14\xb4"
"9"
"\x1c"
"岌鍑_"
"\x0e"
"筑n螙鰒F"
"\x1f"
"~$D"
"\xfb\x07"
"G;ZB橊﹒)"
"\x96\x1f\xbe\
"檻!"
"\x96\x1f\xbe\
"殇痊P"
"\x9b\x0f\x7f\
"S\"覤鞷c傿揜>
"\x05\xa6\x05"
"是"
"\x04"
"茀"
"\xcb"
";"
"\xa7"
"$E茀k踿U"
"\x07"
""
"\x85"
"%~塞鹧O("
"\x17"
""
"\xd9\x1b"
"S"
"\x83"
"7XCH`J`蕠O轋"
"\x19"
"\t\f"
"\x1f"
">|"
"\xcc\xff"
"疳脳"
"\x82\x0f\x1f\
"4wB"
"\xca\x07"
"nE"
"\x05\x10"
"P昒TPTWWRUR誘
"\xd6\x04"
"\n"
"j*+"
"\xa5"
"&撂"
"\x95\x03\x99"
"+"
"\x07"
"5w"
"\xee"
"!冯7y惩?}鴲"
"\x91\x00"
"4"
"\xe6\x13"
"续鋎 "
"\x11\x12\x92\
"巈父$"
"\x01\x00\x00"
send buf8 224
"\x1f\x8b"
"\b"
"\x00\x00\x00\
"泂髅卒"
"\xa4\x0f"
"蘱"
"\xa1"
")r\tI"
"\xf1"
")窳"
"\xf1"
"1r北"
"\x0e"
"伭裝O"
"\x14\xb4"
"9"
"\x1c"
"岌鍑_"
"\x0e"
"筑n螙鰒F"
"\x1f"
"~$D"
"\xfb\x07"
"G;ZB橊﹒)"
"\x96\x1f\xbe\
"檻!"
"\x96\x1f\xbe\
"殇痊P"
"\x9b\x0f\x7f\
"S\"覤鞷c傿揜>
"\x05\xa6\x05"
"是"
"\x04"
"茀"
"\xcb"
";"
"\xa7"
"$E茀k踿U"
"\x07"
""
"\x85"
"%~塞鹧O("
"\x17"
""
"\xd9\x1b"
"S"
"\x83"
"7XCH`J`蕠O轋"
"\x19"
"\t\f"
"\x1f"
">|T崦"
"\x17"
" v"
"\x00"
"b啍"
"\x0f\xdf\x15\
"@@5"
"\xe5\x03"
"兒ΣΒ姳Ρ獑?
"\x02\x00"
":狂"
"\x00\x00\x00"
因为以前录制的都是web,所以第一次录制聊天工具,所以说错的地方还请见谅
希望有对此类录制有经验的朋友给以指导,再次谢过了 这说明录制的时候就出问题了。我的data.was都不是乱码。 我想问一下录制聊天工具要用什么协议呀! 关注中。。
页:
[1]