请问LR录制脚本后,加入文本检查为何不起作用?
问LR录制脚本后,加入文本检查为何不起作用?总是报Action.c(63): 错误 -27195: “1”失败。找到“处理成功”的 0 处出现(RightOf=“”,LeftOf=“”)
Action.c(63): web_find 最高严重级别为“ERROR”
Action.c(63): 通知: Transaction "发布" ended with "Fail" status (Duration: 30.5417).
脚本如下:
Action()
{
lr_think_time(24);
// 参数 {WCSParam_Diff1} 由 Correlation Studio 创建
web_reg_save_param("WCSParam_Diff1",
"LB= value=\"",
"RB=\"",
"Ord=30",
"RelFrameId=1",
"Search=Body",
"IgnoreRedirections=Yes",
LAST);
web_url("QuotingAction_quoteEdit.jhtml",
"URL=http://103.17.1.111:9080/bbsp/bbsp/qu/QuotingAction_quoteEdit.jhtml?flow_func_id=1240101",
"Resource=0",
"RecContentType=text/html",
"Referer=http://103.17.1.111:9080/bbsp/billplatform/UIAction_logon.jhtml",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"URL=/bbsp/billplatform/images/btn_bg.gif", "Referer=http://103.17.1.111:9080/bbsp/bbsp/qu/QuotingAction_quoteEdit.jhtml?flow_func_id=1240101", ENDITEM,
"URL=/bbsp/billplatform/images/steps_bg.jpg", "Referer=http://103.17.1.111:9080/bbsp/bbsp/qu/QuotingAction_quoteEdit.jhtml?flow_func_id=1240101", ENDITEM,
"URL=/bbsp/billplatform/images/btn_add_bg.gif", "Referer=http://103.17.1.111:9080/bbsp/bbsp/qu/QuotingAction_quoteEdit.jhtml?flow_func_id=1240101", ENDITEM,
LAST);
lr_start_transaction("发布");
lr_think_time(8);
web_submit_data("QuotingAction_promulgateQuote.jhtml",
"Action=http://103.17.1.111:9080/bbsp/bbsp/qu/QuotingAction_promulgateQuote.jhtml",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/html",
"Referer=http://103.17.1.111:9080/bbsp/bbsp/qu/QuotingAction_quoteEdit.jhtml?flow_func_id=1240101",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
"Name=quotingRequest.bizTp", "Value=BC00", ENDITEM,
"Name=quotingRequest.amount", "Value=90", ENDITEM,
"Name=quotingRequest.receiveORSend", "Value=0", ENDITEM,
"Name=quotingRequest.intrstRate", "Value=1.5", ENDITEM,
"Name=quotingRequest.rmdrMtrty", "Value=21", ENDITEM,
"Name=quotingRequest.accptrScp", "Value=鍥芥湁", ENDITEM,
"Name=quotingRequest.drftTp", "Value=DC00", ENDITEM,
"Name=quotingRequest.phneNb", "Value=324535", ENDITEM,
"Name=quotingRequest.qtgTp", "Value=QC00", ENDITEM,
"Name=quotingRequest.role", "Value=RC00", ENDITEM,
"Name=quotingRequest.nm", "Value=鍗庡\xA4\x8F閾惰\xA1\x8C鍖椾含鍒嗚\xA1\x8C浼氳\xAE\xA1閮\\xA8", ENDITEM,
"Name=quotingRequest.acct", "Value=304100042691", ENDITEM,
"Name=quotingRequest.quoteValidate", "Value=21", ENDITEM,
"Name=user.brdcsteeTp", "Value=0", ENDITEM,
"Name=user.acctBankNo", "Value=304100042691", ENDITEM,
"Name=struts.token.name", "Value=struts.token", ENDITEM,
"Name=struts.token", "Value={WCSParam_Diff1}", ENDITEM,
"Name=audiOpin.id", "Value=", ENDITEM,
"Name=arr", "Value=0,304100042691", ENDITEM,
LAST);
web_find("1",
"What=处理成功",
LAST);
lr_end_transaction("发布", LR_AUTO);
return 0;
} 没有返回处理成功的字符而已 可我把校验的文本输入一个错误的,也仍然是这个结果,那表明是不是不起作用呢,我想在场景里面执行的时候反映出校验文本的结果该如何做呢? 中文可能是大问题,你检查个英文试试.
场景里面想看效果一般是通过手工事务解决的,参考手工事务相关文档 原因1:“处理成功”在LoadRunner里面显示的是乱码,你检查点为“处理成功”肯定找不到。应该插入乱码的检查点。
原因2:LoadRunner根本就没有捕获“处理成功”字样;
建议在树形结构里面看有没有这个字段,例如“愬姛”字样。 1.LR默认不启动检查点
2。建议使用web_reg_find
页:
[1]