首页 > 代码库 > loadrunner 打印变量

loadrunner 打印变量

打印userid变量参数的信息

 web_submit_form("ValidateLoginAction.do_2",
  "Snapshot=t2.inf",
  ITEMDATA,
  "Name=userid", "Value=http://www.mamicode.com/{userid}", ENDITEM,
  "Name=pword", "Value=http://www.mamicode.com/{password}", ENDITEM,
  "Name=programid", "Value=http://www.mamicode.com/{programid}", ENDITEM,
  "Name=varid", "Value=http://www.mamicode.com/{varid}", ENDITEM,
  EXTRARES,
  "URL=common/js/mmenudom.js", "Referer=http://192.168.0.104/b2r/merchandise/MerchandiseHome.do", ENDITEM,
  LAST);

添加如下代码:

 lr_log_message("userid:%s",lr_eval_string("{userid}"));

loadrunner 打印变量