Forum Discussion

kkiran11's avatar
kkiran11
New Contributor
14 years ago

Get the response and request number of bytes

Hi,
I want to get the Number of bytes send and the number of bytes received for the request and response.

I want to do it throught groovy script.
I get the Response time:
testRequest.response.getTimeTaken()


but how will i get the bytes received and send using the groovy script.

Thanks,
Kiran K

1 Reply

  • If the number of bytes in the Response is contained within the Header then the Groovy script:
    def value = testRunner.testCase.testSteps["Request"].testRequest.response.responseHeaders["Content-Length"]
    should get you the number of bytes received for the Response.