首先通过web_reg_save_param_regexp函数,该函数使用需要安装4个补丁,至少要一个小时,同时,不一定能搞的定 那么通过web_reg_save_param_ex获取productId同时该productId对应的剩余金额要大于3000元 首先通过正则提取如下: web_reg_save_param_ex("ParamName=productid","LB=productId\":","RB/RE=leftAmount\"...
lr_save_string(lr_decrypt("5c3c9ad6232a1458"), "PasswordParameter"); lr_think_time(6); //断言登录后的字符串 web_reg_find("Text=Using the menu to the left", LAST ); web_submit_data("login.pl", "Action=http://127.0.0.1:1080/cgi-bin/login.pl", "Method=POST", "TargetFrame=body...
Loadrunner通过web_reg_save_param_ex和sscanf函数搞定边界是动态变化的案例 案例如下: 想获取如下数据中的productId {"data":{"data":[ {"productId":8106765,"borrowerName":null,"productName":"消费贷D20180828-a287","productAmount":28600.00,"raisedAmount":0,"repayMode":5,"repayModeEnum":"MONTHLY_...
Action.c(19): web_reg_save_param_regexp started [MsgId: MMSG-26355] Action.c(19): Registering web_reg_save_param_regexp was successful [MsgId: MMSG-26390] Action.c(29): web_reg_save_param_regexp started [MsgId: MMSG-26355] Action.c(29): Registering web_reg_save_param_regexp wa...
3. lr_save_string() 将字符串保存为一个参数。 lr_save_string("http://www.51testing.com", "website"); 注:参数和变量最大的区别:参数必须在大括号+双引号内使用,变量若加引号则成了字符串。 4.web_url() 模拟用户请求,实现HTTP请求中的GET方法。
关联名称是在web_reg_save_param_regexp函数中定义的。 例如,我们需要从服务器响应中提取出一个名为"username"的参数值,它的正则表达式为"username=(.*?)&"。配置如下: web_reg_save_param_regexp("ParamName=username", "RegExp=username=(.*?)&", "Ordinal=1", "NotFound=WARNING", "Search=Body",...
web_reg_save_param_ex函数是web_reg_save_param函数的增强版本,它可以在提取参数值的同时,对该值进行一些处理,如URL解码、转义字符处理等。该函数还可以指定提取的值的类型,如字符串、数字、日期等,并可以选择将提取的值保存到指定的文件中。 4. web_reg_save_param_regexp函数 web_reg_save_param_regexp函...
web_reg_save_param_regexp( "ParamName=csrfmiddlewaretoken", "RegExp=name=\"csrfmiddlewaretoken\"\\value=\"(.*?)\">\\\n\\ \\ \\ \\ \\ \\ \\ \\ ", SEARCH_FILTERS, "Scope=Body", "IgnoreRedirections=No", "RequestUrl=*/127.0.0.1:8000/*", ...
lr_save_string() 将一个字符串保存为一个参数 代码语言:javascript 代码运行次数:0 运行 AI代码解释 lr_save_string("https://www.baidu.com","website"); lr_free_parameter() 参数的值释放掉 web_reg_save_param_ex() 关联 web_reg_save_param_regexp ...
一. 关联一:登录接口依赖注册接口请求参数中的mobile web_reg_save_param_regexp的使用 {randomPhone}的属性设置 源码:先请求注册接口,注册接口请求成功后,再去请求登录接口,登录和注册的手机号一致 二. 关联二:充值密码接口需要登录接口的返回值token作为