如何从jmeter中的请求输入xml中提取值 [英] How to extract the values from request input xml in jmeter

查看:835
本文介绍了如何从jmeter中的请求输入xml中提取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提取refid1refid2标记的值,形成Http request中的输入xml. refID1refid2值是在运行时使用随机数函数生成的. 请在下面附件中找到该问题的屏幕截图:

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 :

从Jmeter请求标签快照.

提前谢谢!

推荐答案

由于您正在生成数据,因此我想您有权访问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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆