LR11中自定义函数web_custom_request请求
Action() { char * ip,temp; int state; double time_elapsed, duration, waste; merc_timer_handle_t timer_check; /* lr_save_datetime("%y-%b-%d-%s",DATE_NOW*(ONE_HOUR),"time"); 保存当天的日期到参数time中 lr_message("the day is:%s",lr_eval_string("{time}")); 输出time的值 */ lr_rendezvous("shenqintixiankaishi");//提现集合点 lr_think_time(10); lr_start_transaction("shenqintixian"); timer_check = lr_start_timer();//此处如果启用lr_start_timer可以计算出文本检查点花费的时 web_custom_request(" aj_sp_message.php_4", "URL=http://ip/lsmvas/account/pretr.action", "Method=POST", "Resource=0", "RecContentType=text/html", "Referer=http://newtest.xiaolin.com/new_sp/lsb_record.php?act=bills", "Snapshot=t12.inf", "Mode=HTML", "EncType=", //Body是请求的内容,可以咨询开发 "Body=accountNum={accountNum}&bankName=银行名称&bankAccountName=用户名&bankAccountNumber=212332131231&bankArea=BJBJ&bnName=提现出账&bnNumber={bnNumber}", LAST); //accountNum ,bnNumber 参数化 更真实模拟业务,符合数据库范式要求 lr_log_message("******************AccountNum is:%s",lr_eval_string("{accountNum}")); //print AccountNum lr_log_message("******************BnNumber is:%s",lr_eval_string("{bnNumber}")); //print BnNumber time_elapsed = lr_end_timer(timer_check); waste = time_elapsed * 1000; lr_wasted_time(waste); lr_end_transaction("shenqintixian", LR_AUTO); return 0; }
http://www.51testing.com/html/71/410671-810897.html
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。