Re: Adding samplers to thread group
So , finally ListedHashTree worked ! "ListedHashTree is a different implementation of the HashTree collection class. In the ListedHashTree, the order in which values are added is preserved (not to be confused with SortedHashTree, which sorts the order of the values using the compare() function). Any listing of nodes or iteration through the list of nodes of a ListedHashTree will be given in the order in which the nodes were added to the tree." as given in documentation ! :) Thanks Sebb and Prakash :) -- View this message in context: http://jmeter.512774.n5.nabble.com/Adding-samplers-to-thread-group-tp5724140p5724177.html Sent from the JMeter - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Re: Adding samplers to thread group
On 11 May 2016 at 14:46, Sharmadha <ssain...@hortonworks.com> wrote: > Hi, > Thanks for the response. > in jmx file that is created from UI, hashtree class is hashTree > > whereas in jmx file created from java code, it is > > if i change to hashTree everything > works perfect. > > how to use hashTree instead of org.apache.jorphan.collections.HashTree ? > > Basically , hashTree is object of which class ? > See bin/saveservice.properties But note that this is internal code and may change. It would be better to create a JMX file. > > -- > View this message in context: > http://jmeter.512774.n5.nabble.com/Adding-samplers-to-thread-group-tp5724140p5724175.html > Sent from the JMeter - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org > For additional commands, e-mail: user-h...@jmeter.apache.org > - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Re: Adding samplers to thread group
Hi, Thanks for the response. in jmx file that is created from UI, hashtree class is hashTree whereas in jmx file created from java code, it is if i change to hashTree everything works perfect. how to use hashTree instead of org.apache.jorphan.collections.HashTree ? Basically , hashTree is object of which class ? -- View this message in context: http://jmeter.512774.n5.nabble.com/Adding-samplers-to-thread-group-tp5724140p5724175.html Sent from the JMeter - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Re: Adding samplers to thread group
There are some guides to writing plugin code which are linked from the website. JMeter is open source, so the code is available online. Again this is linked from the website. Unlike the plugin test elements, note that the underlying JMeter engine was not specifically designed to be extended. So such internals may change between releases. That's not to say that they will change, but equally the JMeter project cannot guarantee stability of internals. The basic JMX file format however will not change without warning. If you want to generate a JMeter test plan from Java code, then generate it as a JMX file. Otherwise you must prepared to update your code as necessary for new JMeter releases. On 11 May 2016 at 06:42, Sharmadha <ssain...@hortonworks.com> wrote: > Stuck with same problem ! Can someone explain about indexing samplers or xml > node model ? Or any other solution ? > > Thanks in advance. > > > > -- > View this message in context: > http://jmeter.512774.n5.nabble.com/Adding-samplers-to-thread-group-tp5724140p5724172.html > Sent from the JMeter - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org > For additional commands, e-mail: user-h...@jmeter.apache.org > - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Re: Adding samplers to thread group
Stuck with same problem ! Can someone explain about indexing samplers or xml node model ? Or any other solution ? Thanks in advance. -- View this message in context: http://jmeter.512774.n5.nabble.com/Adding-samplers-to-thread-group-tp5724140p5724172.html Sent from the JMeter - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Re: Adding samplers to thread group
Can you please tell more on any of the methods ? How to index the samplers ? On Apr 20, 2016, at 10:56 AM, Prakash Palnati <prakash.paln...@snapwiz.com> wrote: > Because hashtree is not sorted collection. > > Try giving index to the sampler or follow xml node model. > On 20-Apr-2016 10:26 am, "Sharmadha" <ssain...@hortonworks.com> wrote: > >> I want to add 3 samplers to thread group via java code. >> >> this is my java code >> >> HashTree threadGroupTree=testPlanTree.add(testPlan,threadGroup); >> threadGroupTree.add(sampler1); >> threadGroupTree.add(sampler2); >> threadGroupTree.add(sampler3); >> >> compiles and runs. >> >> When I open the corresponding .jmx file, it is added as >> >> sampler 2 >> sampler 1 >> sampler 3 >> >> >> and the next time order changes. >> >> How to make samplers add in order into the Threadgroup ? Please help >> >> >> >> >> >> >> -- >> View this message in context: >> http://jmeter.512774.n5.nabble.com/Adding-samplers-to-thread-group-tp5724140.html >> Sent from the JMeter - User mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org >> For additional commands, e-mail: user-h...@jmeter.apache.org >> >> - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Re: Adding samplers to thread group
Because hashtree is not sorted collection. Try giving index to the sampler or follow xml node model. On 20-Apr-2016 10:26 am, "Sharmadha" <ssain...@hortonworks.com> wrote: > I want to add 3 samplers to thread group via java code. > > this is my java code > > HashTree threadGroupTree=testPlanTree.add(testPlan,threadGroup); > threadGroupTree.add(sampler1); > threadGroupTree.add(sampler2); > threadGroupTree.add(sampler3); > > compiles and runs. > > When I open the corresponding .jmx file, it is added as > > sampler 2 > sampler 1 > sampler 3 > > > and the next time order changes. > > How to make samplers add in order into the Threadgroup ? Please help > > > > > > > -- > View this message in context: > http://jmeter.512774.n5.nabble.com/Adding-samplers-to-thread-group-tp5724140.html > Sent from the JMeter - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org > For additional commands, e-mail: user-h...@jmeter.apache.org > >
Adding samplers to thread group
I want to add 3 samplers to thread group via java code. this is my java code HashTree threadGroupTree=testPlanTree.add(testPlan,threadGroup); threadGroupTree.add(sampler1); threadGroupTree.add(sampler2); threadGroupTree.add(sampler3); compiles and runs. When I open the corresponding .jmx file, it is added as sampler 2 sampler 1 sampler 3 and the next time order changes. How to make samplers add in order into the Threadgroup ? Please help -- View this message in context: http://jmeter.512774.n5.nabble.com/Adding-samplers-to-thread-group-tp5724140.html Sent from the JMeter - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org