51Testing软件测试论坛
标题:
求助参数化问题
[打印本页]
作者:
0325096
时间:
2013-3-7 14:35
标题:
求助参数化问题
lr_save_string("{NewParam}","buf");
web_custom_request("sqlquery.do_3",
"URL=http://localhost:8080/fluxWmsV3Serv/sqlquery.do?reqvar=query",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTTP",
"EncType=text/xml; charset=GBK",
"Body=<?xml version=\"1.0\" encoding=\"GBK\"?>\r\n"
"<ROOT-INFUT>\r\n"
" <FUNCTIONNAME>getRecord</FUNCTIONNAME>\r\n"
" <ENCODING>GBK</ENCODING>\r\n"
" <OPERATIONNAME />\r\n"
" <USERID>SAI</USERID>\r\n"
" <LOGIN-LANGUAGE>CN</LOGIN-LANGUAGE>\r\n"
" <DBID>DB</DBID>\r\n"
" <SERVLETNAME>sqlquery</SERVLETNAME>\r\n"
" <METHOD-NAME>query</METHOD-NAME>\r\n"
" <BUSINESS-DATA>\r\n"
" <SQL-ITEM />\r\n"
" </BUSINESS-DATA>\r\n"
" <EXTEND>\r\n"
" <SQL>select A from DBC where no='{buf}'</SQL>\r\n"
" <SQL-WHERE />\r\n"
" <RETURN-COLUMN-NAMES />\r\n"
" <PAGEINDEX />\r\n"
" <PAGESIZE />\r\n"
" <SQL2 />\r\n"
" <MAINKEY />\r\n"
" <ORDERBYLIST />\r\n"
" </EXTEND>\r\n"
"</ROOT-INFUT>\r\n"
"\r\n",
LAST);
输出:select A from DBC where no='{NewParam}'
求助怎样才能输入{NewParam} 参数化的值?
作者:
hclovezz1314
时间:
2013-3-7 16:07
atoi (lr_output_message(lr_eval_string("{NewParam}")));
作者:
began2006
时间:
2013-3-15 15:18
lr_output_message("no=%d",atoi(lr_eval_string("{NewParam}")));
作者:
msnshow
时间:
2013-3-17 18:52
要先转为参数才能这样用
作者:
standmyground
时间:
2013-3-21 14:07
我也有一个类似的问题,
memcpy(megaBody, "0000000000200000000000002350016\0<devID>\0<Message>\r\n<Ticket><ticket></Ticket>\r\n<Naming><devNaming></Naming>\r\n</Message>\r\n", totalLength-16);
这里面的参数化总是失败,存进去的还是<devID> <ticket> <devNaming>,而不是实际的参数值,
楼主你解决了吗?教教我。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2