LoadRunner函数详解之web_reg_save_param_ex
2015-08-11 15:08
1416 查看
定义:将请求的动态数据信息保存到一个参数
函数形式:web_reg_save_param_ex( const char *ParamName, [const char *LB, ][const char *RB,] , ,LAST );
示例1:基本运用示例
示例2:正则表达式的运用示例
函数形式:web_reg_save_param_ex( const char *ParamName, [const char *LB, ][const char *RB,] , ,LAST );
示例1:基本运用示例
int iRetVal = LR_PASS; lr_save_string( "HTTP%2F1%2E1%20301%20Moved%20Permanently%0A%0D" "Content%2DType%3A%20text%2Fhtml%0A%0D" "Date%3A%20Sun%2C%2014%20Feb%202010%2011%3A15%3A34%20GMT%0A%0D" "%0A%0D" "aaLLb%20bLLc%20%2E%2ecRRddRReeRRffLLggsadfsdfsdfRRhhRRiiLLj%20%2d%2DjRRkkLLmmLLnnRRoooRRpppLLqqq%0A%0D", "inParam" ); iRetVal = web_reg_save_param_ex( "ParamName=newParam", "LB/IC=ll", "RB/BIN/RE=RR", "Ordinal=all", "SaveLen=-1", "DFEs=UrlEncoding", SEARCH_FILTERS, "Scope=body", LAST); lr_output_message("Return value = %d (%s).", iRetVal, iRetVal == LR_PASS ? "LR_PASS" : "LR_FAIL" ); web_submit_data("echo.asp_2", "Action=http://localhost/cgi-bin/echo.asp", "Method=POST", "TargetFrame=", "RecContentType=text/html", "Referer=http://localhost/cgi_examples/echo_asp.html", "Snapshot=t4.inf", "Mode=HTML", ITEMDATA, "Name=code", "Value={inParam}", ENDITEM, LAST);
示例2:正则表达式的运用示例
lr_save_string( "LL111 Value1 111RR\r\n" "LL222 Value2 222RR\r\n" "LL333 Value3 333RR\r\n" "LL444 Value4 444RR\r\n", "inParam" ); web_reg_save_param_ex( "paramName=ex_example0", "LB/RE=LL111", "RB/RE=222RR", LAST); web_reg_save_param_ex( "paramName=ex_example1", "LB/RE=LL[0-9]*", // "LL" followed by zero or more symbols in range [0-9] "RB/RE=.RR", // Any symbol followed by "RR" LAST); web_reg_save_param_ex( "paramName=ex_example2", "LB/RE=LL[0-9]+", // "LL" followed by at least one symbol in range [0-9] "RB/RE=.2RR", // Any symbol followed by "2RR" LAST); web_reg_save_param_ex( "paramName=ex_example3", "LB/RE=LL(33)+", // "LL" followed by at least one instance of string "33" "RB/RE=[3a]RR", // Exactly one symbol ('3' or 'a') followed by "RR" LAST); web_reg_save_param_ex( "paramName=ex_example4", // "LL" or "123" folowed by at least one instance // of string containing symbols [4-9] and space "LB/RE=((LL)|(123))[4-9 ]+", // At least one instance of string containing symbols [4-9] // and space followed by "RR" "RB/RE=[4-9 ]+RR", LAST);
相关文章推荐
- iOS-NSURLConnection网络请求,与服务器交互的请求注意点和实现方式
- 转:【拓扑排序详解】+【模板】
- Leetcode#11||Container With Most Water
- 黑马程序员——C语言笔记之printf函数与格式控制符
- HDOJ 4463 Outlets(最小生成树--prime)
- SQL-多实例造成***S故障
- 使用SeasLog打造PHP项目中的高性能日志组件(一)
- HDU-1010 Tempter of the Bone
- Android屏幕适配 一
- ppt转pdf网址
- 【转载】Perl中的引用
- 转载:安装ie driver和chrome driver
- HDOJ2896病毒侵袭【AC自动机】
- iOS通过pickerView自定义简单的时间选择器
- 详解网站WEB日志格式
- libpcap
- 行为类模式-访问者模式(12)
- ARM中位宽和存储器问题
- iOS中多线程原理与runloop介绍
- 第一章谢菲尔德大学的MATLAB遗传算法工具箱(一)