How to get array item count and then increased total count by +1

abhaysabuabhaysabu Posts: 3

I've a scenario to add item into array using POST call. Now I've to validate whether the item is added into array list or not, so will check array size increased by +1 or not. I will use GET call to get count of array before and after POST call. Any solution? Here JSON Data Bank may not work, even if get a total count, but how to add +1 to increase the count.

Test1 : GET call -> count=3(+1)=4
Test2: POST call -> add item
Test3: Get call - > get count by Occurrence Assertion, 4=Test1 count


  • goofy78270goofy78270 Posts: 127

    just use the Occurrence assertion

    or write the count in xpath
    count(..your path to count fields...)

Sign In or Register to comment.