Forum Discussion
aaronpliu
Frequent Contributor
Hi richie
Most of time response of POST / PUT / DELETE is empty or just return a [] / {}. But the response status should be 200 if success. So firstly you need to determine if response is good. and then like what you said. Sending a GET request to check if update takes effect or not.
For example, if you delete a record, you may know its ID or name, then you needs to check if it really deleted in GET.
Adding "Valid HTTP Status Code" in assertion alongwith code=200, 202.
If have response, then simply check it thru script assertion if need
def response = messageExchange.response?.contentAsString if(response != null){ // example assert response.size() > 0, "No any content returned in Response" }
Regards,
/Aaron
Related Content
- 3 years ago
- 8 years ago
Recent Discussions
- 22 days ago