在vugen中,如何将参数化内容的当前值输出到调试信息中??
在vugen中,如何将参数化内容的当前值输出到调试信息中?? 输出函数。 不是这个?lr_output_message(“Value Captured = %s”, lr_eval_string(“{ParameterName}”)); 原帖由 QM 于 2007-3-26 18:53 发表 http://bbs.51testing.com/images/common/back.gif
不是这个?
lr_output_message(“Value Captured = %s”, lr_eval_string(“{ParameterName}”));
或者如果ParamName被声明过可以用lr_out_message("aaa=%s",lr_eval_string(ParamName)); 学习 还可以在运行时信息里查看:D
参考一下这个例子
char fromPort;char toPort;
lr_think_time(38);
web_reg_save_param("outflig",
"LB=<input type=radio checked name=outFlight value=\"",
"RB=\">",
LAST);
web_reg_save_param("inflig",
"LB=<input type=radio checked name=inFlight value=\"",
"RB=\">",
LAST);//Reg 含义是注册,就是说在先注册一下这个函数软后在其后的内容去查找。
strcpy(fromPort,lr_eval_string ("{fromPort}"));
strcpy(toPort,lr_eval_string ("{toPort}"));
while(strcmp(fromPort,toPort)==0){
strcpy(toPort,lr_eval_string ("{toPort}"));
}
lr_start_transaction("注册机票");
web_submit_data("com.mercurytours.servlet.ReservationServlet",
"Action=http://localhost/servlets/com.mercurytours.servlet.ReservationServlet?procSub=1&pg=1",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost/servlets/com.mercurytours.servlet.ReservationServlet",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=tripType", "Value=roundtrip", ENDITEM,
"Name=passCount", "Value=1", ENDITEM,
"Name=fromPort", "Value={fromPort}", ENDITEM,
"Name=fromMonth", "Value=06", ENDITEM,
"Name=fromDay", "Value=12", ENDITEM,
"Name=toPort", "Value={toPort}", ENDITEM,
"Name=toMonth", "Value=06", ENDITEM,
"Name=toDay", "Value=13", ENDITEM,
"Name=servClass", "Value=First", ENDITEM,
"Name=airline", "Value=No Preference", ENDITEM,
"Name=findFlights.x", "Value=52", ENDITEM,
"Name=findFlights.y", "Value=12", ENDITEM,
LAST); 怎么我运行时每次输出的值一样呢? 回楼上
因为你的是脚本在vugen中回放
如果你不改参数设置
当然是每次都一样 直接开日志。。。
设置Runtime Settings的log选项
将Run-time Settings中的log项设为下图所示:[ 本帖最后由 jumptor 于 2009-3-17 00:30 编辑 ]
页:
[1]