51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2099|回复: 3
打印 上一主题 下一主题

[原创] 请大家帮忙看看用lr录制socket协议时候的问题。

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2007-9-27 16:55:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
大家好,我用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 */不能回放,回放的时候没有任何错误。请大家帮忙看看!!!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2007-9-27 17:37:27 | 只看该作者
不明白
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2007-9-27 18:09:22 | 只看该作者
有遇到这个问题的同志没有???
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2007-9-27 18:14:39 | 只看该作者
结果出现/* WSACleanup failed */不能回放,回放的时候没有任何错误。请大家帮忙看看!!!

没有错误信息?????
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-7 15:30 , Processed in 0.067611 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表