请问LR参数化问题-LR小白
本帖最后由 sunyluo 于 2017-5-26 11:36 编辑最近开始学习LR,遇到一个参数化问题
录制了一个注册脚本,表单提交如下
web_submit_data("register.php_3",
"Action=http://127.0.0.1/phpwind/register.php?",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1/phpwind/register.php",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=forward", "Value=", ENDITEM,
"Name=step", "Value=2", ENDITEM,
"Name=_hexie", "Value=6914076966f5fcd8", ENDITEM,
"Name=regname", "Value={username}", ENDITEM,
"Name=regpwd", "Value=123456", ENDITEM,
"Name=regpwdrepeat", "Value=123456", ENDITEM,
"Name=regemail", "Value={username}@123.com", ENDITEM,
"Name=apartment", "Value=110101", ENDITEM,
"Name=rgpermit", "Value=1", ENDITEM,
EXTRARES,
"Url=images/register/regarrow.png", "Referer=http://127.0.0.1/phpwind/register.php?step=finish&verify=751d3a62b7199a6b", ENDITEM,
"Url=images/register/regstep.png", "Referer=http://127.0.0.1/phpwind/register.php?step=finish&verify=751d3a62b7199a6b", ENDITEM,
"Url=js/face.swf", "Referer=http://127.0.0.1/phpwind/register.php?step=finish&verify=751d3a62b7199a6b", ENDITEM,
LAST);
要将用户名参数化,参数化要求是:用户名使用随机模式(虚拟用户编码+时间),请问这个参数在此页面怎么设置呢?
看到解决方案了,利用参数
lr_save_string(lr_eval_string("{vuser}{time}"),"username");
参数vuser为场景虚拟用户编号,time为当前系统时间精确到秒 图中的参数化只能固定,实现动态的都要自己写 sunyluo 发表于 2017-5-26 11:56
看到解决方案了,利用参数
lr_save_string(lr_eval_string("{vuser}{time}"),"username");
参数vuser为场 ...
厉害学习了 学习了
页:
[1]