Forum Discussion

thjoku's avatar
thjoku
Occasional Contributor
16 years ago

Extract Http return Code

Hello,
I want to extract the http return code of each testcase and save it into a file
From datasink i can only get the parameters of the xml response but not the return code as such. Is there any option to extract http response?

Kind Regards
Jothi kumar.

1 Reply

  • wdowling's avatar
    wdowling
    Occasional Contributor
    It will depend on the context available to you but the 2 groovy paths to it are

    testRunner.testCase.testSteps["VPC - Authorisation"].testRequest.response.getStatusCode()

    and

    messageExchange.responseStatusCode