You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by bobMeliev <b....@gmail.com> on 2013/10/01 16:03:18 UTC

Re: How to extract "Body size in bytes" from the http sampler result.

Add  View Results Tree
<"http://releasematic.wordpress.com/2013/09/30/howto-debug-jmeter-scripts/'>  
in the end of your test and it will show.  



--
View this message in context: http://jmeter.512774.n5.nabble.com/How-to-extract-Body-size-in-bytes-from-the-http-sampler-result-tp5718259p5718267.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: How to extract "Body size in bytes" from the http sampler result.

Posted by sebb <se...@gmail.com>.
On 1 October 2013 19:49, Flavio Cysne <fl...@gmail.com> wrote:
> Use Beanshell Post-Processor, inside the sample you want its body length,
> with the code below:
>
> response = prev.getResponseDataAsString();
> data_length = new Integer(response.length());
> vars.put("data_length", data_length.toString());

Or just use:

data_length = prev.getBytes();

> Then, you can use ${data_length} variable as desired.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: How to extract "Body size in bytes" from the http sampler result.

Posted by Flavio Cysne <fl...@gmail.com>.
Use Beanshell Post-Processor, inside the sample you want its body length,
with the code below:

response = prev.getResponseDataAsString();
data_length = new Integer(response.length());
vars.put("data_length", data_length.toString());

Then, you can use ${data_length} variable as desired.