jmeter的json提取器提取多个变量
时间: 2023-10-21 08:23:45 浏览: 196
JMETER 后置处理器之正则表达式提取器(三)
在JMeter中使用JSON提取器一次性提取多个变量的方法是,将多个变量的名称和JSON路径表达式以分号分隔的方式填写在JSON提取器的"Names of created variables"和"JSON Path"参数中。例如,假设我们需要从响应数据中提取两个变量,分别为"var1"和"var2",对应的JSON路径表达式分别为"$.data.var1"和"$.data.var2",那么在JSON提取器的配置中,我们可以将"Names of created variables"参数设置为"var1;var2",将"JSON Path"参数设置为"$.data.var1;$.data.var2"。这样,JMeter会将匹配到的值存储到对应的变量中,我们可以在后续的请求中引用这些变量。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Jmeter之json提取器](https://blog.csdn.net/you_you0329/article/details/116016677)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [jmeter基础之json提取器如何提取多个参数值](https://blog.csdn.net/qq_42484209/article/details/110878150)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文