Forum Discussion
Let us deal with first question, can you post the raw response?
Do you have license for PRO or just evaluating?
raw response looks like this are you sure you asked for reponse or raw request. Becuase the reponse is empty.
I have a trial version of readyAPI 1.6.0
HTTP/1.1 204 No Content
Content-Length: 0
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET
Date: Tue, 08 Mar 2016 18:07:05 GMT
- nmrao9 years agoChampion Level 3I have requested you for raw response.
- nmrao9 years agoChampion Level 3And 204 the expected code?
- ilovechiku9 years agoContributor
Yes 204 is reponse with no content which satisfies buisness case.
in a groovy step before the testcase i have captured the primarykeyid of the row that got deleted by the teststep like below
testRunner.testCase.setPropertyValue("RrdId",getDeleteResourceRoleDefinitionIdFromDB(db)) . However this is in a Groovy Step(star step). I need this property become available in the assertion of the testcase.
- nmrao9 years agoChampion 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"
- ilovechiku9 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.
Related Content
- 8 years agorvteja1990
- 9 months agoswagcoder
- 8 years agomgroen2