如何从jmeter中的请求输入xml中提取值 [英] How to extract the values from request input xml in jmeter
问题描述
我想提取refid1
和refid2
标记的值,形成Http request
中的输入xml. refID1
和refid2
值是在运行时使用随机数函数生成的.
请在下面附件中找到该问题的屏幕截图:
I wanted to extract the value of refid1
and refid2
tags form the input xml in Http request
. refID1
and refid2
values are generated at runtime using random number function .
please find below attached screenshot for the problem :
提前谢谢!
推荐答案
由于您正在生成数据,因此我想您有权访问XML请求数据.
Since you're generating the data, I suppose you have access to the XML request data.
So in this case, you can make those 2 fields variables extracted from CSV using CSV Data Set config.
如果您使用JMeter __Random 函数生成它们,那么您可以使用以下语法:
If you're generating them using JMeter __Random function, then you can use this syntax:
$ {__ Random(0,10,MYVAR)}
${__Random(0,10, MYVAR)}
然后使用 $ {MYVAR}
这篇关于如何从jmeter中的请求输入xml中提取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!