1. 添加JSON Assertion

JSON Assertion_数据

 

2.  判断code

JSON Assertion_数据_02

判断davaValue 

JSON Assertion_json_03 

 

# 1. 验证code是否成功

$..code

[0-9]{3}00000


# 2. 验证dataValue
$..result[0].dataValue

# expected value
[0-9]{1,3}

 

 

返回数据

{
    "code": "10800000",
    "result": [
        {
            "id": null,
            "inventoryId": "i1",
            "dataType": 1,
            "dataValue": "5",
            "valueList": [],
            "more": false
        },
        {
            "id": null,
            "inventoryId": "i1",
            "dataType": 2,
            "dataValue": "5.00",
            "valueList": [],
            "more": false
        },
        {
            "id": null,
            "inventoryId": "i1",
            "dataType": 7,
            "dataValue": null,
            "valueList": [
                "v1"
            ],
            "more": true
        }
        
    ]
}