You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Tai Tran <hu...@gmail.com> on 2012/08/02 20:30:58 UTC

Write responses to file in custom format using Java listener?

Can I write a listener in pure Java language to process responses from
JMeter to write into file(s) in my own format? I see JMeter supports JSR223
Listener with various languages options (including java), but there is
detailed no doc on that.

Please help, thanks in advance.

Thanks,
Tai

Re: Write responses to file in custom format using Java listener?

Posted by Shmuel Krakower <sh...@gmail.com>.
You may also use this listener:
http://code.google.com/p/jmeter-plugins/wiki/FlexibleFileWriter

Shmuel.

On Mon, Aug 6, 2012 at 12:09 PM, Dzmitry_Kashlach <dzmitrykashlach@gmail.com
> wrote:

>  If you need special Listener, you can develop your own JMeter Plugin,
> using
> manual from attachment.
> http://jmeter.512774.n5.nabble.com/file/n5714219/jmeter_tutorial.pdf
> jmeter_tutorial.pdf
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Write-responses-to-file-in-custom-format-using-Java-listener-tp5714183p5714219.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: Write responses to file in custom format using Java listener?

Posted by Dzmitry_Kashlach <dz...@gmail.com>.
 If you need special Listener, you can develop your own JMeter Plugin, using
manual from attachment.
http://jmeter.512774.n5.nabble.com/file/n5714219/jmeter_tutorial.pdf
jmeter_tutorial.pdf 



--
View this message in context: http://jmeter.512774.n5.nabble.com/Write-responses-to-file-in-custom-format-using-Java-listener-tp5714183p5714219.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: Write responses to file in custom format using Java listener?

Posted by Tai Tran <hu...@gmail.com>.
thx thx

On Fri, Aug 3, 2012 at 5:25 AM, sebb <se...@gmail.com> wrote:

> On 2 August 2012 21:21, Tai Tran <hu...@gmail.com> wrote:
> > I'm not feeling secure writing scripting language (no type safe, no
> > checking whatsoever).
>
> The test elements allow quick and relatively simple implementations to
> be created.
>
> > Can I write a traditional java class with main()
> > which is the entry point where JMeter passes in the response data for me
> to
> > process in the way I like? In other words, I don't know how JMeter gives
> > the input to my Java listener class?
>
> The data is passed in via the SampleListener interface.
>
> Best to study the source to see how existing Listeners work.
>
> > On Fri, Aug 3, 2012 at 2:08 AM, sebb <se...@gmail.com> wrote:
> >
> >> On 2 August 2012 19:30, Tai Tran <hu...@gmail.com> wrote:
> >> > Can I write a listener in pure Java language to process responses from
> >> > JMeter to write into file(s) in my own format?
> >>
> >> Yes.
> >>
> >> > I see JMeter supports JSR223
> >> > Listener with various languages options (including java), but there is
> >> > detailed no doc on that.
> >>
> >> The variables that are made available to the script are shown on the
> >> GUI screen and are documented under the BSF Listener.
> >>
> >> > Please help, thanks in advance.
> >> >
> >> > Thanks,
> >> > Tai
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> >> For additional commands, e-mail: user-help@jmeter.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Write responses to file in custom format using Java listener?

Posted by sebb <se...@gmail.com>.
On 2 August 2012 21:21, Tai Tran <hu...@gmail.com> wrote:
> I'm not feeling secure writing scripting language (no type safe, no
> checking whatsoever).

The test elements allow quick and relatively simple implementations to
be created.

> Can I write a traditional java class with main()
> which is the entry point where JMeter passes in the response data for me to
> process in the way I like? In other words, I don't know how JMeter gives
> the input to my Java listener class?

The data is passed in via the SampleListener interface.

Best to study the source to see how existing Listeners work.

> On Fri, Aug 3, 2012 at 2:08 AM, sebb <se...@gmail.com> wrote:
>
>> On 2 August 2012 19:30, Tai Tran <hu...@gmail.com> wrote:
>> > Can I write a listener in pure Java language to process responses from
>> > JMeter to write into file(s) in my own format?
>>
>> Yes.
>>
>> > I see JMeter supports JSR223
>> > Listener with various languages options (including java), but there is
>> > detailed no doc on that.
>>
>> The variables that are made available to the script are shown on the
>> GUI screen and are documented under the BSF Listener.
>>
>> > Please help, thanks in advance.
>> >
>> > Thanks,
>> > Tai
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>>

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


Re: Write responses to file in custom format using Java listener?

Posted by Tai Tran <hu...@gmail.com>.
I'm not feeling secure writing scripting language (no type safe, no
checking whatsoever). Can I write a traditional java class with main()
which is the entry point where JMeter passes in the response data for me to
process in the way I like? In other words, I don't know how JMeter gives
the input to my Java listener class?

On Fri, Aug 3, 2012 at 2:08 AM, sebb <se...@gmail.com> wrote:

> On 2 August 2012 19:30, Tai Tran <hu...@gmail.com> wrote:
> > Can I write a listener in pure Java language to process responses from
> > JMeter to write into file(s) in my own format?
>
> Yes.
>
> > I see JMeter supports JSR223
> > Listener with various languages options (including java), but there is
> > detailed no doc on that.
>
> The variables that are made available to the script are shown on the
> GUI screen and are documented under the BSF Listener.
>
> > Please help, thanks in advance.
> >
> > Thanks,
> > Tai
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Write responses to file in custom format using Java listener?

Posted by sebb <se...@gmail.com>.
On 2 August 2012 19:30, Tai Tran <hu...@gmail.com> wrote:
> Can I write a listener in pure Java language to process responses from
> JMeter to write into file(s) in my own format?

Yes.

> I see JMeter supports JSR223
> Listener with various languages options (including java), but there is
> detailed no doc on that.

The variables that are made available to the script are shown on the
GUI screen and are documented under the BSF Listener.

> Please help, thanks in advance.
>
> Thanks,
> Tai

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