下面是我的JSON響應數據,我需要使用下面的響應進行斷言。我嘗試了很多方法來編寫JSON路徑&預期值。總是斷言失敗。我想要的是請大家幫忙寫了下面的數據Jmeter JSON路徑聲明
{
"statusCode": 200,
"statusMessage": "Success",
"errorMessage": "",
"responseData": {
"id": 15,
"userName": "[email protected]",
"firstName": "tarento",
"lastName": "test1",
"phoneNumber": "1234567812",
"email": "[email protected]",
"password": "",
"city": "",
"agentList": [
{
"id": 37,
"userName": "[email protected]",
"firstName": "Sanjay",
"lastName": "rahul",
"phoneNumber": "7411269480",
"email": "[email protected]",
"password": "",
"active": true
},
{
"id": 68,
"userName": "[email protected]",
"firstName": "jinesh",
"lastName": "sumedhan",
"phoneNumber": "9400993826",
"email": "[email protected]",
"password": "",
"active": true
},
{
"id": 108,
"userName": "[email protected]",
"firstName": "Rahul",
"lastName": "Antony",
"phoneNumber": "9994590241",
"email": "[email protected]",
"password": "",
"active": true
},
{
"id": 304,
"userName": "[email protected]",
"firstName": "Agent",
"lastName": "Agent",
"phoneNumber": "9025699716",
"email": "[email protected]",
"password": "",
"active": true
}
],
"roleName": "admin",
"sessionKey": "435tnerLt9813942160478oDse46345635#1",
"partner": {
"id": 1,
"name": "Tarento",
"cityList": [
"bangalore",
"mumbai"
],
"phone": "1234567812",
"url": ""
},
"isActive": true,
"isDeleted": false,
"roleId": 1,
"countryCode": "",
"tags": [
{
"tagId": 1,
"name": "all",
"description": "this is default tag of all driver."
},
{
"tagId": 2,
"name": "airport",
"description": ""
},
{
"tagId": 3,
"name": "street",
"description": "any text message"
},
{
"tagId": 255,
"name": "night",
"description": "night"
}
]
}
}
我收到以下響應
提供像什麼是你寫的JSON路徑更多的細節?你的例子中的期望值是多少? – hemanth
請檢查下面的圖片,我的測試計劃及其回答 – Sreenivas
您是否嘗試刪除方括號? – olyv