Hi Deepak,

On Wed, Aug 4, 2010 at 10:50 PM, Deepak Shetty <[email protected]> wrote:

>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_PostProcessor(note<http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_PostProcessor%28note>
> the The following BeanShell variables are set up for use by the
> script: ) and read about the objects at
> http://jakarta.apache.org/jmeter/api/index.html
>
>
After giving it a thought, I've decided that I should parse the response
data using a BeanShell PostProcessor.
I am adding a BeanShell PostProcessor to a HTTP Sampler (does a POST;
receives an XML response).

I am not too familiar with Java, so to start off, I wrote the following
snippet to understand if I am doing it right. I expect the HTTP response
header to be printed in jmeter.log, but I don't see it. I am doing something
wrong here or have I missed doing something completely?


import org.apache.jmeter.protocol.http.samplers.SampleResult;
SampleResult sr = new SampleResult();
String str = sr.getResponseHeadersAsString();
log.info(str);

Reply via email to