lr 录制cs架构 运行报错 请大师们指点迷津

2012-08-17  马娇丽 

下面是我个人录制的一个登陆功能,是cs架构,但是不知道为什么运行的时候报错,而且怎么才能找到动态数据呢
Action()
{
    lr_start_transaction("开始登陆");

    lrs_create_socket("socket0", "UDP", "LocalHost=6223",  LrsLastArg);

    lrs_send("socket0", "buf0", "TargetSocket=LOCALHOST:15000", LrsLastArg);

    lrs_create_socket("socket1", "UDP", "LocalHost=30000",  LrsLastArg);

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

    lrs_send("socket1", "buf2", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    lrs_send("socket1", "buf4", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    lrs_send("socket1", "buf6", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    lrs_send("socket1", "buf8", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    lrs_send("socket1", "buf10", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    lrs_send("socket1", "buf12", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    lrs_send("socket1", "buf14", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    lrs_send("socket1", "buf16", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    lrs_send("socket1", "buf18", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    lrs_send("socket1", "buf20", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    lrs_send("socket1", "buf22", "TargetSocket=LOCALHOST:15000", LrsLastArg);

    lr_end_transaction("结束登陆", LR_AUTO);

    lr_think_time(12);

    lrs_send("socket1", "buf23", "TargetSocket=LOCALHOST:15000", LrsLastArg);

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

    return 0;
}

报错:


Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(12): Notify: Transaction "开始登陆" started.
Action.c(14): lrs_create_socket(socket0, UDP, ...)
Action.c(14): Error : socket0 - Address already in use. Error code : 10048.
Action.c(14): Notify: Transaction "开始登陆" ended with "Fail" status (Duration: 0.0231).
Abort was called from an action.
Ending Vuser...
Starting action vuser_end.
vuser_end.c(12): lrs_cleanup()
Ending action vuser_end.
Vuser Terminated.

418°/4162 人阅读/2 条评论 发表评论

陈磊  2012-08-20

客户端是不是一个机器只能开一个?


马娇丽  2012-08-20

陈磊: 客户端是不是一个机器只能开一个?
是的啊


登录 后发表评论