14 years ago
test step script result in script assertion
I have a test step script like so:
def etag = testRunner.testCase.getTestStepByName("getLatest").testRequest.response.responseHeaders['ETag'].get(0)
etag.toInteger()+1
In a subsequent test step I'd like to assert that a response header matches the above result. testRunner isn't available in script assertions as far as I can tell. Is it possible to reference the output of a test step from within a script assertion? Or is there another approach?
def etag = testRunner.testCase.getTestStepByName("getLatest").testRequest.response.responseHeaders['ETag'].get(0)
etag.toInteger()+1
In a subsequent test step I'd like to assert that a response header matches the above result. testRunner isn't available in script assertions as far as I can tell. Is it possible to reference the output of a test step from within a script assertion? Or is there another approach?