51Testing软件测试论坛
标题:
LoadRunner winsocket 关联 与 10053 错误
[打印本页]
作者:
pinglr
时间:
2010-1-28 10:33
标题:
LoadRunner winsocket 关联 与 10053 错误
我的录制关联脚本如:
Action()
{
lrs_create_socket("socket0", "TCP", "RemoteHost=BONSON-UXG8YPMV:1433", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_send("socket0", "buf2", LrsLastArg);
lrs_receive("socket0", "buf3", LrsLastArg);
lrs_save_searched_string("socket0", LRS_LAST_RECEIVED, "参数1", "LB/BIN=\\x00\\x00F\\x03\\x01", "RB/BIN=\\v\\x00\\x02", 1, 0, -1);
lrs_save_param("socket0", "buf3", "param3", 0, 610);
// lr_output_message ("param3: %s", lr_eval_string("<param3>"));
lrs_send("socket0", "buf4", LrsLastArg);
lrs_receive("socket0", "buf5", LrsLastArg);
lrs_save_param("socket0", "buf3", "param5", 0, 51);
// lr_output_message ("param5: %s", lr_eval_string("<param5>"));
lrs_send("socket0", "buf6", LrsLastArg);
lrs_receive("socket0", "buf7", LrsLastArg);
lrs_save_param("socket0", "buf7", "param5", 0, 325);
lr_output_message ("param7: %s", lr_eval_string("<param7>"));
lrs_close_socket("socket0");
return 0;
}
回放脚本为:
Action.c(12): lrs_create_socket(socket0, TCP, ...)
Action.c(14): lrs_send(socket0, buf0)
Action.c(16): lrs_receive(socket0, buf1)
Action.c(18): lrs_send(socket0, buf2)
Action.c(20): lrs_receive(socket0, buf3)
Action.c(21): lrs_save_searched_string(socket0, get_last_received_buffer, 参数1, LB/BIN=\x00\x00F\x03\x01, RB/BIN=\v\x00\x02, 1, 0, -1)
Action.c(22): lrs_save_param(socket0, buf3, param3, 0, 610)
Action.c(24): lrs_send(socket0, buf4)
Action.c(26): lrs_receive(socket0, buf5)
Action.c(26): Mismatch (expected 51 bytes, 0 bytes actually received)
Action.c(27): lrs_save_param(socket0, buf3, param5, 0, 51)
Action.c(29): lrs_send(socket0, buf6)
Action.c(31): lrs_receive(socket0, buf7)
Action.c(31): 错误: socket0 - 软件造成连接终止。错误代码: 10053。
从操作调用了中止。
网上都说关联可以解决mismatch问题,我关联的是不是有问题呀,、怎么还有mismatch。同样10053 问题也是一样!请各位高手指点一下呀
作者:
云层
时间:
2010-2-1 11:38
你需要去检查一下数据包的格式,本来你的Action.c(26): lrs_receive(socket0, buf5)应该返回51个字节,但是实际返回0,说明你Action.c(24): lrs_send(socket0, buf4)这个数据包发出去有问题
作者:
yxd2006
时间:
2012-6-20 19:16
关注中……
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2