Rest assured with Testng - Error coming in delete request

Viewed 37

enter image description here

"contacts": [ "Expected a list of items but got type "int"."

enter image description here

enter image description here

1 Answers

From the error it looks like the expected PUT body needs to be an array say {"contacts":[12,123]}. What you are giving is {"contacts":12} There are 2 options:

  1. Put the integer in an array. ie. request.put("contacts",[contact])
  2. since your delete request already handles multiple ids, why use dataprovider, simply send the array in one go in contacts.
Related