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 <[email protected]> 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 <[email protected]
> >
> 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 <[email protected]>:
> >
> > > Anyone to help on this?
> > >
> > > --
> > > Nasir
> > >
> > > > On 09-Nov-2017, at 10:59 AM, Muhammad Nasir <[email protected]>
> 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
> > >
> >
>

Reply via email to