In a groovy step i get these 3 values from the Database.which i have parameterized to get top 1 values from DB. All these three fields are coming from table called roles. On deletion a row is deleted from role.
How can i do a assertion that the row is actually deleted.
Yes I would like to -. Do you want to assert on the delete request i.e., based on response code?
Also would like to know if this is possible in PRO version
Can you use property transfer for assertions as well? I want to assert on a delete testcase. the delete reponse is empty. However,on successful deletion the row is deleted from the table. I have captured the primary key of the deleted row in a scripted Groovy step (star step )above the testcase. How can i transfer this property (primary key of row that was deleted) to reponse?
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.
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#']
def expectedHttpStatusCode = context.testCase.getPropertyValue('EXPECTED_HTTP_STATUS_CODE')
assert expectedHttpStatusCode == actualHttpStatusCode, "HTTP status code is not matching"