对脚本进行参数化后,如何能验证是否参数化成功
参数化代码如下:web_submit_data("login.pl",
"Action=http://localhost:1080/WebTours/login.pl",
"Method=POST",
"TargetFrame=info",
"RecContentType=text/html",
"Referer=http://localhost:1080/WebTours/login.pl?username=&password=&getInfo=true",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=passwordConfirm", "Value={passwordConfirm}", ENDITEM,
"Name=firstName", "Value={firstName}", ENDITEM,
"Name=lastName", "Value={lastName}", ENDITEM,
"Name=address1", "Value={address1}", ENDITEM,
"Name=address2", "Value={address2}", ENDITEM,
"Name=register.x", "Value=53", ENDITEM,
"Name=register.y", "Value=5", ENDITEM,
LAST);
如何知道参数化已经成功
你让脚本跑一遍,会有结果报告的,成功失败都会显示出来 replay -> runtime-settings->log->extended log->parameter subsitution lr_output_message({parameter});打印出来看看 最实在。 Lyncent 发表于 2016-1-13 10:30
lr_output_message({parameter});打印出来看看 最实在。
刚接触lr,这个是lr控制台的输出语句吗?可以打印任何类型吗? 详见官方,打印的是字符串类型,字符串类型,使用 lr_eval_string先做转换,lr_output_message( "We are on iteration #%s", lr_eval_string( "{iteration}" ) );
Lyncent 发表于 2016-1-14 09:57
详见官方,打印的是字符串类型,字符串类型,使用 lr_eval_string先做转换,lr_output_message( "We are on ...
tks Lyncent 发表于 2016-1-14 09:57
详见官方,打印的是字符串类型,字符串类型,使用 lr_eval_string先做转换,lr_output_message( "We are on ...
thank you
页:
[1]