the child for loop should be for(int j=1;j<=3;j++) instead of for(int j=1;j<=3;i++)
I'm curious whether it is a typo in your beanshell or in your email. If it's typo in email, this should not fix your problem. Please wait for other responses. Regards, On Tue, Dec 6, 2011 at 12:02 AM, Shaba K <[email protected]> wrote: > Am back again with issue of > > having to map between parent & child events & sending them as http request > post data > > > here's how my bean shell looks > > int countSubpackage = > Integer.parseInt(vars.get("Get_Subpackage_id_matchNr")); > int countPackage = Integer.parseInt(vars.get("Get_event_Id_matchNr")); > for(int i=1;i<=countPackage;i++) > { > for(int j=1;j<=3;i++) > { //regex counts are 1 based > sampler.addArgument( "package["+ vars.get("Get_event_Id_" + > i)+"]"+"["+vars.get("Get_Subpackage_id_" > +j)+"]",vars.get("Get_Subpackage_id_"+j) ); > } > } > > now Count of Subpackage is 3 > Count of package is 10 > > Each package has 3 subpackages. > > http post looks like package[event_id][subpackage_id] = package id. > > Integer.parseInt(vars.get("Get_Subpackage_id_matchNr")); i . . . '' : > Method Invocation sampler.addArgument > 2011/12/05 16:47:30 WARN - jmeter.modifiers.BeanShellPreProcessor: Problem > in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking > bsh method: eval Sourced file: inline evaluation of: ``int > countSubpackage = Integer.parseInt(vars.get("Get_Subpackage_id_matchNr")); > i . . . '' : Method Invocation sampler.addArgument > 2011/12/05 16:47:36 ERROR - jmeter.threads.JMeterThread: Test failed! > java.lang.OutOfMemoryError: GC overhead limit exceeded > at > > org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sendPostData(HTTPHC4Impl.java:942) > at > > org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:261) > at > > org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62) > at > > org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1018) > at > > org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1004) > at > > org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:411) > at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:297) > at java.lang.Thread.run(Thread.java:722) > > > Any guidance please ... > > > On Sun, Dec 4, 2011 at 6:35 PM, Shaba K <[email protected]> wrote: > > > Thanks much !!! > > > > > > > > On Fri, Dec 2, 2011 at 6:03 PM, Deepak Shetty <[email protected]> wrote: > > > >> ah dont make me blush - but thanks. > >> While we are at it , lets also thank sebb , his name always showed up in > >> the answers when I knew nothing about jmeter and had to rely on Google - > >> and sebb. > >> > >> > >> On Fri, Dec 2, 2011 at 12:28 AM, Felix Frank <[email protected]> wrote: > >> > >> > On 12/01/2011 03:03 PM, Bruce Ide wrote: > >> > > Sounds like you need the technique described at > >> > > > >> > > >> > http://theworkaholic.blogspot.com/2010/03/dynamic-parameters-in-jmeter.html > >> > > >> > I like how so many Test Plan design questions end up being answered by > >> > Deepak one way or another :-) > >> > > >> > So thanks to Deepak for putting up the info and to Bruce for providing > >> > the link - the described technique saved me a big headache just > >> yesterday. > >> > > >> > Cheers > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: [email protected] > >> > For additional commands, e-mail: [email protected] > >> > > >> > > >> > > > > >
