用winsocket协议录制了一段登录,迭代第二次的时候就会报错
代码如下Action()
{
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=61.152.245.87:1214", LrsLastArg);
lrs_send("socket1", "buf0", LrsLastArg);
lrs_receive("socket1", "buf1", LrsLastArg);
lrs_send("socket1", "buf2", LrsLastArg);
lrs_receive("socket1", "buf3", LrsLastArg);
lrs_send("socket1", "buf4", LrsLastArg);
lrs_receive("socket1", "buf5", LrsLastArg);
lrs_send("socket1", "buf6", LrsLastArg);
lrs_receive("socket1", "buf7", LrsLastArg);
lrs_send("socket1", "buf8", LrsLastArg);
lrs_receive("socket1", "buf9", LrsLastArg);
lrs_send("socket1", "buf10", LrsLastArg);
lrs_receive("socket1", "buf11", LrsLastArg);
lrs_send("socket1", "buf12", LrsLastArg);
lrs_receive("socket1", "buf13", LrsLastArg);
lrs_send("socket1", "buf14", LrsLastArg);
lrs_receive("socket1", "buf15", LrsLastArg);
lrs_send("socket1", "buf16", LrsLastArg);
lrs_receive("socket1", "buf17", LrsLastArg);
lr_think_time(7);
lrs_send("socket1", "buf18", LrsLastArg);
return 0;
}
错误信息
Virtual User Script started
Starting action vuser_init.
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(4): lrs_create_socket(socket1, TCP, ...)
Action.c(6): lrs_send(socket1, buf0)
Action.c(8): lrs_receive(socket1, buf1)
Action.c(10): lrs_send(socket1, buf2)
Action.c(12): lrs_receive(socket1, buf3)
Action.c(14): lrs_send(socket1, buf4)
Action.c(16): lrs_receive(socket1, buf5)
Action.c(18): lrs_send(socket1, buf6)
Action.c(20): lrs_receive(socket1, buf7)
Action.c(22): lrs_send(socket1, buf8)
Action.c(24): lrs_receive(socket1, buf9)
Action.c(26): lrs_send(socket1, buf10)
Action.c(28): lrs_receive(socket1, buf11)
Action.c(30): lrs_send(socket1, buf12)
Action.c(32): lrs_receive(socket1, buf13)
Action.c(34): lrs_send(socket1, buf14)
Action.c(36): lrs_receive(socket1, buf15)
Action.c(38): lrs_send(socket1, buf16)
Action.c(40): lrs_receive(socket1, buf17)
Action.c(40): Mismatch (expected 2048 bytes, 0 bytes actually received)
Action.c(44): lrs_send(socket1, buf18)
Ending action Action.
Ending iteration 1.
Starting iteration 2.
Starting action Action.
Action.c(4): lrs_create_socket(socket1, TCP, ...)
Action.c(4): Error : socket1 - Invalid argument. Error code : 10022.
Action.c(4): Continuing after error in Vuser script.
Action.c(6): lrs_send(socket1, buf0)
Action.c(6): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(6): Continuing after error in Vuser script.
Action.c(8): lrs_receive(socket1, buf1)
Action.c(8): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(8): Continuing after error in Vuser script.
Action.c(10): lrs_send(socket1, buf2)
Action.c(10): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(10): Continuing after error in Vuser script.
Action.c(12): lrs_receive(socket1, buf3)
Action.c(12): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(12): Continuing after error in Vuser script.
Action.c(14): lrs_send(socket1, buf4)
Action.c(14): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(14): Continuing after error in Vuser script.
Action.c(16): lrs_receive(socket1, buf5)
Action.c(16): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(16): Continuing after error in Vuser script.
Action.c(18): lrs_send(socket1, buf6)
Action.c(18): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(18): Continuing after error in Vuser script.
Action.c(20): lrs_receive(socket1, buf7)
Action.c(20): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(20): Continuing after error in Vuser script.
Action.c(22): lrs_send(socket1, buf8)
Action.c(22): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(22): Continuing after error in Vuser script.
Action.c(24): lrs_receive(socket1, buf9)
Action.c(24): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(24): Continuing after error in Vuser script.
Action.c(26): lrs_send(socket1, buf10)
Action.c(26): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(26): Continuing after error in Vuser script.
Action.c(28): lrs_receive(socket1, buf11)
Action.c(28): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(28): Continuing after error in Vuser script.
Action.c(30): lrs_send(socket1, buf12)
Action.c(30): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(30): Continuing after error in Vuser script.
Action.c(32): lrs_receive(socket1, buf13)
Action.c(32): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(32): Continuing after error in Vuser script.
Action.c(34): lrs_send(socket1, buf14)
Action.c(34): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(34): Continuing after error in Vuser script.
Action.c(36): lrs_receive(socket1, buf15)
Action.c(36): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(36): Continuing after error in Vuser script.
Action.c(38): lrs_send(socket1, buf16)
Action.c(38): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(38): Continuing after error in Vuser script.
Action.c(40): lrs_receive(socket1, buf17)
Action.c(40): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(40): Continuing after error in Vuser script.
Action.c(44): lrs_send(socket1, buf18)
Action.c(44): Error : Specified socket socket1 doesn't exist. Error code : 9002.
Action.c(44): Continuing after error in Vuser script.
Ending action Action.
Ending iteration 2.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
不知道各位大虾有没有解决的办法啊??? socket没关。 我发现LR录制的socket脚本都是没有close socket的语句,原来我还以为是被测系统的问题,现在有点怀疑是否和LR有关了。 是不是没有关闭socket的原因! sdlkfj3 sdlkfj3 错误:
Action.c(44): Error : Specified socket socket1 doesn't exist. Error code : 9002.
回复 #4 andy 的帖子
不一定是没关socket的原因吧。我之前测试一个应用的时候也遇到这样的问题,每次回放,第一个迭代就成功不了。我怀疑是应用的问题。
我测试是一个类似于联众游戏客户端的应用,每次的游戏场景都是不同的,而且协议是私有的第三方的协议。Zee可以确定是socket的问题吗?多谢 你的BUF18只有发送,没有接收 要把CREATE SOCKET 放在初始化脚本里. END放在结束脚本里, 要不每次迭代都会重新创建,没有关闭,是没有办法创建的 问题已经解决
只要把 create socket放在init里面就可以了
还有就是初始化的时间的设置
谢谢各位了-
回复 #7 rickyzhu 的帖子
帖子中提到“我测试是一个类似于联众游戏客户端的应用,每次的游戏场景都是不同的,而且协议是私有的第三方的协议。”我说一下我的理解,按照#1楼的发问可以看出这个通讯是通过socket1来完成的,在socket1这个通讯通道上可以发送和接受不同的数据,如果按照#1楼的脚本在不进行编辑直接运行迭代的话,那么对于第一次创建的socket1在第一次迭代的时候又执行creat socket语句,于是出现了Action.c(4): lrs_create_socket(socket1, TCP, ...)Action.c(4): Error : socket1 - Invalid argument. Error code : 10022.的错误。所以我想,这个类似于联众游戏的客户端的通讯是不是通过一个通道传输数据,仅管他是第三方的协议。 学习了,谢谢 回复 10# ctlzw1714
你好!最近我也用loadrunner来测试rtsp流媒体,遇到了同样的问题。都是socket创建失败了。。请问楼主如何解决的。能给我个例子吗。。我是新手 回复 1# ctlzw1714
您好请问您data.s文件里面会存在乱码的情况吗 因为我自己录制且回放都没有问题 在进行负载测试的时候都不能通过 不过我data.ws文件里面有乱码
页:
[1]