51Testing软件测试论坛
标题:
LR Contorller中运行脚本,参数化失败。
[打印本页]
作者:
tankhu
时间:
2013-4-28 12:49
标题:
LR Contorller中运行脚本,参数化失败。
#include "lrs.h"
Action()
{
lrs_create_socket("socket9", "TCP", "RemoteHost=192.168.2.94:8870", LrsLastArg);
lr_rendezvous("login_8870");
lr_start_transaction("login");
lrs_send("socket9", "buf219", LrsLastArg);
lrs_receive("socket9", "buf220", LrsLastArg);
//lrs_receive("socket9", "buf223", LrsLastArg);
lrs_send("socket9", "buf225", LrsLastArg);
lrs_receive("socket9", "buf226", LrsLastArg);
lr_end_transaction("login", LR_AUTO);
/*while(1)
{
lr_think_time(6);
lrs_send("socket9", "buf229", LrsLastArg);
lrs_receive("socket9", "buf230", LrsLastArg);
sleep(5000);
}*/
lrs_close_socket("socket9");
return 0;
}。
参数化在data.ws中操作的。
send buf219 24
"\x18\x00\x01\x88\x00\x00"
"\b"
"\x81\x00\x00"
"\f"
"\x00\x8d"
"\t"
"\x00\x00"
"<NewParam_1>\x00\x00\x00\x00"
总共加了10个USER进去。分别为10001-10010.
VG中,迭代为2,回放脚本,脚本回放成功,且参数成功替换,第一次迭代使用参数10001,第二次迭代试用10002.
将脚本放在contorller中运行,成功一个。失败9个。且发现失败的原因都是其他9个USER试用的ID号为10001,我们系统就自动干掉这些USER。
在在open parameter list中,选中的select next row: sequential, update valueon: each occurrence.
但是其他的值我也使用测试过。都是无法成功的。
我这里要做的测试就是并发10个用户进行下载的操作,要求10个USER为不同的USERID。
请大家帮我看看。很着急的测试。
作者:
tankhu
时间:
2013-4-28 12:50
================================RECEIVED BUFFER================================
===============================================================================
Action.c(37): Notify: Transaction "login" ended with "Pass" status (Duration: 10.0693 Wasted Time: 10.0000).
Action.c(48): lrs_close_socket(socket9)
Ending action Action.
Ending iteration 1.
Starting iteration 2.
Starting action Action.
Action.c(15): lrs_create_socket(socket9, TCP, ...)
Action.c(19): Rendezvous login_8870
Action.c(22): Notify: Transaction "login" started.
Action.c(25): lrs_send(socket9, buf219)
Action.c(25): Notify: Next row for parameter NewParam_1 = 2 [table = NewParam_1].
Action.c(25): Notify: Getting new value for parameter 'NewParam_1': table = 'NewParam.dat' column = '0' row = '2'.
Action.c(25): Notify: Parameter Substitution: parameter "NewParam_1" = "10002"
Action.c(27): lrs_receive(socket9, buf220)
Action.c(31): lrs_send(socket9, buf225)
Action.c(33): lrs_receive(socket9, buf226)
Action.c(33): Mismatch in buffer's length (expected 178 bytes, 0 bytes actually received, difference in 178 bytes)
================================EXPECTED BUFFER================================
"\xb2\x00\x01\x88\x00\x00"
"\t"
"\x95\x00\x00\xa6\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x9c\x00"
"棎翺膈貵娂旯D/"
"\xc8\x02\xbb\x00\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x1a\x04\x00\x05\x7f\x96\x00\x00"
"\n"
"\x14"
"六味地黄丸192.168.2.94:8871:1;坑kw"
"\x15"
"x營壟/"
"\xc0"
"+ "
"\x02\x14\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x1a\x04\x00\x05\x7f\x96\x00\x00"
"\n"
"\x14"
"5S活動講座192.168.2.94:8871:1;"
===============================================================================
================================RECEIVED BUFFER================================
===============================================================================
Action.c(37): Notify: Transaction "login" ended with "Pass" status (Duration: 10.1372 Wasted Time: 10.0000).
Action.c(48): lrs_close_socket(socket9)
Ending action Action.
Ending iteration 2.
Starting iteration 3.
Starting action Action.
Action.c(15): lrs_create_socket(socket9, TCP, ...)
Action.c(19): Rendezvous login_8870
Action.c(22): Notify: Transaction "login" started.
Action.c(25): lrs_send(socket9, buf219)
Action.c(25): Notify: Next row for parameter NewParam_1 = 3 [table = NewParam_1].
Action.c(25): Notify: Getting new value for parameter 'NewParam_1': table = 'NewParam.dat' column = '0' row = '3'.
Action.c(25): Notify: Parameter Substitution: parameter "NewParam_1" = "10003"
Action.c(27): lrs_receive(socket9, buf220)
Action.c(31): lrs_send(socket9, buf225)
Action.c(33): lrs_receive(socket9, buf226)
Action.c(33): Mismatch in buffer's length (expected 178 bytes, 0 bytes actually received, difference in 178 bytes)
================================EXPECTED BUFFER================================
"\xb2\x00\x01\x88\x00\x00"
"\t"
"\x95\x00\x00\xa6\x00\x9c\x00\x00\x00\x00\x00\x00\x00\x9c\x00"
作者:
tankhu
时间:
2013-4-28 12:51
很着急,牛人帮忙解答撒,在线等帮助。
作者:
msnshow
时间:
2013-4-30 22:46
SCOKET协议的没法看
作者:
new_lio
时间:
2013-5-9 10:12
明显参数化出问题了
unique+once
作者:
mengdi007
时间:
2013-5-15 16:21
同求。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2