Get request and response size in groovy
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2010
12:08 AM
05-27-2010
12:08 AM
Get request and response size in groovy
Hi,
I would like to get the response size and the request size in groovy (assertion!).
I have searched trough forum and trough internet, but i only see max size mentioned.
I would like to just get the size of the reponse and the request (plus or minus the http headers if possible) size.
Kind regards.
I would like to get the response size and the request size in groovy (assertion!).
I have searched trough forum and trough internet, but i only see max size mentioned.
I would like to just get the size of the reponse and the request (plus or minus the http headers if possible) size.
Kind regards.
4 REPLIES 4
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2010
11:55 AM
05-28-2010
11:55 AM
In the Script assertion you can use the messageExchange object to get the content without the headers:
[tt:jh5o3b8v]messageExchange.requestContent.size()
messageExchange.responseContent.size()[/tt:jh5o3b8v]
[tt:jh5o3b8v]messageExchange.requestContent.size()
messageExchange.responseContent.size()[/tt:jh5o3b8v]
"Ignorance more frequently begets confidence than does knowledge"
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2010
10:08 PM
06-01-2010
10:08 PM
Thanks!
Is there alsoa way to get the size with http headers?
Is there alsoa way to get the size with http headers?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2010
07:31 AM
06-22-2010
07:31 AM
Hi,
you can get request and response size in number of bytes with
messageExchange.rawRequestData.length
messageExchange.rawResponseData.length
Hope this helps
Nebojsa
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
you can get request and response size in number of bytes with
messageExchange.rawRequestData.length
messageExchange.rawResponseData.length
Hope this helps
Nebojsa
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2018
11:45 PM
07-10-2018
11:45 PM
What if we want the size in Groovy not in script assertion
Size of request and not response.
Size of Response we can get through this statement
testRunner.testCase.testSteps[Step].testRequest.response.responseSize
How about size of request without using messageExhchange ?
