|
本帖最后由 jacckljl 于 2011-9-20 17:14 编辑
问题背景: 该软件是一任务管理软件,在软件中添加Label,Task,并对这些内容进行管理。可根据日期,任务优先级,完成度进行排序的一APP。
问题内容:现对服务器进行压力测试,其中需要增加Label,服务器会返回Labelid,每增加一条,服务器会返回该条labelId,增加两条,server会一次返回两labelid,增加三天,会返回三labelid。现对labelid进行关联,因为后面会在该label下添加task,以及删除该label。我使用关联时一次性取所有的labelid,以数组存放。现单个用户运行脚本正确,单用户多次循环也正确。但在跑压力测试时,多用就报错,说该关联有误。不知为什么,请大家指点。
关键脚本如下:
web_reg_save_param("CorrelationParameter",
"LB=labelId=",
"RB=\" \r",
"Search=Body",
"Ord=ALL",
LAST);
web_url("left!labels.action_4",
"URL=http://192.168.1.46:8280/todolist/left!labels.action?timestamp=1314772091425",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.46:8280/todolist/todo.action?version=0.0.0.43",
"Snapshot=t274.inf",
"Mode=HTTP",
LAST);
恩,继续,-------是准备发的,临时调试下忘了,斑竹帮看看
add_task()
{
lr_think_time(3);
web_url("todo.action_10",
"URL=http://192.168.1.46:8280/todolist/todo.action?flag=href&labelId={CorrelationParameter_2}×tamp=1314778679770",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.46:8280/todolist/left!labels.action?timestamp=1314778654963",
"Snapshot=t445.inf",
"Mode=HTTP",
LAST);
lr_think_time(2);
web_url("additem!addItem.action",
"URL=http://192.168.1.46:8280/todolist/additem!addItem.action?itemName={NewParam_8}&itemCode={NewParam_1}&labelId={CorrelationParameter_2}&updateTime=1314749839789",
"Resource=1",
"Referer=http://192.168.1.46:8280/todolist/todo.action?version=0.0.0.43",
"Snapshot=t446.inf",
LAST);
lr_log_message(lr_eval_string("{NewParam_1}"));
web_url("left!labels.action_3",
"URL=http://192.168.1.46:8280/todolist/left!labels.action?timestamp=1314778691204",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.46:8280/todolist/todo.action?flag=href&labelId={CorrelationParameter_2}×tamp=1314778679770",
"Snapshot=t447.inf",
"Mode=HTTP",
LAST);
web_url("todo.action_11",
"URL=http://192.168.1.46:8280/todolist/todo.action?flag=href&labelId={CorrelationParameter_3}×tamp=1314778692757",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.46:8280/todolist/left!labels.action?timestamp=1314778691204",
"Snapshot=t448.inf",
"Mode=HTTP",
LAST);
lr_think_time(2);
web_url("VoidMethod",
"URL=http://192.168.1.46:8280/todolist/servlet/VoidMethod?timestamp=1314778697478",
"Resource=0",
"Referer=http://192.168.1.46:8280/todolist/todo.action?version=0.0.0.43",
"Snapshot=t449.inf",
"Mode=HTTP",
LAST);
web_url("additem!addItem.action_2",
"URL=http://192.168.1.46:8280/todolist/additem!addItem.action?itemName={NewParam_9}&itemCode={NewParam_2}&labelId={CorrelationParameter_3}&updateTime=1314749887550",
"Resource=1",
"Referer=http://192.168.1.46:8280/todolist/todo.action?version=0.0.0.43",
"Snapshot=t450.inf",
LAST);
lr_log_message(lr_eval_string("{NewParam_2}"));
web_url("left!labels.action_4",
"URL=http://192.168.1.46:8280/todolist/left!labels.action?timestamp=1314778698214",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.46:8280/todolist/todo.action?flag=href&labelId={CorrelationParameter_3}×tamp=1314778692757",
"Snapshot=t451.inf",
"Mode=HTTP",
LAST);
web_url("todo.action_12",
"URL=http://192.168.1.46:8280/todolist/todo.action?flag=href&labelId={CorrelationParameter_4}×tamp=1314778699647",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.46:8280/todolist/left!labels.action?timestamp=1314778698214",
"Snapshot=t452.inf",
"Mode=HTTP",
LAST);
lr_think_time(3);
web_custom_request("ReverseAjax.dwr_2",
"URL=http://192.168.1.46:8280/todolist/dwr/call/plainpoll/ReverseAjax.dwr",
"Method=POST",
"Resource=0",
"RecContentType=text/javascript",
"Referer=http://192.168.1.46:8280/todolist/todo.action?version=0.0.0.43",
"Snapshot=t453.inf",
"Mode=HTTP",
"EncType=text/plain",
"Body=windowName=\nbatchId=3\npage=%2Ftodolist%2Ftodo.action%3Fversion%3D0.0.0.43\nhttpSessionId={SessionId}\nscriptSessionId=3ED145DE2A7E12275C13866D534DE03C\npartialResponse=0\n",
LAST);
web_url("additem!addItem.action_3",
"URL=http://192.168.1.46:8280/todolist/additem!addItem.action?itemName={NewParam_10}&itemCode={NewParam_3}&labelId={CorrelationParameter_4}&updateTime=1314749894994",
"Resource=1",
"Referer=http://192.168.1.46:8280/todolist/todo.action?version=0.0.0.43",
"Snapshot=t454.inf",
LAST);
lr_log_message(lr_eval_string("{NewParam_3}"));
web_url("left!labels.action_5",
"URL=http://192.168.1.46:8280/todolist/left!labels.action?timestamp=1314778709589",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.46:8280/todolist/todo.action?flag=href&labelId={CorrelationParameter_4}×tamp=1314778699647",
"Snapshot=t455.inf",
"Mode=HTTP",
LAST);
return 0;
} |
|