|
大家好,我用loadrunner socket协议录制测试c/s结构程序时,最后出现/* WSACleanup failed */,无法回放。请大家帮忙看看。
程序结构是:java 开发的客户端和服务器。数据库采用oracle 用jboss做应用服务器。
录制过成如下:
/* WSAStartup(): process 2916 using flags 0 */
/* ReadCommWindowInfo: HttpInterceptMode = 0 */
/* socket(): created with handle: 2916:1168, address format 2, type 1, protocol 0. */
/* socket(): created with handle: 2916:1492, address format 2, type 1, protocol 0. */
/* closesocket(): socket 2916:1168 closed successfully */
/* socket(): created with handle: 2916:1652, address format 2, type 1, protocol 0. */
/* setsockopt(): socket 2916:1652, level: 0xffff, optname: 0x4, optval: 1 */
/* connect(): socket 2916:1652 tried to connect with family 2, port 3873, and address 0xc0a80582. Return value: -1 */
/* setsockopt(): socket 2916:1652, level: 0x6, optname: 0x1, optval: 0 */
/* setsockopt(): socket 2916:1652, level: 0xffff, optname: 0x1006, optval: 0 */
/* send(): 4 bytes were sent to socket 2916:1652 using flags 0 */
/* recv(): 4 bytes were received from socket 2916:1652 using flags 0 (8192 were asked for) */
/* setsockopt(): socket 2916:1652, level: 0xffff, optname: 0x1006, optval: 0 */
/* send(): 923 bytes were sent to socket 2916:1652 using flags 0 */
/* recv(): 2176 bytes were received from socket 2916:1652 using flags 0 (8192 were asked for) */
/* closesocket(): socket 2916:1652 closed successfully */
/* socket(): created with handle: 2916:1712, address format 2, type 1, protocol 0. */
/* setsockopt(): socket 2916:1712, level: 0xffff, optname: 0x4, optval: 1 */
/* connect(): socket 2916:1712 tried to connect with family 2, port 3873, and address 0xc0a80582. Return value: -1 */
/* setsockopt(): socket 2916:1712, level: 0x6, optname: 0x1, optval: 0 */
/* setsockopt(): socket 2916:1712, level: 0xffff, optname: 0x1006, optval: 0 */
/* send(): 4 bytes were sent to socket 2916:1712 using flags 0 */
/* recv(): 4 bytes were received from socket 2916:1712 using flags 0 (8192 were asked for) */
/* setsockopt(): socket 2916:1712, level: 0xffff, optname: 0x1006, optval: 0 */
/* send(): 1126 bytes were sent to socket 2916:1712 using flags 0 */
/* recv(): 728 bytes were received from socket 2916:1712 using flags 0 (8192 were asked for) */
/* closesocket(): socket 2916:1712 closed successfully */
/* socket(): created with handle: 2916:1816, address format 2, type 1, protocol 0. */
/* setsockopt(): socket 2916:1816, level: 0xffff, optname: 0x4, optval: 1 */
/* connect(): socket 2916:1816 tried to connect with family 2, port 3873, and address 0xc0a80582. Return value: -1 */
/* setsockopt(): socket 2916:1816, level: 0x6, optname: 0x1, optval: 0 */
/* setsockopt(): socket 2916:1816, level: 0xffff, optname: 0x1006, optval: 0 */
/* send(): 4 bytes were sent to socket 2916:1816 using flags 0 */
/* recv(): 4 bytes were received from socket 2916:1816 using flags 0 (8192 were asked for) */
/* setsockopt(): socket 2916:1816, level: 0xffff, optname: 0x1006, optval: 0 */
/* send(): 1867 bytes were sent to socket 2916:1816 using flags 0 */
/* recv(): 1227 bytes were received from socket 2916:1816 using flags 0 (8192 were asked for) */
/* closesocket(): socket 2916:1816 closed successfully */
/* WSACleanup failed */
录制成的action脚本如下:
/*********************************************************************
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Thu Sep 27 15:30:45
*********************************************************************/
#include "lrs.h"
Action()
{
lrs_create_socket("socket0", "TCP", "RemoteHost=192.168.8.156:3873", 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", "RemoteHost=192.168.8.156:3873", 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", "RemoteHost=192.168.8.156:3873", 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");
return 0;
}
end 脚本如下:
#include "lrs.h"
vuser_end()
{
lrs_cleanup();
return 0;
}
结果出现/* WSACleanup failed */不能回放,回放的时候没有任何错误。请大家帮忙看看!!! |
|