Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 29DB5200D3D for ; Mon, 13 Nov 2017 14:56:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 283EA160BF3; Mon, 13 Nov 2017 13:56:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4755D160BE4 for ; Mon, 13 Nov 2017 14:56:04 +0100 (CET) Received: (qmail 34928 invoked by uid 500); 13 Nov 2017 13:56:03 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 34915 invoked by uid 99); 13 Nov 2017 13:56:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2017 13:56:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 283A31916E8 for ; Mon, 13 Nov 2017 13:56:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.979 X-Spam-Level: * X-Spam-Status: No, score=1.979 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=folio3-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Cg7yPwnfzYqe for ; Mon, 13 Nov 2017 13:55:59 +0000 (UTC) Received: from mail-qt0-f169.google.com (mail-qt0-f169.google.com [209.85.216.169]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 4D99F5FCE9 for ; Mon, 13 Nov 2017 13:55:58 +0000 (UTC) Received: by mail-qt0-f169.google.com with SMTP id 31so19552552qtz.9 for ; Mon, 13 Nov 2017 05:55:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=folio3-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=o4onkXvUxEIiWz2/HCmlLO9Vslwz8SBa1tIvHFft/X0=; b=lBhUOHcJQ2kWeRYFCie8tn61HdfF8meo5Rbr8jzaejEWyepLZjO1qTOmq2HkE1ZBRD wZyWFhYlEWvm2HhdARbCv5hZl7OAKeQW2dumIhNzjXuAfh6DloqSZn54MAgHeZmVz46m Kxst8EKuvjOAKY/4MwUFL7MOC136I3bO7Vhms+E3tEk8D5appq4STR3RtqkZzxLIk/RB SZrWiMNILJjNi8dxpmPNN4E1PbnDp04hcPHP6kCR1L0jfxabJCiugTzMgSl0R8xtl+fg 92BplMAaSmz5O9BTUZqZVkCHYFVRvcLDbJ9zOAgZeXa/oNsvXUKYt/2Wp4HP7DH6pI7u 3QyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=o4onkXvUxEIiWz2/HCmlLO9Vslwz8SBa1tIvHFft/X0=; b=NKeDmPG1Cya3u8Q3igxBIo3q2KvD/dOMGjgrHi05o1SP57ihjbEp5d8+Q/QO3qb97f VQjgdG7fYHMkk/74BZyiJm6U8XI/t2hwU8nF68X+GC1oq6IXXUx7HK+d2su/Z/J4cVjS aqmHQaDcwlLqgahA1ZveUtwOco4BNFnx8OpJijZ7mlcW8S9rAYFkLMZOlqPJDrj99dtJ Djo+5CaJORqeVAHGKG0ykhBJvXkmzMhY9qH5EmPiRKTRntXEShqNlz6xQUj20eWnsTZQ TpLghlzStwrLLg2/o5pcNcdwmGTDA9aFe36nZBQSuyCPRXb14l6bprt2LwHUJ/jKCIkP Q0aA== X-Gm-Message-State: AJaThX4fvFxEUeJ9UZyqqp2rDsHSqqqdPb7Gen0SMnYI+qfYtK/NPPt1 0Vv8MxwIwAopwS0o4c1+exzkEpPeApaLKZ5kfk/ZXw== X-Google-Smtp-Source: AGs4zMa42KxQHZGmd7ikScj1XC1Xqg7SEw9q1pW68l1QeWd5+5TuG79Ul9/4rOl5Bl566DDECLFGeNMCYYJXLnKxPoU= X-Received: by 10.237.34.45 with SMTP id n42mr14584766qtc.80.1510581357104; Mon, 13 Nov 2017 05:55:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.55.133 with HTTP; Mon, 13 Nov 2017 05:55:16 -0800 (PST) In-Reply-To: References: <996CC03C-4A18-421B-B0DE-276B434FBDFA@folio3.com> From: Muhammad Nasir Date: Mon, 13 Nov 2017 18:55:16 +0500 Message-ID: Subject: Re: Is there a way to count all retries as single request in JMeter To: JMeter Users List Content-Type: multipart/alternative; boundary="001a11379e4e31e3a1055ddda1fc" archived-at: Mon, 13 Nov 2017 13:56:05 -0000 --001a11379e4e31e3a1055ddda1fc Content-Type: text/plain; charset="UTF-8" I think you are not getting my question. I have already implemented retries and now trying to fix false reporting for benchmarking. --Nasir On Mon, Nov 13, 2017 at 4:59 PM, jmeter tea wrote: > you can check similar question with answers > https://stackoverflow.com/questions/47259211/jmeter-groovy- > re-execute-a-sampler-x-times-under-condition/47259590#47259590 > > On Mon, Nov 13, 2017 at 7:55 AM, Muhammad Nasir wrote: > > > In my case it is. > > > > I am trying to benchmark overall user experience performance on load. If > a > > user is getting a response (though little late) its fine in my case > rather > > being failed. > > And thats the data I want like with current implementation what are my > > system capabilities to successfully process requests. > > > > > > On Mon, Nov 13, 2017 at 10:50 AM, Andrew Burton < > > andrewburtonatwh@gmail.com> > > wrote: > > > > > Well, you definitely do want to have these as separate requests. > Knowing > > > that possibly 2 out of every 3 attempts to login fail to return a > non-200 > > > response code is valuable data! > > > > > > I would argue that a request that has timed out twice and succeeds on > the > > > third try is not a single successful login. > > > > > > > > > > > > On Mon, Nov 13, 2017 at 4:22 PM, Muhammad Nasir > > wrote: > > > > > > > Yes My use case is as follows: > > > > > > > > I am testing a http API on load and client which is using this API > has > > 30 > > > > sec request timeout implemented (This means on load some of the > request > > > may > > > > result in request timeout error). To avoid permanent failures we have > > > > implemented 2 retries / request on client side before marking it as > > > failed > > > > and I am trying to implement the same retry mechanism in JMeter load > > test > > > > as well. > > > > > > > > Now having said that, I have already implemented the retry mechanism > > > using > > > > while loop as: > > > > *${__jexl3(("${Login_Code}" != "200") && ("${Login_Counter}" <= > "1"))}* > > > > > > > > but the problem with this code is that it reports all retries as > > separate > > > > requests on Report which gives me false reporting. > > > > > > > > Suppose if any request pass in 2nd retry than JMeter is reporting it > > as 2 > > > > requests failed and 1 Passed, which means it has skewed my results > and > > I > > > am > > > > unable to identify the exact failure/success rate. > > > > > > > > Any help or code samples to achieve this will be highly appreciated. > > > > > > > > > > > > > > > > > > > > On Mon, Nov 13, 2017 at 7:28 AM, Andrew Burton < > > > andrewburtonatwh@gmail.com > > > > > > > > > wrote: > > > > > > > > > I would expect that each call to sample() in your line: > > > > > > > > > > SampleResult result = ctx.getCurrentSampler().sample(null); > > > > > > > > > > would result in a new request being logged. > > > > > > > > > > If you don't want to use a Transaction Controller as suggested, the > > > only > > > > > way to "work around" this would be to write your own custom sampler > > > that > > > > > allows for retrying based on a text response from the server. > > > > > > > > > > Is there any more context for your question, e.g. why you might > need > > to > > > > > handle multiple failures before getting the response you want? > > > > > > > > > > > > > > > > > > > > On Sun, Nov 12, 2017 at 5:47 AM, Muhammad Nasir > > > > > wrote: > > > > > > > > > > > Thanks Antonio but I am not looking for this solution. > > > > > > > > > > > > > > > > > > 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 : > > > > > > > > > > > > > > > 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.getResponseDataAsStrin > g().equals("message")) > > { > > > > > > > > > Failure = true; > > > > > > > > > } else { > > > > > > > > > SampleResult.setSuccessful(true); > > > > > > > > > } > > > > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > Nasir > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --001a11379e4e31e3a1055ddda1fc--