|
本人测的是一个C/S架构的软件登录,回放脚本的时候出现错误:Action.c(118): Error : socket8 - Address already in use. Error code : 10048.
然后我就把改行的LocalHost的值给改了一下,运行的时候还是报这个错,所以我干脆把有影响的LocalHost都改了以下,回放脚本成功,但是我放在场景里面测试5个人并发的时候还是出现这种错误,然后我就干脆把所有的LocalHost都参数化了,设置参数的时候我尽量使在同一次并发时不出现同样的LocalHost值,参数取值的策略设置为:Unique + Once,但是运行场景的时候还是报这个错误,我想问一下这个问题该怎么解决啊,感激不尽!!
下面是我都脚本和参数的数据
我已经把所有的Socket都关掉了
我把IP都改成了......,不好意思啊,
Action()
{
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=......", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_close_socket("socket0");
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=......", LrsLastArg);
lrs_create_socket("socket2", "TCP", "LocalHost=0", "RemoteHost=......", LrsLastArg);
lrs_send("socket1", "buf2", LrsLastArg);
lrs_receive("socket1", "buf3", LrsLastArg);
lrs_send("socket1", "buf4", LrsLastArg);
lrs_receive("socket1", "buf5", LrsLastArg);
lrs_send("socket2", "buf6", LrsLastArg);
lrs_receive("socket2", "buf7", LrsLastArg);
lrs_close_socket("socket2");
lr_start_transaction("登录");
lr_rendezvous("登录");
lr_think_time(20);
lrs_create_socket("socket3", "TCP", "LocalHost=0", "RemoteHost=......", LrsLastArg);
lrs_send("socket3", "buf8", LrsLastArg);
lrs_create_socket("socket4", "UDP", "LocalHost=<LocalHost1>", LrsLastArg);
lrs_receive("socket3", "buf9", LrsLastArg);
lrs_send("socket4", "buf10", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf11", LrsLastArg);
lrs_send("socket4", "buf12", "TargetSocket=......", LrsLastArg);
lrs_disable_socket("socket3", DISABLE_SEND);
lrs_close_socket("socket3");
lrs_create_socket("socket5", "TCP", "LocalHost=0", "RemoteHost=......", LrsLastArg);
lrs_send("socket4", "buf13", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf14", LrsLastArg);
lrs_send("socket4", "buf15", "TargetSocket=......", LrsLastArg);
lrs_send("socket5", "buf16", LrsLastArg);
lrs_receive("socket4", "buf17", LrsLastArg);
lrs_send("socket4", "buf18", "TargetSocket=......", LrsLastArg);
lrs_receive("socket5", "buf19", LrsLastArg);
lrs_disable_socket("socket5", DISABLE_SEND);
lrs_close_socket("socket5");
lrs_create_socket("socket6", "UDP", "RemoteHost=......", LrsLastArg);
lrs_close_socket("socket6");
lrs_receive("socket4", "buf20", LrsLastArg);
lrs_send("socket4", "buf21", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf22", LrsLastArg);
lrs_send("socket4", "buf23", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf24", LrsLastArg);
lrs_send("socket4", "buf25", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf26", LrsLastArg);
lrs_create_socket("socket7", "TCP", "LocalHost=<LocalHost3>", "RemoteHost=......", LrsLastArg);
lrs_send("socket4", "buf27", "TargetSocket=......", LrsLastArg);
lrs_send("socket7", "buf28", LrsLastArg);
lrs_receive("socket4", "buf29", LrsLastArg);
lrs_send("socket4", "buf30", "TargetSocket=......", LrsLastArg);
lrs_receive("socket4", "buf31", LrsLastArg);
lrs_send("socket4", "buf32", "TargetSocket=......", LrsLastArg);
lrs_receive("socket7", "buf33", LrsLastArg);
lrs_close_socket("socket7");
lrs_create_socket("socket8", "TCP", "LocalHost=<LocalHost4>", "RemoteHost=......", LrsLastArg);
lrs_send("socket8", "buf34", LrsLastArg);
lrs_receive("socket8", "buf35", LrsLastArg);
lrs_create_socket("socket9", "UDP", "RemoteHost=......", LrsLastArg);
lrs_close_socket("socket8");
lrs_close_socket("socket9");
lrs_create_socket("socket10", "UDP", "LocalHost=<LocalHost5>", LrsLastArg);
lrs_send("socket10", "buf36", "TargetSocket=......", LrsLastArg);
lrs_receive("socket10", "buf37", LrsLastArg);
lrs_send("socket10", "buf38", "TargetSocket=......", LrsLastArg);
lrs_receive("socket10", "buf39", LrsLastArg);
lrs_send("socket10", "buf40", "TargetSocket=......", LrsLastArg);
lrs_close_socket("socket10");
lrs_create_socket("socket11", "UDP", "LocalHost=<LocalHost2>", LrsLastArg);
lrs_send("socket11", "buf41", "TargetSocket=......", LrsLastArg);
lrs_receive("socket11", "buf42", LrsLastArg);
lrs_send("socket11", "buf43", "TargetSocket=......", LrsLastArg);
lrs_receive("socket11", "buf44", LrsLastArg);
lrs_send("socket11", "buf45", "TargetSocket=......", LrsLastArg);
lrs_receive("socket11", "buf46", LrsLastArg);
lrs_create_socket("socket12", "UDP", "RemoteHost=......", LrsLastArg);
lrs_receive("socket11", "buf47", LrsLastArg);
lrs_close_socket("socket12");
lrs_send("socket11", "buf48", "TargetSocket=......", LrsLastArg);
lrs_create_socket("socket13", "TCP", "LocalHost=<LocalHost6>", "RemoteHost=......", LrsLastArg);
lrs_send("socket13", "buf49", LrsLastArg);
lrs_receive("socket13", "buf50", LrsLastArg);
lrs_close_socket("socket13");
lrs_create_socket("socket14", "TCP", "LocalHost=<LocalHost7>", "RemoteHost=......", LrsLastArg);
lrs_send("socket14", "buf51", LrsLastArg);
lrs_receive("socket14", "buf52", LrsLastArg);
lrs_close_socket("socket14");
lrs_create_socket("socket15", "TCP", "LocalHost=<LocalHost8>", "RemoteHost=......", LrsLastArg);
lrs_send("socket15", "buf53", LrsLastArg);
lrs_receive("socket15", "buf54", LrsLastArg);
lrs_close_socket("socket15");
lrs_create_socket("socket16", "TCP", "LocalHost=<LocalHost9>", "RemoteHost=......", LrsLastArg);
lrs_send("socket16", "buf55", LrsLastArg);
lrs_receive("socket16", "buf56", LrsLastArg);
lrs_close_socket("socket16");
lrs_create_socket("socket17", "TCP", "LocalHost=<LocalHost0>", "RemoteHost=......", LrsLastArg);
lrs_send("socket17", "buf57", LrsLastArg);
lrs_receive("socket17", "buf58", LrsLastArg);
lrs_close_socket("socket17");
lrs_create_socket("socket18", "TCP", "LocalHost=0", "RemoteHost=......", LrsLastArg);
lrs_send("socket18", "buf59", LrsLastArg);
lrs_receive("socket18", "buf60", LrsLastArg);
lrs_close_socket("socket18");
lrs_create_socket("socket19", "TCP", "LocalHost=0", "RemoteHost=......", LrsLastArg);
lrs_send("socket19", "buf61", LrsLastArg);
lrs_receive("socket19", "buf62", LrsLastArg);
lrs_close_socket("socket19");
lr_end_transaction("登录", LR_AUTO);
lrs_close_socket("socket1");
lrs_close_socket("socket4");
lrs_close_socket("socket11");
return 0;
}
LocalHost1,LocalHost2,LocalHost0,LocalHost3,LocalHost4,LocalHost5,LocalHost6,LocalHost7,LocalHost8,LocalHost9
5006,5067,3507,3501,3502,5062,3503,3504,3505,3506
5001,5062,3508,3502,3503,5063,3504,3505,3506,3507
5002,5063,3509,3503,3504,5064,3505,3506,3507,3508
5003,5064,3510,3504,3505,5065,3506,3507,3508,3509
5004,5065,3511,3505,3506,5066,3507,3508,3509,3510
5005,5066,3512,3506,3507,5067,3508,3509,3510,3511
麻烦大家帮我解决,不然的话这个东西没法测了,有什么说的不够详细明白的情说!!!
[ 本帖最后由 huangkai 于 2009-5-8 17:52 编辑 ] |
|