Forum Discussion
nmrao
Champion Level 3
Here is the script assertion for the Delete request step.
/** * let us assume that there is a custom level test case property defined * EXPECTED_HTTP_STATUS_CODE, with value "HTTP/1.1 204 No Content" */ def actualHttpStatusCode = messageExchange.responseHeaders['#status#'][0] def expectedHttpStatusCode = context.testCase.getPropertyValue('EXPECTED_HTTP_STATUS_CODE') assert expectedHttpStatusCode == actualHttpStatusCode, "HTTP status code is not matching"
ilovechiku
9 years agoContributor
I want to assert that row is deleted in DB. Not based on Status. Status is good
- nmrao9 years agoChampion Level 3Close this question if you are ok, open a new question.
- ilovechiku9 years agoContributor
I have opened a new topic but I dont think I got any answers for this one regarding the assertions of a reponse with request values. Since reponse is empty.
- nmrao9 years agoChampion Level 3Which is untrue.
I put 3 questions in the first reply, and you wanted to assert on Http Status code.
And Script Assertion is given to which does exactly what you requested. Did you try it ?
Related Content
- 8 years agorvteja1990
- 9 months agoswagcoder
- 8 years agomgroen2
Recent Discussions
- 4 days agogroovyguy