You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by 黄吉浩 <13...@163.com> on 2014/07/07 16:19:06 UTC

send response to output in beanshell sampler

hi, all
I've write a beanshell sampler to successfully send request to the server by using some APIs offered by some jar packages.
I've also got the response for every request. The response is a string and I want to collect and save them to a file.
Now I'm using "log.info(response)" to save the response to the jmeter.log file and then use text editor to extract the response data out.
Is there a better way? i.e. directly write the output to a file when running multiple threads?
btw, is the following statement unavailable in beanshell sample?
static {
  some statements;
}

Re: send response to output in beanshell sampler

Posted by sebb <se...@gmail.com>.
On 7 July 2014 15:19, 黄吉浩 <13...@163.com> wrote:
> hi, all
> I've write a beanshell sampler to successfully send request to the server by using some APIs offered by some jar packages.
> I've also got the response for every request. The response is a string and I want to collect and save them to a file.
> Now I'm using "log.info(response)" to save the response to the jmeter.log file and then use text editor to extract the response data out.


> Is there a better way? i.e. directly write the output to a file when running multiple threads?

Please read

http://jmeter.apache.org/usermanual/component_reference.html#BeanShell_Sampler

for ways to set the sample result.

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