Hi Kuldeep,
I changed the JSON script as the complete JSON format like below:
--------------------------------------------------------------------------------
{
"type": "definitions",
"objectVersion": "2",
"formatVersion": 2,
"objects": [
{
"guideChannelName": "string",
"guideCCID": 1,
"daiEnabled": true,
"c3Enabled": true,
"affiliate": "string, string",
"cDVREnabled": true,
"callSign": "string"
},
{
"guideChannelName": "string",
"guideCCID": 2,
"daiEnabled": true,
"c3Enabled": true,
"affiliate": "string, string",
"cDVREnabled": true,
"callSign": "string"
},
{
"guideChannelName": "string",
"guideCCID": 3,
"daiEnabled": true,
"c3Enabled": true,
"affiliate": "string, string",
"cDVREnabled": true,
"callSign": "string"
},
{
"guideChannelName": "string",
"guideCCID": 5,
"daiEnabled": true,
"c3Enabled": false,
"affiliate": "string, string",
"cDVREnabled": true,
"callSign": "string"
}
]
}
--------------------------------------------------------------------------------
And I changed last c3Enabled value to false.
I added this whole JSON script to "Parse Text as Response step" and in this step I added one "JSON Path filter" and defined like:
JSON Path: $.objects[*].c3Enabled
Save Value to Property: {{c3Enabledvalues}}
Save length to Proerty: {{numberofc3Enabled}}
And if I pushed "Run Filter Button", then I got the value of {{c3Enabledvalues}} as [true,true,true,false].
And in the same step, I added one "Ensure Property Matches Expression assertion" and defined as the screenshot below:(This assertion means if the property {{c3Enabledvalues}} includes "false" then "Generate Error".)
And when I execute this test case in ITR, the results like below:
I think this results may help you.
If you need this test case, please let me know.
Thank you,