Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 4135 invoked from network); 30 May 2007 11:54:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 May 2007 11:54:25 -0000 Received: (qmail 59298 invoked by uid 500); 30 May 2007 11:54:27 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 59276 invoked by uid 500); 30 May 2007 11:54:27 -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 59265 invoked by uid 99); 30 May 2007 11:54:27 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 May 2007 04:54:27 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,MIME_BOUND_NEXTPART,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [203.200.155.3] (HELO gw008.ibsplc.com) (203.200.155.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 30 May 2007 04:54:20 -0700 Received: from ([192.168.0.4]) by gw008.ibsplc.com; Wed, 30 May 2007 17:22:20 +0530 (India Standard Time) In-Reply-To: <25aac9fc0705300418y663f2aa6k80690155fb63425@mail.gmail.com> X-Disclaimed: 63302 To: "JMeter Users List" Subject: Re: _javaScript() function in Jmeter MIME-Version: 1.0 X-Mailer: Lotus Notes Release 7.0.1 January 17, 2006 Message-ID: From: Lenin Basheer Date: Wed, 30 May 2007 17:20:10 +0530 X-MIMETrack: Serialize by Router on Green/IBS(Release 7.0.1|January 17, 2006) at 05/30/2007 05:20:14 PM, Serialize complete at 05/30/2007 05:20:14 PM Content-Type: multipart/mixed; boundary="----=_NextPartTM-000-a1bb3bd7-d3cf-4b5f-bd2c-3343887fa7d0" X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPartTM-000-a1bb3bd7-d3cf-4b5f-bd2c-3343887fa7d0 Content-Type: multipart/alternative; boundary="=_alternative 004106AF652572EB_=" --=_alternative 004106AF652572EB_= Content-Type: text/plain; charset="US-ASCII" Hi Sebb, My objective in short is this. flightdate =1; while( flightnumber <10) { list flight for (flightnumber, flightdate); if (flghtnumber == 10){ flightdate++; } // increment filght date if value is 10 else retain the same value for flight date .. flightnumber ++; } This way i want to achive a unique pattern of flights on all dates ... say f1 on Jan 1, f2 on Jan 1 etc f10 in 1 and then it creates the set f1 on Jan 2 , f2 on jan 2 etc. i cant have two counters because it creates the pattern f1 on 1 , f2 on 2 etc. please help. regards, Lenin sebb 05/30/2007 04:45 PM Please respond to "JMeter Users List" To "JMeter Users List" cc Subject Re: _javaScript() function in Jmeter On 30/05/07, Lenin Basheer wrote: > > Hi All, > > I ve been tryintg to get the javaScript() to work with jmeter for a specfic > scenario that i am testing. I havent been succesfull and there fore seeking > ur help. What are you trying to achieve? > This is the java script that i wrote ; > > ${__javaScript(${flightNumber}==10 ? ${i} += 1; : ${i} > ,flightDate )} Assuming flightNumber = 7 and i = 3 then the script: ${flightNumber}==10 ? ${i} += 1; : ${i} becomes: 7==10 ? 3 += 1;: 3 which is not valid. Variable references are replaced by their values. > I have the javaScript as a user parameter , with > name : date > value : ${__javaScript(${flightNumber}==10 ? ${i} += 1; : > ${i} ,flightDate )} > > However i cant get it value ${i} to increment. > > Another option that i tried was to increment the value using a > _counter(FALSE,flightDate) with in an if controller that checks if > flightnumber = 10. > However the variable flight date goes null outside the scope of the if > controller. Initialise it outside the If Controller. --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect." --=_alternative 004106AF652572EB_= Content-Type: text/html; charset="US-ASCII"
Hi Sebb,

My objective in short is this.
flightdate =1;
while( flightnumber <10)
{
        list flight for (flightnumber, flightdate);
        if (flghtnumber == 10){
                flightdate++;
        }
// increment filght date  if value is 10 else retain the same value for flight date ..
       
flightnumber ++;
}

This way i want to achive a unique pattern of flights on all dates ... say f1 on Jan 1,  f2 on Jan 1 etc f10 in 1 and then it creates the set f1 on Jan 2 , f2 on jan 2 etc.

i cant have two counters because it creates the pattern  f1 on 1 , f2 on 2 etc.

please help.

regards,
Lenin


sebb <sebbaz@gmail.com>

05/30/2007 04:45 PM
Please respond to
"JMeter Users List" <jmeter-user@jakarta.apache.org>

To
"JMeter Users List" <jmeter-user@jakarta.apache.org>
cc
Subject
Re: _javaScript() function in Jmeter





On 30/05/07, Lenin Basheer <LeninB@ibsplc.com> wrote:
>
> Hi All,
>
> I ve been tryintg to get the javaScript() to work with jmeter for a specfic
> scenario that i am testing. I havent been succesfull and there fore seeking
> ur help.

What are you trying to achieve?

> This is the java script that i wrote ;
>
> ${__javaScript(${flightNumber}==10 ? ${i} += 1; : ${i}
> ,flightDate )}

Assuming flightNumber = 7 and i = 3 then the script:

  ${flightNumber}==10 ? ${i} += 1; : ${i}

becomes:

 7==10 ? 3 += 1;: 3

which is not valid.

Variable references are replaced by their values.

> I have the javaScript as a user parameter , with
> name : date
> value : ${__javaScript(${flightNumber}==10 ? ${i} += 1; :
> ${i} ,flightDate )}
>
> However i cant get it value ${i} to increment.
>
> Another option that i tried was to increment the value using a
> _counter(FALSE,flightDate)  with in an if controller that checks if
> flightnumber = 10.
> However the variable flight date goes null outside the scope of the if
> controller.

Initialise it outside the If Controller.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org







DISCLAIMER:


"The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."





--=_alternative 004106AF652572EB_=-- ------=_NextPartTM-000-a1bb3bd7-d3cf-4b5f-bd2c-3343887fa7d0 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org ------=_NextPartTM-000-a1bb3bd7-d3cf-4b5f-bd2c-3343887fa7d0--