How to correlate debug error data with JMeter logs?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

How to correlate debug error data with JMeter logs?

Sonam Chauhan
Hi JMeter users-
 
I want to capture the exact sampler request and response data when a failure
occurs, and correlate it with JMeter log entries. Can I have your feedback
on this?
 
Here is what I do:
1. In the uppermost test plan element, tick 'Functional Test Mode'
2. In the bottom outer level, insert an 'Assertion Listener'.
At this position, it can "listen" to all samplers.
3. Set these 'Assertion Listener' properties:
a. Write all data to a logfile
b. Tick 'Log Errors Only' (to reduce the logging overhead)
 
After the test runs, I get two logfiles:
a. JMeter logfile (-l parameter)
This logfile contains the usual brief log entries for all samplers that ran.

b. 'Assertion Listener' logfile (Specified in
This contains entries similar to the JMeter log, but only for assertion
failures, and with extra tags (e.g.: <binary>) that carry sampler request
and response data.
 
A few questions:
* How can I correlate the 'Assertion Listener' failure data with the
JMeter log entries?
If common GUIDs were assigned to logentries, this would be easy, but there
aren't
 
* Can the 'Assertion Listener' logfile be set to not only store debug
error data, but also store brief entries for all requests?
This would put all the required data in one file - there would be no need to
correlate with the JMeter logfile.
 
* Can this be done better another way?
 
Sincerely,
Sonam Chauhan
--
Electronic Commerce, Corporate Express Australia Ltd.
Phone: +61-2-9335-0725, Email: [hidden email]
<mailto:[hidden email]>
 
Reply | Threaded
Open this post in threaded view
|

Re: How to correlate debug error data with JMeter logs?

sebb-2-2
Have you tried using the same filename for both logs?

S.
On 5/26/05, Sonam Chauhan <[hidden email]> wrote:

> Hi JMeter users-
>
> I want to capture the exact sampler request and response data when a failure
> occurs, and correlate it with JMeter log entries. Can I have your feedback
> on this?
>
> Here is what I do:
> 1.      In the uppermost test plan element, tick 'Functional Test Mode'
> 2.      In the bottom outer level, insert an 'Assertion Listener'.
> At this position, it can "listen" to all samplers.
> 3.      Set these 'Assertion Listener' properties:
> a.      Write all data to a logfile
> b.      Tick 'Log Errors Only' (to reduce the logging overhead)
>
> After the test runs, I get two logfiles:
> a.      JMeter logfile (-l parameter)
> This logfile contains the usual brief log entries for all samplers that ran.
>
> b.      'Assertion Listener' logfile (Specified in
> This contains entries similar to the JMeter log, but only for assertion
> failures, and with extra tags (e.g.: <binary>) that carry sampler request
> and response data.
>
> A few questions:
> *       How can I correlate the 'Assertion Listener' failure data with the
> JMeter log entries?
> If common GUIDs were assigned to logentries, this would be easy, but there
> aren't
>
> *       Can the 'Assertion Listener' logfile be set to not only store debug
> error data, but also store brief entries for all requests?
> This would put all the required data in one file - there would be no need to
> correlate with the JMeter logfile.
>
> *       Can this be done better another way?
>
> Sincerely,
> Sonam Chauhan
> --
> Electronic Commerce, Corporate Express Australia Ltd.
> Phone: +61-2-9335-0725, Email: [hidden email]
> <mailto:[hidden email]>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: How to correlate debug error data with JMeter logs?

Sonam Chauhan
In reply to this post by Sonam Chauhan
> Have you tried using the same filename for both logs?

Thank you Seb. I tried that and it logs failures twice in the JMeter log.

Actually, let me correct a faulty assumption I made - I expected the
assertion listener (setup as I described) to be the only thing logging
request/response data. But in functional test mode, the regular JMeter log
records request/response data for *all* requests - whether succeeded or
failed. So there is no advantage to having a separate assertion listener
logfile.

Can we restrict "functional test logging" to failed requests only? i.e. The
test runs at full speed with the default logging, and only logs the detailed
request/response data for sampler that fail. Is this possible?

Regards,
Sonam Chauhan
--
Electronic Commerce, Corporate Express Australia Ltd.
Phone: +61-2-9335-0725, Email: [hidden email]
 

> -----Original Message-----
> From: sebb [mailto:[hidden email]]
> Sent: Saturday, 28 May 2005 6:10 PM
> To: JMeter Users List
> Subject: Re: How to correlate debug error data with JMeter logs?
>
> Have you tried using the same filename for both logs?
>
> S.
> On 5/26/05, Sonam Chauhan <[hidden email]> wrote:
> > Hi JMeter users-
> >
> > I want to capture the exact sampler request and response data when a
> failure
> > occurs, and correlate it with JMeter log entries. Can I have your
> feedback
> > on this?
> >
> > Here is what I do:
> > 1.      In the uppermost test plan element, tick 'Functional Test Mode'
> > 2.      In the bottom outer level, insert an 'Assertion Listener'.
> > At this position, it can "listen" to all samplers.
> > 3.      Set these 'Assertion Listener' properties:
> > a.      Write all data to a logfile
> > b.      Tick 'Log Errors Only' (to reduce the logging overhead)
> >
> > After the test runs, I get two logfiles:
> > a.      JMeter logfile (-l parameter)
> > This logfile contains the usual brief log entries for all samplers that
> ran.
> >
> > b.      'Assertion Listener' logfile (Specified in
> > This contains entries similar to the JMeter log, but only for assertion
> > failures, and with extra tags (e.g.: <binary>) that carry sampler
> request
> > and response data.
> >
> > A few questions:
> > *       How can I correlate the 'Assertion Listener' failure data with
> the
> > JMeter log entries?
> > If common GUIDs were assigned to logentries, this would be easy, but
> there
> > aren't
> >
> > *       Can the 'Assertion Listener' logfile be set to not only store
> debug
> > error data, but also store brief entries for all requests?
> > This would put all the required data in one file - there would be no
> need to
> > correlate with the JMeter logfile.
> >
> > *       Can this be done better another way?
> >
> > Sincerely,
> > Sonam Chauhan
> > --
> > Electronic Commerce, Corporate Express Australia Ltd.
> > Phone: +61-2-9335-0725, Email: [hidden email]
> > <mailto:[hidden email]>
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to correlate debug error data with JMeter logs?

sebb-2-2
On 5/30/05, Sonam Chauhan <[hidden email]> wrote:

> > Have you tried using the same filename for both logs?
>
> Thank you Seb. I tried that and it logs failures twice in the JMeter log.
>
> Actually, let me correct a faulty assumption I made - I expected the
> assertion listener (setup as I described) to be the only thing logging
> request/response data. But in functional test mode, the regular JMeter log
> records request/response data for *all* requests - whether succeeded or
> failed. So there is no advantage to having a separate assertion listener
> logfile.
>
> Can we restrict "functional test logging" to failed requests only? i.e. The
> test runs at full speed with the default logging, and only logs the detailed
> request/response data for sampler that fail. Is this possible?

I added this property to CVS HEAD recently:

jmeter.save.saveservice.response_data.on_error

I think that does what you want.

S.

> Regards,
> Sonam Chauhan
> --
> Electronic Commerce, Corporate Express Australia Ltd.
> Phone: +61-2-9335-0725, Email: [hidden email]
>
>
> > -----Original Message-----
> > From: sebb [mailto:[hidden email]]
> > Sent: Saturday, 28 May 2005 6:10 PM
> > To: JMeter Users List
> > Subject: Re: How to correlate debug error data with JMeter logs?
> >
> > Have you tried using the same filename for both logs?
> >
> > S.
> > On 5/26/05, Sonam Chauhan <[hidden email]> wrote:
> > > Hi JMeter users-
> > >
> > > I want to capture the exact sampler request and response data when a
> > failure
> > > occurs, and correlate it with JMeter log entries. Can I have your
> > feedback
> > > on this?
> > >
> > > Here is what I do:
> > > 1.      In the uppermost test plan element, tick 'Functional Test Mode'
> > > 2.      In the bottom outer level, insert an 'Assertion Listener'.
> > > At this position, it can "listen" to all samplers.
> > > 3.      Set these 'Assertion Listener' properties:
> > > a.      Write all data to a logfile
> > > b.      Tick 'Log Errors Only' (to reduce the logging overhead)
> > >
> > > After the test runs, I get two logfiles:
> > > a.      JMeter logfile (-l parameter)
> > > This logfile contains the usual brief log entries for all samplers that
> > ran.
> > >
> > > b.      'Assertion Listener' logfile (Specified in
> > > This contains entries similar to the JMeter log, but only for assertion
> > > failures, and with extra tags (e.g.: <binary>) that carry sampler
> > request
> > > and response data.
> > >
> > > A few questions:
> > > *       How can I correlate the 'Assertion Listener' failure data with
> > the
> > > JMeter log entries?
> > > If common GUIDs were assigned to logentries, this would be easy, but
> > there
> > > aren't
> > >
> > > *       Can the 'Assertion Listener' logfile be set to not only store
> > debug
> > > error data, but also store brief entries for all requests?
> > > This would put all the required data in one file - there would be no
> > need to
> > > correlate with the JMeter logfile.
> > >
> > > *       Can this be done better another way?
> > >
> > > Sincerely,
> > > Sonam Chauhan
> > > --
> > > Electronic Commerce, Corporate Express Australia Ltd.
> > > Phone: +61-2-9335-0725, Email: [hidden email]
> > > <mailto:[hidden email]>
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: How to correlate debug error data with JMeter logs?

Sonam Chauhan
In reply to this post by Sonam Chauhan
> I added this property to CVS HEAD recently:
>
> jmeter.save.saveservice.response_data.on_error
>
> I think that does what you want.
>
> S.

w00t!

Thanks Seb, I'll check it out.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: How to correlate debug error data with JMeter logs?

Sonam Chauhan
In reply to this post by Sonam Chauhan
> > I added this property to CVS HEAD recently:
> >
> > jmeter.save.saveservice.response_data.on_error
> >
> > I think that does what you want.
> >
> > S.

Seb: I just checked out the 20050528 nightly build. I had some comments and
questions below (comparing to the venerable JMeter 1.9.1):

1. In the new build, if I set a logfile with the '-l' parameter, it is
only created if the test runs in non-GUI mode (i.e. with the '-n' parameter
as well). The same behavior exists in 1.9 too. Is this by design?

2. Is there a DTD or schema for the XML log format? (The attribute
names are a lot more brief compared to 1.9.)

3. Ticking 'Functional mode' in the test plan no longer saves response
data in the JMeter log. To do that, I had to explicitly set the property you
mentioned:
        -Jjmeter.save.saveservice.response_data.on_error=true

4. The corresponding *request* data is not stored.
In 1.9, 'functional test mode' stores the request URL (though it would be
better to store the entire HTTP request data)

Storing request data is especially needed if the request is derived from an
earlier response. It would be good to have a property like:
        jmeter.save.saveservice.request_data.on_error

Thanks again,
Sonam Chauhan
--
Electronic Commerce, Corporate Express Australia Ltd.
Phone: +61-2-9335-0725, Email: [hidden email]
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to correlate debug error data with JMeter logs?

sebb-2-2
On 5/30/05, Sonam Chauhan <[hidden email]> wrote:

> > > I added this property to CVS HEAD recently:
> > >
> > > jmeter.save.saveservice.response_data.on_error
> > >
> > > I think that does what you want.
> > >
> > > S.
>
> Seb: I just checked out the 20050528 nightly build. I had some comments and
> questions below (comparing to the venerable JMeter 1.9.1):
>
> 1.      In the new build, if I set a logfile with the '-l' parameter, it is
> only created if the test runs in non-GUI mode (i.e. with the '-n' parameter
> as well). The same behavior exists in 1.9 too. Is this by design?

I don't know for sure. The -l parameter is certainly intended for use
with non-GUI runs, but it may make sense to allow it for GUI runs too.
It's not essential, as one can always add a simple data writer to the
GUI...
 
> 2.      Is there a DTD or schema for the XML log format? (The attribute
> names are a lot more brief compared to 1.9.)

No DTD that I know of.

But you can revert to the previous format using one or more of the
file_format properties - see jmeter.properties.

> 3.      Ticking 'Functional mode' in the test plan no longer saves response
> data in the JMeter log. To do that, I had to explicitly set the property you
> mentioned:
>         -Jjmeter.save.saveservice.response_data.on_error=true

Oh. That is supposed to work. Was that a non-GUI run?

Also, this should work:
             -Jjmeter.save.saveservice.response_data=true

> 4. The corresponding *request* data is not stored.
> In 1.9, 'functional test mode' stores the request URL (though it would be
> better to store the entire HTTP request data)
>
> Storing request data is especially needed if the request is derived from an
> earlier response. It would be good to have a property like:
>         jmeter.save.saveservice.request_data.on_error

Seems a good idea.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: How to correlate debug error data with JMeter logs?

Sonam Chauhan
In reply to this post by Sonam Chauhan
Thanks a lot Seb.

You asked:
> > 3.      Ticking 'Functional mode' in the test plan no longer saves
> > response data in the JMeter log. To do that, I had to explicitly
> > set the property you mentioned:
> >         -Jjmeter.save.saveservice.response_data.on_error=true
>
> Oh. That is supposed to work. Was that a non-GUI run?

Yes, just double checked - it was a non-GUI run (-n parameter present) and
the functional test mode is ticked in the testplan.

As discussed earlier, no entries are written to the logfile during a GUI run
- it will be simpler for the -l parameter behave the same in both modes.

You said:
> > Storing request data is especially needed if the request is derived from
> > an earlier response. It would be good to have a property like:
> >         jmeter.save.saveservice.request_data.on_error
>
> Seems a good idea.

Let me know if I should put in a feature/bug requests for this and the other
things mentioned.

Regards,
Sonam Chauhan
--
Electronic Commerce, Corporate Express Australia Ltd.
Phone: +61-2-9335-0725, Email: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to correlate debug error data with JMeter logs?

sebb-2-2
On 5/31/05, Sonam Chauhan <[hidden email]> wrote:

> Thanks a lot Seb.
>
> You asked:
> > > 3.      Ticking 'Functional mode' in the test plan no longer saves
> > > response data in the JMeter log. To do that, I had to explicitly
> > > set the property you mentioned:
> > >         -Jjmeter.save.saveservice.response_data.on_error=true
> >
> > Oh. That is supposed to work. Was that a non-GUI run?
>
> Yes, just double checked - it was a non-GUI run (-n parameter present) and
> the functional test mode is ticked in the testplan.

I've found the problem with functional mode in non-GUI and fixed that.
Also fixed it so that SamplerData is saved in functional mode, as was
done in 2.0.x.
 
> As discussed earlier, no entries are written to the logfile during a GUI run
> - it will be simpler for the -l parameter behave the same in both modes.

Sorry, could not work out how to do that for the GUI case.
I tried copying what is done in non-GUI mode, but depending when I
added the ResultCollector to the tree it either caused an NPE or  had
no effect.

> You said:
> > > Storing request data is especially needed if the request is derived from
> > > an earlier response. It would be good to have a property like:
> > >         jmeter.save.saveservice.request_data.on_error
> >
> > Seems a good idea.
>

I decided that one might as well save the sampler data anyway for
failed samples if the Response Data is already being saved, so I did
not create an extra property.

So functional and error-only mode both now save the sample and result data.

Should you wish to try these out, the latest nightly has the fixes.

> Let me know if I should put in a feature/bug requests for this and the other
> things mentioned.

If you want -l to work in GUI mode, please create a feature request.

S.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]