本文介绍了Jmeter中的URL编码变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在 Jmeter
中编码一个变量,但它不是一个参数.例如:
I need to encode a variable in Jmeter
, but it isn't a parameter. For example:
网址路径:/folder/guest/id;token=${token}/profile?details=yes
我想对 ${token}
变量进行编码,并且只对令牌变量进行编码.我知道您可以在参数部分选择 encode
,但这不是参数.
I want to encode the ${token}
variable, and only the token variable. I know that you can select encode
in the parameters section, but this isn't a parameter.
有人知道怎么做吗?
推荐答案
JMeter 从 2.10 版开始包含一个 urlencode 函数.
JMeter as of version 2.10 now includes a urlencode function.
${__urlencode(${token})}
见http://jmeter.apache.org/usermanual/functions.html
这篇关于Jmeter中的URL编码变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!