JCatloth
14 years agoNew Contributor
[Resolved] 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?
Note: This is a cross post the community board the other day. I just purchased a pro license and thought I would try here since there were no replies on the other board.
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?
Note: This is a cross post the community board the other day. I just purchased a pro license and thought I would try here since there were no replies on the other board.