如何从 JMeter 检索动态值

问题描述 投票:0回答:1
{"GetFormSessionSurfaceJsonResult": "{\"$type\":\"DecisionsFramework.Design.Form.FormSessionInfo, DecisionsFramework\",\"useCompositeControls\":false,\"documents\":[{\"$type\":\"DecisionsFramework.Design.Form.CssDocumentInfo, DecisionsFramework\",\"documentName\":\" Default Style\",\"modifiedDate\":\"2024-11-18T15:21:51.944124\"},{\"$type\":\"DecisionsFramework.Design.Form.CssDocumentInfo, DecisionsFramework\",\"documentName\":\"DF\",\"modifiedDate\":\"2024-11-17T11:16:33.643953\"},{\"$type\":\"DecisionsFramework.Design.Form.CssDocumentInfo, DecisionsFramework\",\"documentName\":\"HideFolderTimeLineFeatures\",\"modifiedDate\":\"2024-11-19T10:35:00.18753\"}],\"initialControlsData\":[{\"$type\":\"DecisionsFramework.ServiceLayer.Services.ContextData.DataPair, DecisionsFramework\",\"Name\":\"01J6RT969T5RKZDS9BJSQSY520\",\"OutputValue\":[{\"$type\":\"DecisionsFramework.ServiceLayer.Services.ContextData.DataPair, DecisionsFramework\",\"Name\":\"01JFCBQQX04SQ1GGPDNDM5CTRH\",\"OutputValue\":\"I am the owner of a registered vessel or I have authorization to declare a vessel of another owner (attach the authorization in document upload tab)\"},{\"$type\":\"DecisionsFramework.ServiceLayer.Services.ContextData.DataPair, [{\"$type\":\"DecisionsFramework.Design.Form.ComponentData.CompositeControls.RuntimeChildrenProviderChildClientInfo, DecisionsFramework\",\"Id\":\"01JFCBQR03NPF4KQF4CY0TVCB2\",\"ClientData\":[{\"$type\":\"DecisionsFramework.ServiceLayer.Services.ContextData.DataPair, DecisionsFramework\",\"Name\":\"Postal Codes\",\"OutputValue\":\"\"},viceLayer.Services.ContextData.DataPair, DecisionsFramework\",\"Name\":\"Flat\",\"OutputValue\":\"\"}]}]},

从这个响应中,我需要获取**“Id”:“01JFCBQR03NPF4KQF4CY0TVCB2”**的动态值并传递给另一个请求。

我使用了json和正则表达式提取器,但都没有获取到相应的值。

json路径检索到了全部内容,正则表达式没有检索到值。

用于正则表达式 "Id":"(.*?)"

jmeter performance-testing jmeter-5.0
1个回答
0
投票

使用正则表达式,如下面的快照所示...无论是单斜杠还是额外的正斜杠。

Regexpression

© www.soinside.com 2019 - 2024. All rights reserved.