【问题标题】:Extracting value from jmeter response data从 jmeter 响应数据中提取值
【发布时间】:2016-09-08 12:00:34
【问题描述】:

我正在尝试从响应数据中提取特定值

以下是响应数据:

{"results": [{"Withdrawn": false,"WorkflowID": 1169,"Subject": "@@@Legal Hold Testing@@@ Tue, 30 Aug 2016","DueDate": new Date(1472083200000),"SCUserID": 29625,"AdminEmail": "puventhira-mannen-pragasam.selladurai@hpe.com?subject=Ask%20a%20Question%20-%20@@@Legal%20Hold%20Testing@@@%20Tue,%2030%20Aug%202016","CC": false,"TypeIconURL": "/resources/images/icon_notification.gif","eventLink": "https://c9w24074.itcs.hpecorp.net/lfserver?DFS__Action=RouteGetForm&DFS__DataSource=1&DFS__TargetWindow=45361a9d438b352de521f444_476622041&DFS__EventID=45361a9d438b352de521f444_476622041&**DFS__SessionID=2x7635cd045f99c79z156c847a5eezx4094guxbpsxohxgoh**","EventID": "45361a9d438b352de521f444_476622041","WorkflowType": "Notice"}

我要DFS__SessionID=[value]

我怎样才能做到这一点?

【问题讨论】:

    标签: jmeter load-testing


    【解决方案1】:

    你应该使用Regular Expression Extractor

    这是 DFS__SessionID=[value] 的正则表达式

    DFS__SessionID=(\w*)
    

    你可以测试这个表达式here

    【讨论】:

      【解决方案2】:

      使用图片中提到的常规exp,并使用变量${sessionid}获取动态值

      Regular exp

      【讨论】:

        猜你喜欢
        • 2023-03-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-08-10
        • 1970-01-01
        相关资源
        最近更新 更多