You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Stott, Charlie" <CS...@tnsi.com> on 2013/04/09 08:25:10 UTC

when is a sample not a sample?

Hi,

I am wondering if and how it is possible to exclude the results of a specific sample (or at least disregard it) from the results.

We have a dual stripe system which can be tested in online or offline mode.  To automate the decision we can request a status page, and act on the results.  Not all our test systems have dual stripes, so the request fails.  However, this is a valid situation.

I always want to lookup the status page, but only if it exists and only if it responds a certain way do I want it to affect the test run.

I am finding the situation where it is not available is being recorded as a test failure.

Effectively, I want to perform the request as a pre-processor of another sample, but it seems overkill to write it in java/beanshell/someotherlang code.  Is there anything like a HTTP Request pre-processor, or a flag I can set somewhere that says ignore this sample on error?

Thanks in advance,
Charlie

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


Re: when is a sample not a sample?

Posted by Adrian Speteanu <as...@gmail.com>.
Hi,

Listeners apply to their parent and all samples that are childs from their
parent level down. This is the only way to reduce the scope of a listener:
to add it in a different controller which contains only the samplers you
want to monitor. It is not always possible to do because you still want to
respect a certain sequence of samples sometimes. So when this happens, but
I still want to exclude some of the requests, I add different listeners as
child to every sampler I am interested in.

The only selective conditions available to listeners is success/failure. So
if you fail a request that doesn't meet a condition you can choose to
monitor only those that meet your expectations - but that means increasing
the error rate artificially (which is not a problem, if you only monitor
the successes anyway). Its not elegant, I don't recommend it.

Maybe some plugin does the job, but never searched for it, as I never
needed this scenario to work before.

Cheers,
Adrian S



On Tue, Apr 9, 2013 at 9:25 AM, Stott, Charlie <CS...@tnsi.com> wrote:

> Hi,
>
> I am wondering if and how it is possible to exclude the results of a
> specific sample (or at least disregard it) from the results.
>
> We have a dual stripe system which can be tested in online or offline
> mode.  To automate the decision we can request a status page, and act on
> the results.  Not all our test systems have dual stripes, so the request
> fails.  However, this is a valid situation.
>
> I always want to lookup the status page, but only if it exists and only if
> it responds a certain way do I want it to affect the test run.
>
> I am finding the situation where it is not available is being recorded as
> a test failure.
>
> Effectively, I want to perform the request as a pre-processor of another
> sample, but it seems overkill to write it in java/beanshell/someotherlang
> code.  Is there anything like a HTTP Request pre-processor, or a flag I can
> set somewhere that says ignore this sample on error?
>
> Thanks in advance,
> Charlie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

RE: when is a sample not a sample?

Posted by "Stott, Charlie" <CS...@tnsi.com>.
Thanks , Sebb, that is exactly what I needed.

Charlie


> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Wednesday, 10 April 2013 5:06 AM
> To: JMeter Users List
> Subject: Re: when is a sample not a sample?
> 
> On 9 April 2013 07:25, Stott, Charlie <CS...@tnsi.com> wrote:
> 
> > Hi,
> >
> > I am wondering if and how it is possible to exclude the results of a
> > specific sample (or at least disregard it) from the results.
> >
> > We have a dual stripe system which can be tested in online or offline
> > mode.  To automate the decision we can request a status page, and act
> > on the results.  Not all our test systems have dual stripes, so the
> > request fails.  However, this is a valid situation.
> >
> > I always want to lookup the status page, but only if it exists and
> > only if it responds a certain way do I want it to affect the test run.
> >
> > I am finding the situation where it is not available is being recorded
> > as a test failure.
> >
> > Effectively, I want to perform the request as a pre-processor of
> > another sample, but it seems overkill to write it in
> > java/beanshell/someotherlang code.  Is there anything like a HTTP
> > Request pre-processor, or a flag I can set somewhere that says ignore this
> sample on error?
> >
> 
> You can use the Response Assertion to reset the failure flag.
> That's used (for example) when checking for 404 responses, which by default
> are failures.
> 
> Just use an assertion test that's bound to succeed.
> 
> 
> > Thanks in advance,
> > Charlie
> >
> > ---------------------------------------------------------------------
> > 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: when is a sample not a sample?

Posted by sebb <se...@gmail.com>.
On 9 April 2013 07:25, Stott, Charlie <CS...@tnsi.com> wrote:

> Hi,
>
> I am wondering if and how it is possible to exclude the results of a
> specific sample (or at least disregard it) from the results.
>
> We have a dual stripe system which can be tested in online or offline
> mode.  To automate the decision we can request a status page, and act on
> the results.  Not all our test systems have dual stripes, so the request
> fails.  However, this is a valid situation.
>
> I always want to lookup the status page, but only if it exists and only if
> it responds a certain way do I want it to affect the test run.
>
> I am finding the situation where it is not available is being recorded as
> a test failure.
>
> Effectively, I want to perform the request as a pre-processor of another
> sample, but it seems overkill to write it in java/beanshell/someotherlang
> code.  Is there anything like a HTTP Request pre-processor, or a flag I can
> set somewhere that says ignore this sample on error?
>

You can use the Response Assertion to reset the failure flag.
That's used (for example) when checking for 404 responses, which by default
are failures.

Just use an assertion test that's bound to succeed.


> Thanks in advance,
> Charlie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>