loadrunner测试webservice报错
loadrunner测试webservice,调试、循环执行都没错但是用40个并发或者2个并发,运行6个半小时时,用户开始退出
并报错:
Action.c(6): Error: C interpreter run time error: Action.c (6):Error -- memory violation : Exception ACCESS_VIOLATION received.
脚本如下:
Action()
{
lr_start_transaction("send");
web_service_call( "StepName=submitNLSMSRequest_101",
"SOAPMethod=SearchReqServiceService|SearchReqServicePort|submitNLSMSRequest",
"ResponseParam=response",
"Service=SearchReqServiceService",
"ExpectedResponse=SoapResult",
"Snapshot=t1352771959.inf",
BEGIN_ARGUMENTS,
"inputXML=<?xml version=\"1.0\" encoding=\"UTF-8\"?><sms-smssearch><id>12345678901234567890123456789012</id><mobileno>{UserNo}</mobileno><province>031</province><city>310</city><brandid>1</brandid><nettypeid>7</nettypeid><netid>10</netid><smscontent>{UserContent}</smscontent><time>20090208122209</time><extfield1></extfield1><extfield2></extfield2></sms-smssearch>",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
lr_end_transaction("send", LR_AUTO);
return 0;
}
其中{UserNo}设置为%11d的unique number
{UserContent}设置为file,读取字符串:查话费、交叉活动、hi等 回复 1# ljchu
http://bbs.51testing.com/viewthread.php?tid=185768&highlight=webservice%B1%A8%B4%ED 您看下 这个链接是否能帮助到您! 回复 2# lsekfe
一直有这个现象,
用40个并发压测,几分钟就开始退出
加上1秒思考时间,大概十几分钟会退出
agent负载,也跑不了多久
郁闷ing 修改了脚本,修改UserNo为随机数。加上了一个思考时间。
char *string2;
char *string3;
char *string4;
char *string5;
Action()
{
char string1[] ="";
//1.将3个3位和1个2位的随机数保存在4个变量中
string2 = lr_eval_string("{UserNo}");
string3 = lr_eval_string("{UserNo2}");
string4 = lr_eval_string("{UserNo3}");
string5 = lr_eval_string("{UserNo4}");
//2.拼接4个随机数成为一个11位的随机数
strcat(string1,string2);
strcat(string1,string3);
strcat(string1,string4);
strcat(string1,string5);
//3.保存11位的随机数在一个参数中
lr_save_string(string1, "UserNo5" );
//lr_output_message("the sting is:%s",lr_eval_string("{UserNo4}"));
lr_start_transaction("send");
web_service_call( "StepName=SubmitNLSMSRequest_101",
"SOAPMethod=SearchReqService|SearchReqServiceSoap|SubmitNLSMSRequest",
"ResponseParam=response",
"Service=SearchReqService",
"ExpectedResponse=SoapResult",
"Snapshot=t1353033278.inf",
BEGIN_ARGUMENTS,
"inputXML=<?xml version=\"1.0\" encoding=\"UTF-8\"?><sms-smssearch><id>12345678901234567890123456789012</id><mobileno>{UserNo5}</mobileno><province>031</province><city>310</city><brandid>1</brandid><nettypeid>7</nettypeid><netid>10</netid><smscontent>{UserContent}</smscontent><time>20090208122209</time><extfield1></extfield1><extfield2></extfield2></sms-smssearch>",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
lr_end_transaction("send", LR_AUTO);
lr_think_time(1);
return 0;
}
将controller与agent分开,不幸的是,跑了20分钟,又异常退出了。 Abnormal termination, caused by mdrv process termination. 试一下用runtime setting里 设置为run vuser was a process? 设置为进程跑 一段时间后也报错
页:
[1]