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 > >