51Testing软件测试论坛

标题: 在线急求解决winsock录制和执行的问题? [打印本页]

作者: elitel    时间: 2005-1-19 10:48
标题: 在线急求解决winsock录制和执行的问题?
测试对象:在C/S结构,TCP/IP协议 ,利用客户端对服务器端进行压力测试
服务器端:采用SQL server数据库
客户端:采用SQL server数据库,程序调用自定义的dll文件(对winsock api打包的文件)。采用MS SQL server协议录制脚本没有代码,因此采用windows sockets协议录制。
录制代码如下:

vuser_init()
{
    lrs_startup(257);

    lrs_create_socket("socket0", "TCP", "LocalHost=2404", "Backlog=5",  LrsLastArg);

    lrs_create_socket("socket1", "TCP",  LrsLastArg);

    lrs_send("socket1", "buf0", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf1", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf2", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf3", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf4", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf5", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf6", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf7", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf8", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf9", LrsLastArg);

    lrs_receive("socket1", "buf10", LrsLastArg);

    lrs_send("socket1", "buf11", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf12", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf13", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf14", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf15", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf16", LrsLastArg);

    lrs_receive("socket1", "buf17", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf18", LrsLastArg);

    lrs_receive("socket1", "buf19", LrsLastArg);

    lrs_send("socket1", "buf20", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf21", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf22", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf23", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf24", LrsLastArg);

    lr_think_time(2);

    lrs_send("socket1", "buf25", LrsLastArg);

    lr_think_time(2);

    lrs_close_socket("socket1");

    lrs_close_socket("socket0");

    return 0;
}
作者: elitel    时间: 2005-1-19 10:50
Recording Log:

/* New recording mechanism */

09:56:58.734 /* Start section (vuser_init) */

09:57:02.125 /* WSAStartup(): process 1120 using flags 0 */

09:57:02.125 /* ReadCommWindowInfo: HttpInterceptMode = 0 */

09:57:02.140 /* socket(): created with handle: 1120:596, address format 2, type 1, protocol 0. */

09:57:02.156 /* setsockopt(): socket 1120:596, level: 0x6, optname: 0x1, optval: 1 */

09:57:02.171 /* bind(): socket 1120:596 bound with family 2, port 2404, and address 0xa0a4020 */

09:57:02.171 /* listen(): listening to socket 1120:596 with  backlog 5  */

09:57:02.375 /* socket(): created with handle: 1120:620, address format 2, type 1, protocol 0. */

09:57:02.375 /* setsockopt(): socket 1120:620, level: 0x6, optname: 0x1, optval: 1 */

09:57:02.375 /* socket(): created with handle: 1120:648, address format 2, type 1, protocol 0. */

09:57:02.375 /* Error -   WSPrecv: asynchronous receive call */

09:57:02.390 /* recv failed */

09:57:02.703 /* Error -   WSPsend: asynchronous send call */

09:57:02.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:02.718 /* recv failed */

09:57:02.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_0, 6, 620)
        "h"
        "\x04"
        "\v"
        "\x00\x00\x00"


09:57:04.703 /* lr_think_time(): wait 2 seconds */

09:57:04.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:04.718 /* recv failed */

09:57:04.718 /* Error -   WSPsend: asynchronous send call */

09:57:04.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_1, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:06.703 /* lr_think_time(): wait 2 seconds */

09:57:06.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:06.718 /* recv failed */

09:57:06.718 /* Error -   WSPsend: asynchronous send call */

09:57:06.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_2, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:08.703 /* lr_think_time(): wait 2 seconds */

09:57:08.718 /* Error -   WSPsend: asynchronous send call */

09:57:08.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_3, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:08.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:08.718 /* recv failed */

09:57:10.703 /* lr_think_time(): wait 2 seconds */

09:57:10.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:10.718 /* Error -   WSPsend: asynchronous send call */

09:57:10.718 /* recv failed */

09:57:10.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_4, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:12.703 /* lr_think_time(): wait 2 seconds */

09:57:12.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:12.718 /* Error -   WSPsend: asynchronous send call */

09:57:12.718 /* recv failed */

09:57:12.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_5, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:14.703 /* lr_think_time(): wait 2 seconds */

09:57:14.718 /* Error -   WSPsend: asynchronous send call */

09:57:14.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_6, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:14.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:14.718 /* recv failed */

09:57:16.703 /* lr_think_time(): wait 2 seconds */

09:57:16.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:16.718 /* recv failed */

09:57:16.718 /* Error -   WSPsend: asynchronous send call */

09:57:16.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_7, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:18.703 /* lr_think_time(): wait 2 seconds */

09:57:18.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:18.718 /* Error -   WSPsend: asynchronous send call */

09:57:18.718 /* recv failed */

09:57:18.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_8, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:20.703 /* lr_think_time(): wait 2 seconds */

09:57:20.718 /* Error -   WSPsend: asynchronous send call */

09:57:20.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_9, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:20.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:20.718 /* recv failed */

09:57:21.875 /* Error -   WSPsend: asynchronous send call */

09:57:21.875 /* send(): 23 bytes were sent to socket 1120:620 using flags 0 */

(send_10, 23, 620)
        "h"
        "\x15\x00\x00\x00\x00\x1e\x01\x03\x00\x01"
        "\t"
        "\x02\x00\x00\x01"
        "揗9\t"
        "\x13\x01\x05"


09:57:21.890 /* Error -   WSPrecv: asynchronous receive call */

09:57:21.906 /* Error -   WSPsend: asynchronous send call */

09:57:21.906 /* recv(): 16 bytes were received from socket 1120:620 using flags 0 (500 were asked for) */

(recv_11, 500, 620)
        "h"
        "\x0e\x02\x00\x02\x00"
        "."
        "\x01\x06\x00\x01"
        "\t\a`"
        "\x00\x02"


09:57:21.906 /* send(): 16 bytes were sent to socket 1120:620 using flags 0 */

(send_12, 16, 620)
        "h"
        "\x0e\x02\x00\x02\x00"
        "."
        "\x01"
        "\a"
        "\x00\x01"
        "\t"
        "\x06"
        "`"
        "\x00\x02"


09:57:21.906 /* Error -   WSPrecv: asynchronous receive call */

09:57:21.921 /* Error -   WSPsend: asynchronous send call */

09:57:21.921 /* recv failed */

09:57:21.921 /* send(): 16 bytes were sent to socket 1120:620 using flags 0 */

(send_13, 16, 620)
        "h"
        "\x0e\x02\x00\x02\x00"
        "."
        "\x01"
        "\n"
        "\x00\x01"
        "\t"
        "\x06"
        "`"
        "\x00\x02"


09:57:21.921 /* Error -   WSPsend: asynchronous send call */

09:57:21.937 /* send(): 16 bytes were sent to socket 1120:620 using flags 0 */

(send_14, 16, 620)
        "h"
        "\x0e\x06\x00\x04\x00"
        "."
        "\x01"
        "\a"
        "\x00\x01"
        "\t\a`"
        "\x00\x02"


09:57:21.937 /* Error -   WSPsend: asynchronous send call */

09:57:21.937 /* send(): 16 bytes were sent to socket 1120:620 using flags 0 */

(send_15, 16, 620)
        "h"
        "\x0e\x06\x00\x04\x00"
        "."
        "\x01"
        "\n"
        "\x00\x01"
        "\t\a`"
        "\x00\x02"


09:57:21.937 /* Error -   WSPrecv: asynchronous receive call */

09:57:21.953 /* recv failed */

09:57:23.703 /* lr_think_time(): wait 2 seconds */

09:57:23.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:23.718 /* Error -   WSPsend: asynchronous send call */

09:57:23.718 /* recv failed */

09:57:23.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_16, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:25.703 /* lr_think_time(): wait 2 seconds */

09:57:25.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:25.718 /* recv failed */

09:57:25.718 /* Error -   WSPsend: asynchronous send call */

09:57:25.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_17, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:27.703 /* lr_think_time(): wait 2 seconds */

09:57:27.718 /* Error -   WSPsend: asynchronous send call */
作者: elitel    时间: 2005-1-19 10:50
09:57:27.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_18, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:27.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:27.718 /* recv failed */

09:57:29.703 /* lr_think_time(): wait 2 seconds */

09:57:29.718 /* Error -   WSPrecv: asynchronous receive call */

09:57:29.718 /* Error -   WSPsend: asynchronous send call */

09:57:29.718 /* recv failed */

09:57:29.718 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_19, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:29.828 /* Error -   WSPrecv: asynchronous receive call */

09:57:29.828 /* recv failed */

09:57:31.203 /* lr_think_time(): wait 2 seconds */

09:57:31.218 /* Error -   WSPsend: asynchronous send call */

09:57:31.218 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_20, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:31.218 /* Error -   WSPrecv: asynchronous receive call */

09:57:31.218 /* recv failed */

09:57:31.812 /* Error -   WSPrecv: asynchronous receive call */

09:57:31.828 /* recv(): 66 bytes were received from socket 1120:620 using flags 0 (500 were asked for) */

(recv_21, 500, 620)
        "h"
        "\x14"
        "\b"
        "\x00"
        "\n"
        "\x00"
        "g"
        "\x01\x06\x00\x00"
        "n"
        "\x00\x00\x00"
        "g"
        "\xd4"
        "6\t"
        "\x13\x01\x05"
        "h"
        "\x14"
        "\n"
        "\x00"
        "\n"
        "\x00"
        "g"
        "\x01\x06\x00\x00\xe7\x00\x00\x00"
        "g"
        "\xd4"
        "6\t"
        "\x13\x01\x05"
        "h"
        "\x14"
        "\f"
        "\x00"
        "\n"
        "\x00"
        "g"
        "\x01\x06\x00\x00\xfe\x00\x00\x00"
        "g"
        "\xd4"
        "6\t"
        "\x13\x01\x05"


09:57:31.828 /* Error -   WSPrecv: asynchronous receive call */

09:57:31.843 /* recv failed */

09:57:33.203 /* lr_think_time(): wait 2 seconds */

09:57:33.218 /* Error -   WSPsend: asynchronous send call */

09:57:33.218 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_22, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:33.218 /* Error -   WSPrecv: asynchronous receive call */

09:57:33.218 /* recv failed */

09:57:33.312 /* Error -   WSPsend: asynchronous send call */

09:57:33.312 /* send(): 23 bytes were sent to socket 1120:620 using flags 0 */

(send_23, 23, 620)
        "h"
        "\x15"
        "\n"
        "\x00\x0e\x00\x1e\x01\x03\x00\x01"
        "\t"
        "\x02\x00\x00\x00"
        "媥9\t"
        "\x13\x01\x05"


09:57:33.328 /* Error -   WSPrecv: asynchronous receive call */

09:57:33.328 /* Error -   WSPsend: asynchronous send call */

09:57:33.328 /* recv(): 16 bytes were received from socket 1120:620 using flags 0 (500 were asked for) */

(recv_24, 500, 620)
        "h"
        "\x0e\x10\x00"
        "\f"
        "\x00"
        "."
        "\x01\x06\x00\x01"
        "\t\a`"
        "\x00\x02"


09:57:33.343 /* send(): 16 bytes were sent to socket 1120:620 using flags 0 */

(send_25, 16, 620)
        "h"
        "\x0e"
        "\f"
        "\x00\x10\x00"
        "."
        "\x01"
        "\a"
        "\x00\x01"
        "\t"
        "\x06"
        "`"
        "\x00\x02"


09:57:33.343 /* Error -   WSPrecv: asynchronous receive call */

09:57:33.343 /* Error -   WSPsend: asynchronous send call */

09:57:33.343 /* recv failed */

09:57:33.359 /* send(): 16 bytes were sent to socket 1120:620 using flags 0 */

(send_26, 16, 620)
        "h"
        "\x0e"
        "\f"
        "\x00\x10\x00"
        "."
        "\x01"
        "\n"
        "\x00\x01"
        "\t"
        "\x06"
        "`"
        "\x00\x02"


09:57:33.359 /* Error -   WSPsend: asynchronous send call */

09:57:33.359 /* send(): 16 bytes were sent to socket 1120:620 using flags 0 */

(send_27, 16, 620)
        "h"
        "\x0e\x10\x00\x12\x00"
        "."
        "\x01"
        "\a"
        "\x00\x01"
        "\t\a`"
        "\x00\x02"


09:57:33.359 /* Error -   WSPsend: asynchronous send call */

09:57:33.375 /* send(): 16 bytes were sent to socket 1120:620 using flags 0 */

(send_28, 16, 620)
        "h"
        "\x0e\x10\x00\x12\x00"
        "."
        "\x01"
        "\n"
        "\x00\x01"
        "\t\a`"
        "\x00\x02"


09:57:33.375 /* Error -   WSPrecv: asynchronous receive call */

09:57:33.375 /* recv failed */

09:57:35.203 /* lr_think_time(): wait 2 seconds */

09:57:35.218 /* Error -   WSPrecv: asynchronous receive call */

09:57:35.218 /* Error -   WSPsend: asynchronous send call */

09:57:35.218 /* recv failed */

09:57:35.218 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_29, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:37.203 /* lr_think_time(): wait 2 seconds */

09:57:37.218 /* Error -   WSPrecv: asynchronous receive call */

09:57:37.218 /* Error -   WSPsend: asynchronous send call */

09:57:37.218 /* recv failed */

09:57:37.218 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_30, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:39.203 /* lr_think_time(): wait 2 seconds */

09:57:39.218 /* Error -   WSPsend: asynchronous send call */

09:57:39.218 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_31, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:39.218 /* Error -   WSPrecv: asynchronous receive call */

09:57:39.218 /* recv failed */

09:57:41.203 /* lr_think_time(): wait 2 seconds */

09:57:41.218 /* Error -   WSPrecv: asynchronous receive call */

09:57:41.218 /* Error -   WSPsend: asynchronous send call */

09:57:41.218 /* recv failed */

09:57:41.218 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_32, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:43.203 /* lr_think_time(): wait 2 seconds */

09:57:43.218 /* Error -   WSPrecv: asynchronous receive call */

09:57:43.218 /* Error -   WSPsend: asynchronous send call */

09:57:43.218 /* recv failed */

09:57:43.218 /* send(): 6 bytes were sent to socket 1120:620 using flags 0 */

(send_33, 6, 620)
        "h"
        "\x04\x83\x00\x00\x00"


09:57:45.078 /* lr_think_time(): wait 2 seconds */

09:57:45.078 /* closesocket(): socket 1120:648 closed successfully */

09:57:45.281 /* closesocket(): socket 1120:620 closed successfully */

09:57:45.281 /* closesocket(): socket 1120:596 closed successfully */
作者: elitel    时间: 2005-1-19 10:51
executing log:

Virtual User Script started
Starting action vuser_init.
vuser_init.c(12): lrs_startup(257)
vuser_init.c(14): lrs_create_socket(socket0, TCP, ...)
vuser_init.c(16): lrs_create_socket(socket1, TCP, ...)
vuser_init.c(18): lrs_send(socket1, buf0)
vuser_init.c(22): lrs_send(socket1, buf1)
vuser_init.c(26): lrs_send(socket1, buf2)
vuser_init.c(30): lrs_send(socket1, buf3)
vuser_init.c(34): lrs_send(socket1, buf4)
vuser_init.c(38): lrs_send(socket1, buf5)
vuser_init.c(42): lrs_send(socket1, buf6)
vuser_init.c(46): lrs_send(socket1, buf7)
vuser_init.c(50): lrs_send(socket1, buf8)
vuser_init.c(54): lrs_send(socket1, buf9)
vuser_init.c(56): lrs_receive(socket1, buf10)
vuser_init.c(56): Mismatch (expected 16 bytes, 0 bytes actually received)
vuser_init.c(58): lrs_send(socket1, buf11)
vuser_init.c(62): lrs_send(socket1, buf12)
vuser_init.c(66): lrs_send(socket1, buf13)
vuser_init.c(70): lrs_send(socket1, buf14)
vuser_init.c(74): lrs_send(socket1, buf15)
vuser_init.c(78): lrs_send(socket1, buf16)
vuser_init.c(80): lrs_receive(socket1, buf17)
vuser_init.c(80): Mismatch (expected 66 bytes, 0 bytes actually received)
vuser_init.c(84): lrs_send(socket1, buf18)
vuser_init.c(86): lrs_receive(socket1, buf19)
vuser_init.c(86): Mismatch (expected 16 bytes, 0 bytes actually received)
vuser_init.c(88): lrs_send(socket1, buf20)
vuser_init.c(92): lrs_send(socket1, buf21)
vuser_init.c(96): lrs_send(socket1, buf22)
vuser_init.c(100): lrs_send(socket1, buf23)
vuser_init.c(104): lrs_send(socket1, buf24)
vuser_init.c(108): lrs_send(socket1, buf25)
vuser_init.c(112): lrs_close_socket(socket1)
vuser_init.c(114): lrs_close_socket(socket0)
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
vuser_end.c(12): lrs_cleanup()
Ending action vuser_end.
Vuser Terminated.
作者: elitel    时间: 2005-1-19 10:54
录制日志中:
09:57:33.375 /* Error -   WSPrecv: asynchronous receive call */

09:57:33.375 /* recv failed */

09:57:35.203 /* lr_think_time(): wait 2 seconds */

09:57:35.218 /* Error -   WSPrecv: asynchronous receive call */

09:57:35.218 /* Error -   WSPsend: asynchronous send call */

09:57:35.218 /* recv failed */

执行日志:

vuser_init.c(56): Mismatch (expected 16 bytes, 0 bytes actually received)


这些问题不知道怎么解决,请兄弟姐妹指点迷津!
作者: 啄木鸟    时间: 2005-7-21 16:09
标题: 同样的困惑:
具体表现是客户端发送的数据服务器端接收不到
作者: jacktian    时间: 2005-7-29 08:45
是数据包没有接收到,需要查看所接收的buf的内容,确定其中的数据,在根据业务判断这些数据参数是否符合业务的要求
作者: view999    时间: 2006-7-6 09:21
这个问题怎么还没有解决阿?
作者: view999    时间: 2006-7-6 09:22
有解决方案的分享一下经验,哈哈 我也遇到了这个问题.
作者: wss123    时间: 2006-7-6 09:35
打开你的data.ws文件,看看你的数据,是不是一直使用录制时的参数,比如用户名等需要参数化,还有如流水号等 需要关联。如果 执行了参数化,那么看看 你的取值是否正确
作者: view999    时间: 2006-7-6 09:43
data.ws 的数据没有动 ,问题是录制脚本的时候就出现了问题,可以在record log里看到这样的错误
* recv(): 29 bytes were received from socket 1636:640 using flags 0 (29 were asked for) */

/* Error -   WSPsend: asynchronous send call */

我测试的程序是winsock2写的三层结构的客户端,类似股票交易软件
作者: wss123    时间: 2006-7-6 09:55
刚才看了下你建立了socket0,之后的代码没有再涉及到它,是否是无用代码,注释掉它。还需把lrs_close_socket("socket0");
也一起注释掉,要不会出语法错误
作者: view999    时间: 2006-7-6 10:00
标题: 这是我的录制脚本
/*********************************************************************
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Thu Jul 06 08:45:05
*********************************************************************/

#include "lrs.h"


vuser_init()
{
    lrs_startup(257);

    lr_think_time(12);

    lr_think_time(10);

    lrs_create_socket("socket0", "TCP", "RemoteHost=COMPUTER1:9002",  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);

    lrs_send("socket0", "buf18", LrsLastArg);

    lrs_receive("socket0", "buf19", LrsLastArg);

    lrs_send("socket0", "buf20", LrsLastArg);

    lrs_receive("socket0", "buf21", LrsLastArg);

    lrs_send("socket0", "buf22", LrsLastArg);

    lrs_receive("socket0", "buf23", LrsLastArg);

    lrs_send("socket0", "buf24", LrsLastArg);

    lrs_receive("socket0", "buf25", LrsLastArg);

    lr_think_time(8);

    lrs_send("socket0", "buf26", LrsLastArg);

    lrs_receive("socket0", "buf27", LrsLastArg);

    lrs_send("socket0", "buf28", LrsLastArg);

    lrs_receive("socket0", "buf29", LrsLastArg);

    lrs_send("socket0", "buf30", LrsLastArg);

    lrs_receive("socket0", "buf31", LrsLastArg);

    lrs_send("socket0", "buf32", LrsLastArg);

    lrs_receive("socket0", "buf33", LrsLastArg);

    return 0;
}
作者: view999    时间: 2006-7-6 10:00
标题: 这是我的 record log
/* WSAStartup(): process 1636 using flags 0 */

/* ReadCommWindowInfo: HttpInterceptMode = 0 */

/* socket(): created with handle: 1636:324, address format 2, type 2, protocol 0. */

/* setsockopt(): socket 1636:324, level: 0xffff, optname: 0x4, optval: 1 */

/* lr_think_time(): wait 12 seconds */

/* bind(): socket 1636:324 bound with family 2, port 9010, and address 0x0 */

/* setsockopt(): socket 1636:324, level: 0x0, optname: 0xa, optval: 8 */

/* setsockopt(): socket 1636:324, level: 0x0, optname: 0xb, optval: 1 */

/* setsockopt failed */

/* setsockopt(): socket 1636:324, level: 0xffff, optname: 0x1006, optval: 0 */

/* setsockopt(): socket 1636:324, level: 0xffff, optname: 0x1005, optval: 0 */

/* lr_think_time(): wait 10 seconds */

/* socket(): created with handle: 1636:640, address format 2, type 1, protocol 6. */

/* connect(): socket 1636:640 tried to connect with family 2, port 9002, and address 0xc0a80097. Return value: -1 */

/* setsockopt(): socket 1636:640, level: 0x6, optname: 0x1, optval: 1 */

/* setsockopt(): socket 1636:640, level: 0xffff, optname: 0x80, optval: 1 */

/* setsockopt(): socket 1636:640, level: 0xffff, optname: 0x1006, optval: 0 */

/* setsockopt(): socket 1636:640, level: 0xffff, optname: 0x1005, optval: 0 */

/* send(): 13 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 29 bytes were received from socket 1636:640 using flags 2 (1024 were asked for) */

/* recv(): 29 bytes were received from socket 1636:640 using flags 0 (29 were asked for) */

/* Error -   WSPsend: asynchronous send call */

/* send(): 51 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 145 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 91 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 106 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 91 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 356 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* recv(): 62 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 74 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 61 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 55 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 88 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 72 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 81 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 55 bytes were sent to socket 1636:640 using flags 0 */

/* Error -   WSPsend: asynchronous send call */

/* send(): 81 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 700 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* recv(): 3123 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv(): 168 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 68 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 733 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* recv(): 324 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 73 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 82 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 75 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 63 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 81 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 470 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* recv(): 63 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 57 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 2244 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* lr_think_time(): wait 8 seconds */

/* Error -   WSPsend: asynchronous send call */

/* send(): 68 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 82 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 126 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 84 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 68 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 82 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */

/* Error -   WSPsend: asynchronous send call */

/* send(): 126 bytes were sent to socket 1636:640 using flags 0 */

/* recv(): 84 bytes were received from socket 1636:640 using flags 0 (4096 were asked for) */

/* recv failed */
作者: view999    时间: 2006-7-6 10:03
标题: 我个人的看法
以前我测试过上海金仕达的期货软件,录制,测试都非常成功,我想可能金仕达可能是用socket1写的软件。
现在我测得软件是用socket2写的,我个人认为是不是loadrunner对socket2支持的不够好?
作者: wss123    时间: 2006-7-6 10:08
哦,那你看看你录制的时候,服务器有没有报错。是不是数据不匹配。
作者: view999    时间: 2006-7-6 10:11
数据不匹配 ,也是有可能啊,你也提醒了我。

但是现实是我没办法看到服务器的数据,整套软件我们的外包公司还没有提交给我们,这时候你要查看服务器,他不会同意的。
作者: view999    时间: 2006-7-6 11:20
希望有经验的人进来讨论讨论
作者: view999    时间: 2006-7-6 11:22
没有人说话了

[ 本帖最后由 view999 于 2006-7-6 14:34 编辑 ]
作者: cncnily    时间: 2010-8-19 10:09
这个问题我也遇到了,谁解答下
作者: archonwang    时间: 2010-8-19 10:39
....最好是能看到数据,socket中的数据可能需经过翻译才能看到。。。。抓狂。
作者: woaiwojia_shan    时间: 2011-8-5 14:47
这个问题我关注很久了 为什么还没有解决。高手出来帮下忙啦。




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2