jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: Is there a way to count all retries as single request in JMeter
Date Tue, 14 Nov 2017 21:06:44 GMT
Hi
>"The generated sample is only regarded as successful if all its
sub-samples are successful."
Hence use your own custom assertion e.g.
http://jmeter.apache.org/usermanual/component_reference.html#JSR223_Assertion
(it possible to use the other assertions also depending on what gets
returned)

regards
deepak


On Mon, Nov 13, 2017 at 10:10 PM, Muhammad Nasir <mnasir@folio3.com> wrote:

> Is there a way to mark transaction controller result as Successful if any
> of child sampler passes? According to JMeter documentation "The generated
> sample is only regarded as successful if all its sub-samples are
> successful."
>
> -Nasir
>
> On Mon, Nov 13, 2017 at 10:58 PM, Deepak Shetty <shettyd@gmail.com> wrote:
>
> > I'd probably use a transaction controller + custom assertions (it should
> > mark every retry other than the last successful , even if status is not
> > 200)
> > http://jmeter.apache.org/usermanual/component_reference.
> > html#Transaction_Controller
> >
> > I do think this might be easier to do in your report rather than trying
> to
> > manipulate your test -Let Jmeter generate its raw data (all samples that
> > are retried can use a sample name naming pattern to figure out they are
> the
> > same thing) and then when you report exclude whatever you dont want.
> >
> > On Mon, Nov 13, 2017 at 6:44 AM, Muhammad Nasir <mnasir@folio3.com>
> wrote:
> >
> > > Hello Antonio,
> > >
> > > Is there a way to mark transaction controller result as Successful if
> any
> > > of child sampler passes?
> > > Thanks for your feedback.
> > >
> > > --Nasir
> > > On Fri, Nov 10, 2017 at 7:05 PM, Antonio Gomes Rodrigues <
> > ra0077@gmail.com
> > > >
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Use a Transaction Controller :
> > > > http://jmeter.apache.org/usermanual/component_
> > > reference.html#Transaction_
> > > > Controller
> > > >
> > > > Antonio
> > > >
> > > >
> > > > 2017-11-09 18:02 GMT+01:00 Muhammad Nasir <mnasir@folio3.com>:
> > > >
> > > > > Anyone to help on this?
> > > > >
> > > > > --
> > > > > Nasir
> > > > >
> > > > > > On 09-Nov-2017, at 10:59 AM, Muhammad Nasir <mnasir@folio3.com>
> > > wrote:
> > > > > >
> > > > > > I am having false reporting due to number of retries. I have
> > > > implemented
> > > > > a retry mechanism as
> > > > > > " ${__jexl3(("${Login_Code}" != "200") && ("${Login_Counter}"
<=
> > > > "2"))} "
> > > > > >
> > > > > > Let's say I am executing a request which retries for 2 times
and
> > then
> > > > > Failed is actually reported as 3 independent requests on
> > > > Aggregate/Results
> > > > > Tree Reports.
> > > > > >
> > > > > > Is there a way to report this as single failure because this
is
> > > > > ultimately a single request with 2 retries?
> > > > > >
> > > > > > Note: I tried following solution and its not working either
> > > > > > import org.apache.jmeter.samplers.SampleResult;
> > > > > >
> > > > > > if (new String(ResponseData).equals("message")) {
> > > > > >     SampleResult result = ctx.getCurrentSampler().sample(null);
> > > > > >     if (result.getResponseDataAsString().equals("message"))
{
> > > > > >         Failure = true;
> > > > > >     } else {
> > > > > >         SampleResult.setSuccessful(true);
> > > > > >     }
> > > > > >
> > > > > > }
> > > > > >
> > > > > > Thanks,
> > > > > > Nasir
> > > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message