51Testing软件测试论坛
标题:
loadrunner测试问题,大家帮忙。。。
[打印本页]
作者:
ufoly94
时间:
2007-3-29 10:25
标题:
loadrunner测试问题,大家帮忙。。。
我录入的脚本,是一个网上给分的过程,每次卷纸过来的时候提交一个成绩。
我的录制脚本如下:
#include "web_api.h"
Action()
{
web_url("exam",
"URL=http://192.168.1.242/exam",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_url("inner.jsp",
"URL=http://192.168.1.242/exam/inner.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"URL=images/client/background.jpg", ENDITEM,
LAST);
web_url("index1.jsp",
"URL=http://192.168.1.242/exam/index1.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"URL=images/client/background.jpg", ENDITEM,
LAST);
lr_think_time(1);
web_submit_data("login.do",
"Action=http://192.168.1.242/exam/login.do?isPartlyRefresh=true",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.1.242/exam/inner.jsp",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=userName", "Value={username}", ENDITEM,
"Name=password", "Value=1", ENDITEM,
LAST);
web_url("frame.jsp",
"URL=http://192.168.1.242/exam/client/frame.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"URL=../images/jsv/calendar/drop2.gif", "Referer=http://192.168.1.242/exam/client/menu.jsp", ENDITEM,
"URL=../images/jsv/calendar/left1.gif", "Referer=http://192.168.1.242/exam/client/menu.jsp", ENDITEM,
"URL=../images/jsv/calendar/left2.gif", "Referer=http://192.168.1.242/exam/client/menu.jsp", ENDITEM,
"URL=../images/jsv/calendar/right2.gif", "Referer=http://192.168.1.242/exam/client/menu.jsp", ENDITEM,
"URL=../images/jsv/calendar/drop1.gif", "Referer=http://192.168.1.242/exam/client/menu.jsp", ENDITEM,
"URL=../images/jsv/calendar/right1.gif", "Referer=http://192.168.1.242/exam/client/menu.jsp", ENDITEM,
"URL=../images/jsv/calendar/close.gif", "Referer=http://192.168.1.242/exam/client/menu.jsp", ENDITEM,
"URL=../images/client/background.jpg", "Referer=http://192.168.1.242/exam/client/main.jsp", ENDITEM,
LAST);
web_link("正 评",
"Text=正 评",
"Snapshot=t6.inf",
EXTRARES,
"URL=images/client/background.jpg", ENDITEM,
"URL=images/client/dot.gif", ENDITEM,
"URL=images/client/listth.gif", ENDITEM,
LAST);
lr_think_time(1);
lr_rendezvous("mark01Ren");
lr_start_transaction("mark01");
web_submit_data("submitNormalMarkPaper.do",
"Action=http://192.168.1.242/exam/submitNormalMarkPaper.do?isPartlyRefresh=true",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.1.242/exam/findNormalMarkPaper.do",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
"Name=markSpeed", "Value=3", ENDITEM,
"Name=secretCodeHidden", "Value=01033211001G26X", ENDITEM,
"Name=pointScores", "Value=0", ENDITEM,
LAST);
lr_end_transaction("mark01", LR_AUTO);
web_submit_data("submitNormalMarkPaper.do_2",
"Action=http://192.168.1.242/exam/submitNormalMarkPaper.do?isPartlyRefresh=true",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.1.242/exam/findNormalMarkPaper.do",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
"Name=markSpeed", "Value=1", ENDITEM,
"Name=secretCodeHidden", "Value=0103321100127RG", ENDITEM,
"Name=pointScores", "Value=0", ENDITEM,
LAST);
lr_rendezvous("mark02Ren");
lr_start_transaction("mark02");
web_submit_data("submitNormalMarkPaper.do_4",
"Action=http://192.168.1.242/exam/submitNormalMarkPaper.do?isPartlyRefresh=true",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.1.242/exam/findNormalMarkPaper.do",
"Snapshot=t10.inf",
"Mode=HTML",
ITEMDATA,
"Name=markSpeed", "Value=1", ENDITEM,
"Name=secretCodeHidden", "Value=0103321100129L7", ENDITEM,
"Name=pointScores", "Value=0", ENDITEM,
LAST);
lr_end_transaction("mark02", LR_AUTO);
return 0;
}
我设置了2个集合点和2个事务,对我的web进行压力测试,但是在测试的时候,lr报错:
action.c(102): Continuing after Error -26612: HTTP Status-Code=500 (Internal Server Error)
for "http://192.168.1.242/exam/submitNormalMarkPaper.do?isPartlyRefresh=true" [MsgId: MERR-26612]
我不知道问题出在哪里,有哪位高人遇到过这个问题,请多多指教,非常感谢!!!
作者:
cgwxyz
时间:
2007-3-29 11:34
执行测试前你调试过脚本吗?这个不是其他什么错误,http返回的状态信息导致出错,应该是服务器处理的时候出错。
作者:
stardust
时间:
2007-3-29 11:35
脚本执行到102行的时候,业务程序抛出异常了。
要贴出异常信息才能看看是什么导致的。
有可能是程序在并发情况下,多线程处理的不好。
作者:
ufoly94
时间:
2007-3-29 11:57
谢谢大家的关心,首先我把我们系统的情况说明一下,我们用到了ajax技术,其中有些局部刷新功能,lr在脚本回放的时候就报了这个错误,还有一点是在提交分数的时候,第一个成绩可以正常提交,而后面的成绩却失败。大家在这方面有没有什么经验可以借鉴,我的脚本录入是否正确?多谢。。。
作者:
stardust
时间:
2007-3-29 13:45
没有做过ajax的。但在网上查到了以前的帖子
http://bbs.51testing.com/thread-35325-1-1.html
希望LZ成功后能把经验公布一下:)
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2