Contributions
How to add assertion when the REST API response returns more than one record as response
ReadyAPI 1.7.0 I have a response which generates 10 records and i want to loop and verify all the 10 records with assertion. I had a Datasource > Request > Datasource loop mapped correctly. This is an example response and i get more than 1 response like this. <e>-</e> is 1 record and i get more than one record like this. <Response> <e> <active>true</active> <isCategory>false</isCategory> <isSpecial>false</isSpecial> <parentId>1036</parentId> <productid>1022</productid> </e> In Request Assertion i have "$[0].productid" and expected result${DataSrc_PrdFilter#products_productid} ISSUE : the first record get executed successfully because the index starts at 0 and the next record which is 1 is not changed there. Error: Comparison failed$[0].productid": expected value 1008(incorrect, this is the value of index 0) actual value 1022(correct) My Question: what should i specify in place of zero (0) so that it automatically increments and matches the expected vs actual.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions912Views0likes1Comment