Hi, The guys over at Flood.IO have put together a Ruby DSL for generating the JMX, which you might find useful (https://github.com/flood-io/ruby-jmeter), depending on what you're trying to achieve. I've used it a couple times in the past and found it was a good fit for how I was trying to write and maintain the test plans as code.
Cheers, Steve On Tue, Jun 23, 2015 at 1:01 AM, Maxime Chassagneux < [email protected]> wrote: > I want to generate a JMX file in a Java program. > > I start to use the JMeter API to do this, and all work, except that I can't > keep the order of my Sampler in the JMX file saved. > > This is a short example of what I do : > > HashTree testPlanHashTree = new HashTree() ; > > ListedHashTree loginTemplate = (ListedHashTree) SaveService.loadTree(new > File("\\\\toto\\Applis\\LogginV1.jmx")); > > testPlanHashTree.add(loginTemplate); > > SaveService.saveTree(testPlanHashTree, new > FileOutputStream("C:\\tmp\\test.jmx")); > > How could I keep the order of the sample ? >
