You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by praveen <pk...@gmail.com> on 2004/12/11 16:24:10 UTC

dumping response on regex failure

hello everyone

i was wondering whether something like this was used by others on this
group. normally saving responses to a file seems to be unnecessary..
but under certain conditions where a regex fails,  i would like the
entire response to be dumped somewhere... even to jmeter log for that
matter.

is there is a sneaky way to do this? i have tried using another regex
that tries to greedily match the entire response.. but this seems not
work. maybe i am doing something wrong. any suggestions?

thanks
-- 
                                     k.p.

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


Re: dumping response on regex failure

Posted by sebb <se...@gmail.com>.
On Tue, 28 Dec 2004 22:55:17 -0600, praveen <pk...@gmail.com> wrote:
> hello sebb,
> 
> i am kind of stuck here. the "save responses to file" indeed does what
> i need, but the problem is the error condition. i have to create the
> testplan around custom error pages that our applications show: so they
> may not really be HTTP errors but processing errors or likewise.
> (under heavy user load, maybe some component of the target application
> failed).

If the error page contains some unique content (or uses a URL format)
that does not appear elsewhere, then use an Assertion to match the
content or the URL, and set the NOT qualifier. This will cause those
pages to be marked as a failure (which is what they are, after all).

> 
> what i need is something like:
> 
> HTTP Request Element
>       Regex for ${variable}
>       if "${variable}"=="null"
>              Save responses to file element
> 
> I saw that the IF and conditionals do not work beneath HTTP requests.
> Is this as designed? If so, how difficult would it be to make it work
> as above?
> 
> thanks
> 
> On Sun, 12 Dec 2004 19:40:57 +0000, sebb <se...@gmail.com> wrote:
> > The Listeners allow for only errors to be logged to a file; however
> > unless you also select functional test mode, only the summary
> > information will be logged - not including the response itself.
> >
> > However, the Save Responses Post-Processor always saves the entire
> > response, and can be set to save error responses only. So try that and
> > see how you get on.
> >
> > S.
> > On Sat, 11 Dec 2004 09:24:10 -0600, praveen <pk...@gmail.com> wrote:
> > > hello everyone
> > >
> > > i was wondering whether something like this was used by others on this
> > > group. normally saving responses to a file seems to be unnecessary..
> > > but under certain conditions where a regex fails,  i would like the
> > > entire response to be dumped somewhere... even to jmeter log for that
> > > matter.
> > >
> > > is there is a sneaky way to do this? i have tried using another regex
> > > that tries to greedily match the entire response.. but this seems not
> > > work. maybe i am doing something wrong. any suggestions?
> > >
> > > thanks
> > > --
> > >                                      k.p.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
> 
> 
> --
>                                      k.p.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

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


Re: dumping response on regex failure

Posted by praveen <pk...@gmail.com>.
hello sebb,

i am kind of stuck here. the "save responses to file" indeed does what
i need, but the problem is the error condition. i have to create the
testplan around custom error pages that our applications show: so they
may not really be HTTP errors but processing errors or likewise.
(under heavy user load, maybe some component of the target application
failed).

what i need is something like:

HTTP Request Element
      Regex for ${variable}
      if "${variable}"=="null"
             Save responses to file element

I saw that the IF and conditionals do not work beneath HTTP requests.
Is this as designed? If so, how difficult would it be to make it work
as above?

thanks


On Sun, 12 Dec 2004 19:40:57 +0000, sebb <se...@gmail.com> wrote:
> The Listeners allow for only errors to be logged to a file; however
> unless you also select functional test mode, only the summary
> information will be logged - not including the response itself.
> 
> However, the Save Responses Post-Processor always saves the entire
> response, and can be set to save error responses only. So try that and
> see how you get on.
> 
> S.
> On Sat, 11 Dec 2004 09:24:10 -0600, praveen <pk...@gmail.com> wrote:
> > hello everyone
> >
> > i was wondering whether something like this was used by others on this
> > group. normally saving responses to a file seems to be unnecessary..
> > but under certain conditions where a regex fails,  i would like the
> > entire response to be dumped somewhere... even to jmeter log for that
> > matter.
> >
> > is there is a sneaky way to do this? i have tried using another regex
> > that tries to greedily match the entire response.. but this seems not
> > work. maybe i am doing something wrong. any suggestions?
> >
> > thanks
> > --
> >                                      k.p.
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
> 


-- 
                                     k.p.

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


Re: dumping response on regex failure

Posted by sebb <se...@gmail.com>.
The Listeners allow for only errors to be logged to a file; however
unless you also select functional test mode, only the summary
information will be logged - not including the response itself.

However, the Save Responses Post-Processor always saves the entire
response, and can be set to save error responses only. So try that and
see how you get on.

S.
On Sat, 11 Dec 2004 09:24:10 -0600, praveen <pk...@gmail.com> wrote:
> hello everyone
> 
> i was wondering whether something like this was used by others on this
> group. normally saving responses to a file seems to be unnecessary..
> but under certain conditions where a regex fails,  i would like the
> entire response to be dumped somewhere... even to jmeter log for that
> matter.
> 
> is there is a sneaky way to do this? i have tried using another regex
> that tries to greedily match the entire response.. but this seems not
> work. maybe i am doing something wrong. any suggestions?
> 
> thanks
> --
>                                      k.p.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

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