Assertion multiple objects for the same value
Hi, Sometimes I get about 70 objects in my response. I want assert different values and it takes a lot of time to do it for all if I have to do it separately.
I'm looking for a faster way to assert but I can't find the option in ReadyAPI. Maybe with a (groovy) script it's possible but I am not familiar with scripting.
Assertion for count "Employee":
-Count for value "Employee". If I choose assertion for count I can assert count for "role" and not for "Employee".
Expected result for count "Employee" must be 3.
Example response:
[
{
"id" : "00123456789",
"name" : "Mike",
"role" : "Employee",
"city" : "New York"
},
{
"id" : "00123456711",
"name" : "Jack",
"role" : "Employee",
"city" : "Arizona"
},
{
"id" : "00123456799",
"name" : "Bruce",
"role" : "Employee",
"city" : "Houston"
},
{
"id" : "00123456766",
"name" : "wilma",
"role" : "Owner",
"city" : "Texas"
}
]