由于我是jmeter的webservice的新手,我不明白如何在这方面取得进展,我有一个像下面的json响应,我怎样才能为下面的断言......
{
"flightDetails": [
{
"outBoundFlights": [
{
"flightInfo": {
"departureCity": "Bengaluru, , IN - Kempegowda International Airport",
"departureDateAndTime": "2017-04-24T17:00:00",
"arrivalCity": "Newark, NJ, US - Newark Liberty Intl Arpt",
"arrivalDateAndTime": "2017-04-25T07:55:00",
"numberOfStops": 1,
"individualPricing": [
{
"passengerType": 1,
"totalTaxFeePerPaxType": 626.55,
"totalTaxAmountPerPaxType": 461.55,
"baseFareAmountPerPaxType": 165.0,
"taxandFee": {
"markup": 6.6,
"merchantFee": 40.99,
"supplierTax": 410.96
答案 0 :(得分:1)
答案 1 :(得分:0)
您可以通过JSON Path Assertion项目使用JMeter Plugins,例如:
departureCity
是否等于"Bengaluru, , IN - Kempegowda International Airport
按如下方式配置:
如果一切顺利,结果将会成功
如果预期值与实际值不匹配,则采样器将被标记为失败: