使用loadrunner8.1关联后,回放和后台都没有报错但是没有执行新增插入语句
loadrunner版本:8.1;操作:点击“添加”》录入数据后》执行“上报”操作。
代码:
web_reg_save_param("ZID",
"LB=input id=\"form:spb_id\" type=\"hidden\" name=\"form:spb_id\" value=\"",
"RB=\"",
"Ord=1",
"Search=All",
LAST);
lr_output_message(lr_eval_string("{ZID}"));//能够成功取到关联的id号码
web_url("dbrw_lcrw_gcqzd_add.jsf",
"URL=http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.20.61:8080/jbpmjsp/jbpmlcdbrw/dbrw_fqlc_frame.jsp?thisywdmid=oab",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
lr_output_message( lr_eval_string("{ZID}"));
lr_start_transaction("发起流程");
web_submit_data("dbrw_lcrw_gcqzd_add.jsf",
"Action=http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd",
"Snapshot=t11.inf",
"Mode=HTML",
ITEMDATA,
"Name=where", "Value=", ENDITEM,
"Name=newwhere", "Value=", ENDITEM,
"Name=sorttype", "Value=", ENDITEM,
"Name=sortfield", "Value=", ENDITEM,
"Name=itemPerPage", "Value=", ENDITEM,
"Name=page", "Value=", ENDITEM,
"Name=userid_", "Value=101", ENDITEM,
"Name=id_", "Value=7061", ENDITEM,
"Name=name_", "Value=gcqzd", ENDITEM,
"Name=form:initAdd", "Value=", ENDITEM,
"Name=form:spb_id", "Value={ZID}", ENDITEM,
"Name=form:fsudt", "Value=2010-11-01 14:36:56", ENDITEM,
"Name=form:fsuid", "Value=101", ENDITEM,
"Name=form:xmmc", "Value=文昌迈号220千伏输变电新建工程>变电站>三通一平工程", ENDITEM,
"Name=form:jldw", "Value=", ENDITEM,
"Name=form:sgdw", "Value=", ENDITEM,
"Name=form:gcxm_id", "Value=128886", ENDITEM,
"Name=initthis", "Value=1", ENDITEM,
"Name=functionform:shangbao", "Value=上报", ENDITEM, //开发分析,有可能是没有触发上报按钮,执行 insert操作?
"Name=form:qzdlx", "Value=1", ENDITEM,
"Name=form:spbmc", "Value=test123", ENDITEM,
"Name=form:forxmmc", "Value=文昌迈号220千伏输变电新建工程>变电站>三通一平工程", ENDITEM,
"Name=form:bgmc", "Value=test", ENDITEM,
"Name=form:bgje", "Value=122", ENDITEM,
"Name=form:ysjl", "Value=dsdssd", ENDITEM,
"Name=form:dx", "Value=dssd", ENDITEM,
"Name=form:wgfg", "Value=sddsds", ENDITEM,
"Name=form:qt", "Value=sdds", ENDITEM,
"Name=form:jsdz", "Value=文昌", ENDITEM,
"Name=sbzl", "Value=", ENDITEM,
"Name=sbmc", "Value=", ENDITEM,
"Name=sbgg", "Value=", ENDITEM,
"Name=sbsl", "Value=", ENDITEM,
"Name=sbdw", "Value=", ENDITEM,
"Name=form", "Value=form", ENDITEM,
LAST);
lr_end_transaction("发起流程", LR_AUTO);
回放和后台都没有报错但是没有执行新增插入语句。开发分析,有可能是没有触发上报按钮,执行 insert操作?请问有什么解决方法吗。 你这个是web_submit_data,不存在是否有触发上报按钮的 开启详细日志,看看具体情况 数据库定义的是不是唯一,不能插入重复记录呢? 对变量参数化一下试试 问题补充,日志:
Starting action Action.
Action.c(5): Registering web_reg_save_param was successful
Action.c(12): Registering web_reg_save_param was successful
Action.c(19): Notify: Transaction "′ò?a·¢?eá÷3ìò3??" started.
Action.c(21): Found resource "http://192.168.20.61:8080/css/display.css" in HTML "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd"
Action.c(21): Found resource "http://192.168.20.61:8080/js/collectionform.js" in HTML "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd"
Action.c(21): Found resource "http://192.168.20.61:8080/js/popcalendar.js" in HTML "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd"
Action.c(21): Found resource "http://192.168.20.61:8080/js/validateNumber.js" in HTML "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd"
Action.c(21): Found resource "http://192.168.20.61:8080/dwr/engine.js" in HTML "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd"
Action.c(21): Found resource "http://192.168.20.61:8080/dwr/util.js" in HTML "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd"
Action.c(21): Found resource "http://192.168.20.61:8080/dwr/interface/savexmjd.js" in HTML "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd"
Action.c(21): Detected non-resource "http://192.168.20.61:8080/attachment.jsp?rowid=171791&tableId=1314" in "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf?id_=7061&name_=gcqzd"
Action.c(21): web_url("dbrw_lcrw_gcqzd_add.jsf") was successful, 196098 body bytes, 1949 header bytes, 312 chunking overhead bytes
Action.c(30): 171791
Action.c(32): 2010-11-03 11:52:19
Action.c(34): Notify: Transaction "′ò?a·¢?eá÷3ìò3??" ended with "Pass" status (Duration: 2.0083 Wasted Time: 0.0018).
Action.c(36): Notify: Transaction "?′DD·¢?e2ù×÷" started.
Action.c(38): Resource "http://192.168.20.61:8080/css/display.css" is in the cache already and will not be downloaded again
Action.c(38): Resource "http://192.168.20.61:8080/js/collectionform.js" is in the cache already and will not be downloaded again
Action.c(38): Resource "http://192.168.20.61:8080/js/popcalendar.js" is in the cache already and will not be downloaded again
Action.c(38): Resource "http://192.168.20.61:8080/js/validateNumber.js" is in the cache already and will not be downloaded again
Action.c(38): Found resource "http://192.168.20.61:8080/dwr/engine.js" in HTML "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf"
Action.c(38): Resource "http://192.168.20.61:8080/dwr/util.js" is in the cache already and will not be downloaded again
Action.c(38): Found resource "http://192.168.20.61:8080/dwr/interface/savexmjd.js" in HTML "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf"
Action.c(38): Detected non-resource "http://192.168.20.61:8080/attachment.jsp?rowid=171791&tableId=1314" in "http://192.168.20.61:8080/jbpmjsp/dbrw/dbrw_lcrw_gcqzd_add.jsf"
Action.c(38): web_submit_data("dbrw_lcrw_gcqzd_add.jsf") was successful, 83745 body bytes, 846 header bytes, 208 chunking overhead bytes
Action.c(84): Notify: Transaction "?′DD·¢?e2ù×÷" ended with "Pass" status (Duration: 0.3682).
Ending action Action.
有的地方有乱码,是起的事物名称(中文)所以贴出来显示的是乱码 "Name=name_", "Value=gcqzd", ENDITEM,
改下name的值试试
页:
[1]