51Testing软件测试论坛
标题:
选择Winsockets协议录制脚本时出错
[打印本页]
作者:
baishuichen
时间:
2008-6-26 14:54
标题:
选择Winsockets协议录制脚本时出错
公司一个C/S结构的程序,用CSharp语言开发,客户端与服务器间采用TCP进行通讯 ,我在Windows server 2003 SP1系统上用Loadrunner8.1中文版选择Windows Sockets协议对其进行脚本录制,在录制日志中连续报错:/* Error - WSPrecv: asynchronous receive call */
脚本如下:
lrs_startup(257);
lrs_create_socket("socket0", "TCP", "RemoteHost=192.168.3.105:1433", 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);
return 0;
前半部分录制日志如下:
14:05:39.109 /* WSAStartup(): process 888 using flags 0 */
14:05:39.171 /* ReadCommWindowInfo: HttpInterceptMode = 0 */
14:05:39.187 /* socket(): created with handle: 888:816, address format 2, type 1, protocol 0. */
14:05:39.187 /* connect(): socket 888:816 tried to connect with family 2, port 1433, and address 0xc0a80369. Return value: 0 */
14:05:39.187 /* setsockopt(): socket 888:816, level: 0x6, optname: 0x1, optval: 1 */
14:05:39.203 /* send(): 47 bytes were sent to socket 888:816 using flags 0 */
(send_0, 47, 816)
"\x12\x01\x00"
"/"
"\x00\x00\x01\x00\x00\x00\x1a\x00\x06\x01\x00"
" "
"\x00\x01\x02\x00"
"!"
"\x00\x01\x03\x00"
"\""
"\x00\x04\x04\x00"
"&"
"\x00\x01\xff"
"\t"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"4"
"\x00"
14:05:39.218 /* Error - WSPrecv: asynchronous receive call */
14:05:39.218 /* recv(): 43 bytes were received from socket 888:816 using flags 0 (4096 were asked for) */
(recv_1, 4096, 816)
"\x04\x01\x00"
"+"
"\x00\x00\x01\x00\x00\x00\x1a\x00\x06\x01\x00"
" "
"\x00\x01\x02\x00"
"!"
"\x00\x01\x03\x00"
"\""
"\x00\x00\x04\x00"
"\""
"\x00\x01\xff"
"\t"
"\x00\x05"
"w"
"\x00\x00\x00\x00\x00"
14:05:39.218 /* send(): 78 bytes were sent to socket 888:816 using flags 0 */
(send_2, 78, 816)
"\x12\x01\x00"
"N"
"\x00\x00\x00\x00\x16\x03\x01\x00"
"A"
"\x01\x00\x00"
"="
"\x03\x01"
"Hc1躇8=狆"
"\x12"
"N賏"
"\xb7"
"2<院"
"\x9b\x12"
"涓+"
"\xcc"
"68"
"\xc5"
"*仅"
"\xc7\x00\x00\x00\x16\x00\x04\x00\x05\x00"
"\n"
"\x00"
"\t"
"\x00"
"d"
"\x00"
"b"
"\x00\x03\x00\x06\x00\x13\x00\x12\x00"
"c"
"\x01\x00"
14:05:39.218 /* Error - WSPrecv: asynchronous receive call */
在data.ws文件中对应的内容是:
;WSRData 2 1
send buf0 47
"\x12\x01\x00"
"/"
"\x00\x00\x01\x00\x00\x00\x1a\x00\x06\x01\x00"
" "
"\x00\x01\x02\x00"
"!"
"\x00\x01\x03\x00"
"\""
"\x00\x04\x04\x00"
"&"
"\x00\x01\xff"
"\t"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"4"
"\x00"
recv buf1 43
"\x04\x01\x00"
"+"
"\x00\x00\x01\x00\x00\x00\x1a\x00\x06\x01\x00"
" "
"\x00\x01\x02\x00"
"!"
"\x00\x01\x03\x00"
"\""
"\x00\x00\x04\x00"
"\""
"\x00\x01\xff"
"\t"
"\x00\x05"
"w"
"\x00\x00\x00\x00\x00"
send buf2 78
"\x12\x01\x00"
"N"
"\x00\x00\x00\x00\x16\x03\x01\x00"
"A"
"\x01\x00\x00"
"="
"\x03\x01"
"Hc1躇8=狆"
"\x12"
"N賏"
"\xb7"
"2<院"
"\x9b\x12"
"涓+"
"\xcc"
"68"
"\xc5"
"*仅"
"\xc7\x00\x00\x00\x16\x00\x04\x00\x05\x00"
"\n"
"\x00"
"\t"
"\x00"
"d"
"\x00"
"b"
"\x00\x03\x00\x06\x00\x13\x00\x12\x00"
"c"
"\x01\x00"
对脚本进行回放时则在最后一句脚本处提示:错误: socket0 - 软件造成连接终止。错误代码: 10053
我花了很多时间在网上搜索相关的问题和资料,以及按照帮助中提供的关于错误码10053对应的解决办法,但是均未能成功解决该问题,请各位指点一二,谢谢!
作者:
zibeike
时间:
2008-6-29 00:16
1433是SQL SERVER的默认端口,该被测试程序的客户端是直接对数据库进行的操作? 如果是数据库相关操作的程序,可以选择ODBC协议试验下.
作者:
baishuichen
时间:
2008-6-29 14:41
多谢指点,呵呵
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2