【发布时间】:2017-03-09 10:14:58
【问题描述】:
我需要在 jmeter 中验证 API 架构。 我的 API 响应数据是
[{
"snid": "1",
"subject": "Automation",
"state": null,
"country": null,
"contact_name": "John",
"email": "John@gmail.com",
"phone": "402-221-9999"
}, {
"snid": "2",
"subject": "Testing",
"state": null,
"country": null,
"contact_name": "Smith",
"email": "jmstauch@leoadaly.com",
"phone": "402-111-2222"
}]
所以我想验证它是否包含响应消息
{
"snid": "",
"subject": "",
"state": ,
"country": ,
"contact_name": "",
"email": "",
"phone": ""
}
我只需要验证字段的列名和顺序。
我使用了response assertions contains 但它不验证订单,JSON path assertion 验证对象值而不是参数(或验证完整消息),但在我的情况下,我需要验证确切的架构。
请帮忙
【问题讨论】: