我在jmeter测试套件中使用xpath断言,但在接收到的响应中却遇到了处理动态内容的问题。有什么方法可以使用我在xpath断言中定义的jmeter变量吗?我已经尝试过了,但是没有用。

/response/body/locationReports/locationReport[@deviceHandle = ${deviceHandle}]

最佳答案

刚刚发现它可以通过在变量名周围添加单引号来实现

/response/body/locationReports/locationReport[@deviceHandle = '${deviceHandle}']

07-27 21:01