loadrunner 动态数据的问题(你们肯定都没见过)
录制脚本时,对动态数据进行了关联,回放时也通过了。但是运行场景时,还是出现动态数据的问题而过不去,提示这样的错误:danjitishenglianxi.c(36): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://219.238.148.41/smartupgrade.do?doMethod=addTest&level3Id=10070&topicId=1493&studentId=&termId=82&source=0&difficulty=0.0&mark_level=0&flag=0&subjectId=4×=1&mark_level_temp=0&showAlertFlagTemp=0&level2Name=第一单元&level3Name=3*%20我的第一本书"。其中danjitishenglianxi是我定义的事务名称(汉语拼音)。这样的错误就是动态数据的错误吧。请问各位高手们如何解决这个问题呢?[ 本帖最后由 zynuage 于 2008-7-28 09:30 编辑 ] 应该是关联的问题,把你的脚本弄上来看看
回复 2# 的帖子
我都关联了,录制回放没问题。为何运行场景时有问题呢?回复 2# 的帖子
我都关联了,录制回放没问题。为何运行场景时有问题呢?不让发那么多,截取一部分。kaishinandutiaozhan()
{
web_set_max_html_param_len("1024");
/* Registering parameter(s) from source task id 167
// {CSRule_1_UID3} = "type"
// */
web_reg_save_param("CSRule_1_UID3",
"LB=script ",
"RB==",
"Ord=3",
"Search=Body",
"RelFrameId=1",
LAST);
web_custom_request("smartupgrade.do_2",
"URL=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
"Method=GET",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t208.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_custom_request("css.css_4",
"URL=http://219.238.148.41/jtcss/css.css",
"Method=GET",
"Resource=1",
"RecContentType=text/css",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("font.css_6",
"URL=http://219.238.148.41/jtcss/font.css",
"Method=GET",
"Resource=1",
"RecContentType=text/css",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("calendar-blue.css_4",
"URL=http://219.238.148.41/js/calendar/skins/calendar-blue.css",
"Method=GET",
"Resource=1",
"RecContentType=text/css",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("formcheck.js_8",
"URL=http://219.238.148.41/js/formcheck.js",
"Method=GET",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("util.js_8",
"URL=http://219.238.148.41/js/util.js",
"Method=GET",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("prototype.js_4",
"URL=http://219.238.148.41/js/proto{CSRule_1_UID3}.js",
"Method=GET",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("butong_net_1.js_4",
"URL=http://219.238.148.41/jtcss/butong_net_1.js",
"Method=GET",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("butong_net_2.js_4",
"URL=http://219.238.148.41/jtcss/butong_net_2.js",
"Method=GET",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("top1.jpg_4",
"URL=http://219.238.148.41/jtimages/index/top1.jpg",
"Method=GET",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("biao.gif_4",
"URL=http://219.238.148.41/jtimages/index/biao.gif",
"Method=GET",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("left8.jpg_4",
"URL=http://219.238.148.41/jtimages/index/left8.jpg",
"Method=GET",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("formcheck.js_9",
"URL=http://219.238.148.41/js/formcheck.js",
"Method=GET",
"Resource=1",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("left.jpg_4",
"URL=http://219.238.148.41/jtimages/index/left.jpg",
"Method=GET",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("left2.jpg_4",
"URL=http://219.238.148.41/jtimages/index/left2.jpg",
"Method=GET",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("down.gif_4",
"URL=http://219.238.148.41/download/student/images/down.gif",
"Method=GET",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("util.js_9",
"URL=http://219.238.148.41/js/util.js",
"Method=GET",
"Resource=1",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("fd.js",
"URL=http://219.238.148.41/jtcss/fd.js",
"Method=GET",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
web_custom_request("yp.gif_2",
"URL=http://219.238.148.41/jtimages/yp.gif",
"Method=GET",
"Resource=1",
"RecContentType=image/gif",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=selfTest&clock=17",
LAST);
lr_think_time( 3 );
// Parameter {WCSParam_Diff11} created by Correlation Studio
web_reg_save_param( "WCSParam_Diff11", "LB=value=\"", "RB=\"", "Ord=4", "Search=Body", "RelFrameId=1", LAST );
web_custom_request("smartupgrade.do_4",
"URL=http://219.238.148.41/smartupgrade.do?doMethod=answerDifficultTest",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=answerDifficultTest&isFirst=1",
"Snapshot=t210.inf",
"Mode=HTTP",
"Body=clock=+00%3A54&pageNum=2&nextquizVerId={WCSParam_Diff9}&quizVerId={WCSParam_Diff10}&q2=B&q1=B&q2=&q2=&q2=",
LAST);
web_concurrent_start(NULL);
web_custom_request("jquery-1.2.1.js_2",
"URL=http://219.238.148.41/js/jquery-1.2.1.js",
"Method=GET",
"Resource=1",
"Referer=http://219.238.148.41/smartupgrade.do?doMethod=answerDifficultTest",
LAST);
return 0;
}
回复 3# 的帖子
是不是场景设置的有点问题,不是很合理,最好结合实际结果图表来分析,看报这个错是在什么时刻,该时刻各图表的数值情况,综合来考虑 可能是场景下压力大了这个页面就没返回,导致关联没有抓到东西 同意版主的判断,建议利用检查点 确认是否lr发送的请求真的得到了处理而转到期待的页面 ,不要以为不报错就是ok哦。回复 6# 的帖子
我设置的虚拟用户为10个用户,压力应该不是很大的。同样的系统,在登录脚本时我设置400个虚拟用户都能跑过去并且没有报错。我同开发人员沟通过,这里涉及了动态数据问题,我现在就是怀疑动态数据的问题,场景当中有没有解决动态数据问题的选项呢? 如果希望解决问题,请用html_base script的方式录制脚本,你的脚本看的太混乱,然后把前后两次录制的脚本拿出来,并且贴出变化的内容。LTStoneXie
只看代码还是不行的,要说一说你的场景是怎么设置的,你是为了什么测试目的。迭代方面怎么设置,有一个选项说当每执行一次迭代模拟一个新的用户,还有你,有没有输入参数的设置。你得把整体的思路说出来,这样好分析一点。谢谢。 应该是关联的问题,改用URL模式试一下. HTTP Status-Code=500 服务器内部错误,可能是服务器处理发生错误,可以去服务器端看看日志,出现问题多看日志,是个好习惯。 lz提供的信息不够到底具体什么样的场景?
并发用户是所有都出错?
出的错是否相同?
初步推测几个可能性
1 系统对多用户并发请求来不及响应(表跟我说登录没问题,除非你调用的是登录模块)
2 多用户重复登录产生某方面的冲突
如果不是固定的出错(比如20个并发7个出错),把thinktime加上去试试
页:
[1]