Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 45897 invoked from network); 18 Aug 2008 14:32:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Aug 2008 14:32:25 -0000 Received: (qmail 36600 invoked by uid 500); 18 Aug 2008 14:32:21 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 36576 invoked by uid 500); 18 Aug 2008 14:32:21 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 36565 invoked by uid 99); 18 Aug 2008 14:32:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Aug 2008 07:32:21 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [157.193.49.118] (HELO ugmailsc.ugent.be) (157.193.49.118) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Aug 2008 14:31:24 +0000 Received: from localhost (localhost [127.0.0.1]) by ugmailsc.ugent.be (Postfix) with ESMTP id 0C2A31D0CC4 for ; Mon, 18 Aug 2008 16:31:50 +0200 (CEST) X-Virus-Scanned: by UGent DICT Received: from ugmailsc.ugent.be ([127.0.0.1]) by localhost (ugmailsc.ugent.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z5MBK97mL4SY for ; Mon, 18 Aug 2008 16:31:49 +0200 (CEST) Received: from cedar.ugent.be (cedar.ugent.be [157.193.49.14]) by ugmailsc.ugent.be (Postfix) with ESMTP id C794D1D0CA6 for ; Mon, 18 Aug 2008 16:31:49 +0200 (CEST) Received: from otsrv1.iic.ugent.be (HELO [192.168.123.113]) ([157.193.121.51]) by cedar.ugent.be with ESMTP; 18 Aug 2008 16:31:49 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgIBAPkkqUidwXkz/2dsb2JhbAAItCKBWA Subject: Re: load test PUT requests with variables in request body From: Karel Vervaeke To: JMeter Users List In-Reply-To: <1219065187.8772.26.camel@banana.local> References: <1219065187.8772.26.camel@banana.local> Content-Type: text/plain Date: Mon, 18 Aug 2008 16:31:50 +0200 Message-Id: <1219069910.8772.35.camel@banana.local> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org For future reference: it seems to work smoothly. It took most of my time to figure out I needed to download the bsh jar file to $JMETER_HOME/lib. For ${discriminator} I used ${__threadNum}. The PUT request uses /tmp/requestbody-${__threadNum}. Currently the beanshell script is executed once for every thread iteration so the file gets regenerated every time. It is not really necessary (and probably causing a lot of overhead), but it could probably use a variable to generate the file only once for every thread. Regards, Karel On Mon, 2008-08-18 at 15:13 +0200, Karel Vervaeke wrote: > Hi, I am writing a load test for an application and I need to send > PUT requests where the request body contains variable data. > > I have a (theoretical) strategy for solving it, but I would like to know > if there are better ways to do it. > > My current strategy is like this: > > ThreadGroup > + BeanShell script to create /tmp/requestbody-${discriminator}.xml > + Sampler PUT /testme/123 => PUTs the > + BeanShell script to clean up /tmp/requestbody-${discriminator}.xml > > The ${discriminator} variable should be unique per thread so that each > thread can read/write to its own file. > > Do you think this is a valid approach or am I going to hit some walls? > Is there another (better) approach? > > Regards, > Karel > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org