如何从jmeter中的验证链接接收到的以下json响应中提取Id和令牌

问题描述

{ “ auth_token”:“ e5b09da9-d521-3252-842d-de8acbad8687”, “ user_id”:“ 5b4852a4-0594-4db9-823f-904a9f1d2438”, “ verify_link”:“ https://域名/ verify?id = zN4XjaPttq0BfYPuYmpSvA ==&token = 2d5d87dbc62121c9f1b45a79281777ea6b78461c” }

解决方法

最简单的方法是使用Boundary Extractor,您要做的就是提供“左”和“右”边界,提取器会将两者之间的所有内容保存到JMeter Variable中:

  1. ID:

    enter image description here

  2. 令牌:

    enter image description here

更多信息:The Boundary Extractor vs. the Regular Expression Extractor in JMeter