From user-return-39150-apmail-jmeter-user-archive=jmeter.apache.org@jmeter.apache.org Fri Dec 14 17:14:05 2012 Return-Path: X-Original-To: apmail-jmeter-user-archive@www.apache.org Delivered-To: apmail-jmeter-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 858CBDFD1 for ; Fri, 14 Dec 2012 17:14:05 +0000 (UTC) Received: (qmail 69231 invoked by uid 500); 14 Dec 2012 17:14:04 -0000 Delivered-To: apmail-jmeter-user-archive@jmeter.apache.org Received: (qmail 68984 invoked by uid 500); 14 Dec 2012 17:14: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 67768 invoked by uid 99); 14 Dec 2012 17:14:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 17:14:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nalin.makar@gmail.com designates 209.85.210.43 as permitted sender) Received: from [209.85.210.43] (HELO mail-da0-f43.google.com) (209.85.210.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 17:13:52 +0000 Received: by mail-da0-f43.google.com with SMTP id u36so1464663dak.2 for ; Fri, 14 Dec 2012 09:13:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=YHDP53gaE5pna2JX7ei5KVqfxmLvwNcRnQA4sYv5OWw=; b=ZmeFZLWeHsp+6ld2blZrlfevJHdeoes3Z/4CayoJZ9+g3efqV4anUo4xaG2RZ5BWG+ m/Ib75poGQxoxzGagWOxGGd3NFniM5QcVsSoXZ0MiYtDv7MHP1VZ7PThub0o6WSKG1eB tcCfXoFla78MwwKdq1vFmH6m71+QeT1MQAqVy+khvf9ncTIt1Xf3r97yfcKYfigGHowZ Ci0kRL+Q3WinvPSpEvC2tUatgDkFVV/dusFkSN6dzyPKiH2S28PdO4P7bpuM/u6wx+X5 vTSCRATeYro86lBZFOZVeAeIu5zETHGmnMciLG0dxV52QaKwCdtBhXeXwrJtYthJtw3C c48w== Received: by 10.68.209.170 with SMTP id mn10mr17664811pbc.11.1355505211448; Fri, 14 Dec 2012 09:13:31 -0800 (PST) Received: from [10.32.0.188] ([38.104.224.154]) by mx.google.com with ESMTPS id j9sm3518330paw.2.2012.12.14.09.13.26 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Dec 2012 09:13:30 -0800 (PST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Single Java Request and multiple Sample Results From: Nalin Makar In-Reply-To: Date: Fri, 14 Dec 2012 09:13:26 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <6E376979-3718-4FA5-B44C-03AB377E18B9@gmail.com> References: <5E0B42D4-4C44-49C6-BC66-23683588AEB1@gmail.com> <39569F70-07B0-43B9-918A-FE33A970D195@gmail.com> To: "JMeter Users List" X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org Hi Sebb, I think I was unclear about the fact that one needs to be logged in to = do op1, op2 and op3. So, I am not sure how I can have separate samples = for login, op1, op2, op3 and logout and still be able to share the = logged in session. This could be done using HTTP requests, but my = question was specifically around using Java Sampler. I figured on way of doing this would be to record sub-samples in = JavaSampler and then: 1. Process the saved XML files outside of java (or using some = Post-processor if possible) 2. Extend / Implement a new kind of Summary Report that works on = sub-samples and not just on parent samples. Thoughts? Thanks! -nalin =20 On Dec 14, 2012, at 3:38 AM, sebb wrote: > On 14 December 2012 06:12, Nalin Makar wrote: >> Just came across >> public void addSubResult(SampleResult subResult) >> in SampleResult javadocs. Will try and see if this is the right way = to go about it. >>=20 >> If someone has any wise words around this use case, please do share. >=20 > I would suggest using separate samples for the login, op1, op2, op3 = and logout. > Then use Transaction Controller to combine the samples. >=20 > That would make it easier to change the operations, and fit in better > with the normal JMeter way of doing things. >=20 >> Thanks, >> Nalin >>=20 >> On Dec 13, 2012, at 9:29 PM, Nalin Makar = wrote: >>=20 >>> Hi, >>>=20 >>> I have searched extensively online and couldn't find a solution to = my problem. >>>=20 >>> We have a pretty good functional/automated coverage for the product = that we are testing and I would like to reused that code to also run = load/perf tests. >>>=20 >>> We figured we'll use JavaSampler and implement = AbstractJavaSamplerClient. So, in a Java Request we wanted to do the = following operations: >>>=20 >>> 1. In setupTest() --> do login >>> 2. In runTest() --> >>> a. Do op1 >>> b. Do op2 >>> c. Do op3 >>> 3. In tearDownTest --> logout >>>=20 >>> As, runTest() only returns a single SampleResult, I can only use = that to report on the overall status of running op1, op2 and op3. But I = was wondering if there was a way to report separate SampleResults for = each of the 3 operations (op[1-3]). >>>=20 >>> Has someone implemented something like this? >>>=20 >>> Thanks, >>> Nalin >>=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org > For additional commands, e-mail: user-help@jmeter.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org For additional commands, e-mail: user-help@jmeter.apache.org