Jmeter中的一些应用备忘
来源:互联网 发布:林若亚 孙志浩 知乎 编辑:程序博客网 时间:2024/05/18 01:35
正则表达式提取器中的模板和匹配数字是什么意思。
匹配数字就是用来选择是哪一次匹配。
模板是用来指定${变量名}时的输出格式的。
从jmeter上摘抄的文字,
Suppose you want to match the following portion of a web-page:name="file.name" value="readme.txt"
and you want to extract both file.name
and readme.txt
.
A suitable reqular expression would be:name="([^"]+)" value="([^"]+)"
This would create 2 groups, which could be used in the JMeter Regular Expression Extractor template as $1$ and $2$.
The JMeter Regex Extractor saves the values of the groups in additional variables.
For example, assume:
- Reference Name: MYREF
- Regex: name="(.+?)" value="(.+?)"
- Template: $1$$2$
The following variables would be set:
- MYREF: file.namereadme.txt
- MYREF_g0: name="file.name" value="readme.txt"
- MYREF_g1: file.name
- MYREF_g2: readme.txt
另外,可以写一些简单的函数对结果进行检查。
JMeter functions are special values that can populate fields of any Sampler or otherelement in a test tree. A function call looks like this:
${__functionName(var1,var2,var3)}
Where "__functionName" matches the name of a function.
Parentheses surround the parameters sent to the function, for example ${__time(YMD)}The actual parameters vary from function to function. Functions that require no parameters can leave off the parentheses, for example ${__threadNum}.
If a function parameter contains a comma, then be sure to escape this with "\", otherwise JMeter will treat it as a parameter delimiter.For example:
${__time(EEE\, d MMM yyyy)}
Variables are referenced as follows:
${VARIABLE}在测试restful api的时候,需要加一个http头信息管理器,其中添加参数,content-type:application/json,这样可以支持发送json格式的内容给服务器。
- Jmeter中的一些应用备忘
- theano中的一些备忘
- Jmeter使用过程中的一些问题记录
- nslog一些官方文档中的知识备忘
- Fileoutputstream应用中的FileNotFoundException问题备忘
- [Jmeter] 关于2.6版本Jmeter使用备忘
- JMeter应用
- matlab中的一些应用
- 一些备忘
- 一些备忘
- webload备忘和一些衡量web应用的性能指标
- wince应用开发的一些小功能(备忘)
- wince应用开发的一些小功能(备忘)
- JMeter在Web Services性能测试中的应用
- jmeter在手机app性能测试中的应用
- Jmeter在性能测试中的应用实践样例
- Oracle中的存储结构的一些基本概念(备忘)
- Freemarker中标签在项目中的一些用法,备忘
- Linq查询 待增加
- xtrabackup源码编译安装
- EJB事务注解之TransactionAttribute
- mysql 生成流水号 存储过程 订单编号
- 跟我做WinForm开发(2)-后台逻辑操作
- Jmeter中的一些应用备忘
- 值得读的文章
- Linux上安装Oracle汉字乱码问题的解决方法
- 转一篇比较详细的vc编译qt的文
- 数据绑定出错的原因
- 编程复习3求函数的第n项
- 3D打印挑战中国工业创新体系:美国制造占3/4
- 女王啊,你用其它女子的ID,在网上挑逗贫僧,贫僧上钩了,这说明什么?
- simple_stroul