请问哪位性能测试高手,帮忙看下以下这个脚本要怎么修改?谢谢!附错误提示
CP_08(){
lr_think_time(14);
web_url("getInputHTMLPro_13",
"URL=http://192.168.1.30:8080/ReadPlatformClient_Test/getInputHTMLPro?packName=ReadPlatformClient_Product&cls=ejbModule.businessshellmanage.productBookRelation.ProductBookRelationForIssuedMgr&methodName=getContentIdsByMonthProductId&desc=%25E6%258F%258F%25E8%25BF%25B0:%2520%25E6%25A0%25B9%25E6%258D%25AE%25E5%258C%2585%25E6%259C%2588%25E4%25BA%25A7%25E5%2593%2581%25E8%258E%25B7%25E5%258F%2596%25E5%2586%2585%25E5%25AE%25B9ID%25E5%25BA%258F%25E5%2588%2597¶mTypes=Long|Integer|Integer|String&"
"paramDescs=%25E5%258C%2585%25E6%259C%2588%25E4%25BA%25A7%25E5%2593%2581ID%257C%25E8%25B5%25B7%25E5%25A7%258B%25E8%25AE%25B0%25E5%25BD%2595%257C%25E8%25AE%25B0%25E5%25BD%2595%25E6%2595%25B0%257C%25E5%258F%2591%25E5%25B8%2583%25E6%25B8%25A0%25E9%2581%2593&defaults=1000003139816|1|6|1",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.30:8080/ReadPlatformClient_Test/",
"Snapshot=t28.inf",
"Mode=HTML",
LAST);
web_reg_find("Text=pass","SaveCount=Count1",LAST);
web_reg_find("Text=value","SaveCount=Count2",LAST);
lr_start_transaction("CP_08_根据包月产品获取内容ID序列");
lr_think_time(8);
web_submit_form("testIF_7",
"Snapshot=t29.inf",
ITEMDATA,
"Name=P00", "Value=1000003139816", ENDITEM,
"Name=P01", "Value=1", ENDITEM,
"Name=P02", "Value=6", ENDITEM,
"Name=P03", "Value=1", ENDITEM,
LAST);
if(atoi(lr_eval_string("{Count1}")) >=1)
{
if(atoi(lr_eval_string("{Count2}")) >=1)
{
lr_end_transaction("CP_08_根据包月产品获取内容ID序列",LR_PASS);
}
}
else if(atoi(lr_eval_string("{Count1}")) <=0)
{
if(atoi(lr_eval_string("{Count2}")) <=0)
{
lr_error_message("接口异常!!");
lr_end_transaction("CP_08_根据包月产品获取内容ID序列",LR_FAIL);
}
}
return 0;
}
提示错误:
Error: Vuser started transaction "CP_08_根据包月产品获取内容ID序列", but did not reached a corresponding end transaction statement. The transaction ended automatically with status 'fail'. .....
这段代码有问题。
lr_start_transaction和lr_end_transaction是成对出现的。 另外,如果要校验功能,则不需要使用lr来处理。
你可以尝试将这两个不同的逻辑设计不同的脚本和参数数据来做。
页:
[1]