You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Felix Frank <ff...@mpexnet.de> on 2012/01/03 09:39:22 UTC

Re: Create custom log files

Hi,

On 12/27/2011 02:33 AM, Flavio Cysne wrote:
> Listeners are disabled during non-GUI test. They only make a difference in
> GUI mode when they are able export data to files (graphics or text).

as far as I know, the "-l file.jtl" implies a SimpleDataWriter Listener,
which will probably honor the defaults for Listeners, hence sebb's
reference.

Cheers,
Felix

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


Re: Create custom log files

Posted by apc <ap...@apc.kg>.
Well, I support your point, but for now JMeter has no ignoring feature and
the only way for us is
http://jmeter.apache.org/usermanual/test_plan.html#scoping_rules using
scoping rules (or custom listeners, but I now none with filtering abilities,
even in jp@gc).

-----
--
Andrey Pohilko
JP@GC Maintainer
--
View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5122647.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: Create custom log files

Posted by sebb <se...@gmail.com>.
On 10 January 2012 12:52, waseemfa <fa...@gmail.com> wrote:
> Sebb,
>
> My thread group had the first sampler as BSF sampler where i initialize the
> variable and then have two HTTP Request sampler followed by a Result
> sampler.  I use the filename as "${test}.jtl" but it creates a jtl file as
> ${test}.jtl
>
> Not sure where the problem is.

"The variable has to be defined at the start of the test"
That was ambiguous, it means:

At the start of the test, the variable already needs to be set.

So use a Test Plan variable or Property.

> This is how my BSF sampler code looks like
>
> ${__setProperty(test,"C:\test\Result")};

That sets the property too late.

> OUT.println("Value is " + ${__property(test)});
>
> vars.put("test",${__property(test)});
>
>
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5134008.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
>

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


Re: Create custom log files

Posted by waseemfa <fa...@gmail.com>.
Sebb,

My thread group had the first sampler as BSF sampler where i initialize the
variable and then have two HTTP Request sampler followed by a Result
sampler.  I use the filename as "${test}.jtl" but it creates a jtl file as
${test}.jtl

Not sure where the problem is.

This is how my BSF sampler code looks like

${__setProperty(test,"C:\test\Result")};

OUT.println("Value is " + ${__property(test)});

vars.put("test",${__property(test)});



--
View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5134008.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: Create custom log files

Posted by sebb <se...@gmail.com>.
On 10 January 2012 09:52, waseemfa <fa...@gmail.com> wrote:
> Oh Sorry for the confusion.. I am referring to JMeter's native listeners.
>
> The problem seems to be that in the filename text box of the listener it
> doesn't appear to accept a variable name.  Just wanted to know if there is a
> way to achieving it.

It does accept a variable name, but the variable has to be defined at
the start of the test otherwise it is too late.

> -Waseem
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5133760.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
>

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


Re: Create custom log files

Posted by waseemfa <fa...@gmail.com>.
Oh Sorry for the confusion.. I am referring to JMeter's native listeners.  

The problem seems to be that in the filename text box of the listener it
doesn't appear to accept a variable name.  Just wanted to know if there is a
way to achieving it.

-Waseem

--
View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5133760.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: Create custom log files

Posted by apc <ap...@apc.kg>.
Do you ask of FFW behavior or JMeter's native listeners?

FFW will process variables in file name only when test starts, for first
sample. Then it will use this single file to write data.



-----
--
Andrey Pohilko
JP@GC Maintainer
--
View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5133758.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: Create custom log files

Posted by waseemfa <fa...@gmail.com>.
Is there a way we can specify a filename using a variable or a user defined
property?

--
View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5133696.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: Create custom log files

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
I usually find it much easier to post process the result file to remove
whatever I dont want. Its fairly easy to do this for both XML and CSV

regards
deepak

On Thu, Jan 5, 2012 at 4:41 AM, waseemfa <fa...@gmail.com> wrote:

> Sebb,
>
> Thats one way of approaching the problem and its really a great way of
> doing
> it.. But when the number of samplers increase this means the overhead
> increases.  So having a global listener and ignoring few of the samplers
> should be a better way.  Just not sure if this could be achieved.
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5122509.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: Create custom log files

Posted by waseemfa <fa...@gmail.com>.
Sebb,

Thats one way of approaching the problem and its really a great way of doing
it.. But when the number of samplers increase this means the overhead
increases.  So having a global listener and ignoring few of the samplers
should be a better way.  Just not sure if this could be achieved.

--
View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5122509.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: Create custom log files

Posted by sebb <se...@gmail.com>.
On 5 January 2012 11:35, waseemfa <fa...@gmail.com> wrote:
> Based on the methods given in
>
> http://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html
>
> Is there a way where we can ignore to log the output of a particular sampler
> and log for only those samplers that we actually want

Listeners only log samples from samplers that are in scope.

For example, add a Listener as a child of a sampler and it will only
log samples for that sampler.

>
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5122428.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
>

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


Re: Create custom log files

Posted by waseemfa <fa...@gmail.com>.
Based on the methods given in 

http://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html

Is there a way where we can ignore to log the output of a particular sampler
and log for only those samplers that we actually want



--
View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5122428.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: Create custom log files

Posted by Felix Frank <ff...@mpexnet.de>.
On 01/05/2012 12:28 PM, sebb wrote:
>> If you need additional info about each of your Samples, that won't be
>> > easy (if at all possible).
> http://jmeter.apache.org/usermanual/listeners.html#sample_variables

Fascinating! Thanks.

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


Re: Create custom log files

Posted by sebb <se...@gmail.com>.
On 5 January 2012 08:18, Felix Frank <ff...@mpexnet.de> wrote:
> Hi,
>
> On 01/05/2012 07:53 AM, waseemfa wrote:
>> Thanks a lot for all your replies guys!! really appreciated
>>
>> Just wanted to know one more thing.  Is there a way where we can add our own
>> data into the Sample data writer by creating a new configuration element?
>
> Define "your own data".
>
> If you need additional info about each of your Samples, that won't be
> easy (if at all possible).

http://jmeter.apache.org/usermanual/listeners.html#sample_variables

> If you want additional custom sample data, that might be possible by
> adding BeanShellSamplers or similar to your Test Plan.
>
> HTH,
> Felix
>
> ---------------------------------------------------------------------
> 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: Create custom log files

Posted by Felix Frank <ff...@mpexnet.de>.
Hi,

On 01/05/2012 07:53 AM, waseemfa wrote:
> Thanks a lot for all your replies guys!! really appreciated
> 
> Just wanted to know one more thing.  Is there a way where we can add our own
> data into the Sample data writer by creating a new configuration element?

Define "your own data".

If you need additional info about each of your Samples, that won't be
easy (if at all possible).

If you want additional custom sample data, that might be possible by
adding BeanShellSamplers or similar to your Test Plan.

HTH,
Felix

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


Re: Create custom log files

Posted by waseemfa <fa...@gmail.com>.
Thanks a lot for all your replies guys!! really appreciated

Just wanted to know one more thing.  Is there a way where we can add our own
data into the Sample data writer by creating a new configuration element?



--
View this message in context: http://jmeter.512774.n5.nabble.com/Create-custom-log-files-tp5067691p5121942.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