简体   繁体   English

如何使用jmeter的json路径提取器从json响应中获取内部变量

[英]How to get a intern variable from json response using jmeter's json path extractor

I have a problem, I get this json response from jmeter and I want to move tt_cid to param and then move it to another request. 我有一个问题,我从jmeter收到了这个json响应,我想将tt_cid移至param,然后将其移至另一个请求。 I know how to get CID that is stand alone for example, but not hot to get the internal data after the '&'. 例如,我知道如何获取独立的CID,但不喜欢在'&'之后获取内部数据。 (i want to get tt_cid param from the json this is under Nurl field (我想从Nurl字段下的json获取tt_cid参数 在此处输入图片说明

I use json path extractor 我使用json路径提取器 在此处输入图片说明

You need to add JSON Extractor with similar expression to save the full nurl value in nurl variable name. 您需要添加具有类似表达式的JSON Extractor ,以将完整的 nurl值保存在nurl变量名称中。

After it (post processor on same request) add Regular Expression Extractor , check radio button of JMeter Variable and put nurl variable name. 之后(按相同请求对后处理器进行处理),添加Regular Expression Extractor ,选中JMeter Variable单选按钮,并放置nurl变量名称。 inside use tt_cid=(\\w+) to get the inner value: 内部使用tt_cid=(\\w+)获取内部值:

Reference Name: tt_cid

Regular Expression: tt_cid=(\w+)

Template $1$

Match No. 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Jmeter 中的 JSON JMESpasth Extractor 从 JSON 响应中提取所有 id? - How to extract all id's from a JSON response using JSON JMESPasth Extractor in Jmeter? 使用Jmeter中的“Json Path Extractor”从JSON响应中提取多个值 - Pulling multiple values from JSON response using 'Json Path Extractor ' in Jmeter 如何在 JMeter 中使用 JSON 提取器提取 JSON 响应中的嵌套元素 - How to extract nested elements in JSON response using JSON extractor in JMeter jmeter json提取器变量 - jmeter json extractor variable 使用正则表达式提取器从jmeter响应中提取json - Extracting json from jmeter response using regular expression extractor 如何使用正则表达式提取器在jmeter中提取json响应数据? - how to extract json response data in jmeter using regular expression extractor? 如何使用 Json Extractor 从 Jmeter 中嵌套的 Json 中提取数据 - How to extract data from nested Json in Jmeter using Json Extractor Jmeter json路径提取器 - 如何删除字符串 - Jmeter json path extractor - How to Remove String Jmeter json路径提取器 - 如何从提取的值中删除[] - Jmeter json path extractor - How to Remove [ ] from extracted value 使用Jmeter JSON路径提取器验证JSON响应正文时发现错误 - Error found while validating JSON response body using Jmeter JSON path extractor
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM