Search code examples
jmeterperformance-testingruby-jmeter

Is there a way to set jmeter properties when using ruby-jmeter


Is there a way to set jmeter properties when using ruby-jmeter

We are building a performace testplan using ruby-jmeter. Our graphs show granularity as 1 min. We want to reduce the granularity to 1000ms. Is there a way to set this up in ruby-jmeter?


Solution

  • When you're running your test plan locally you can specify JMeter installation location via path attribute. All properties customizations (i.e. from user.properties file) will be picked up.

    It's also possible to specify the custom location of the jmeter properties file via properties attribute.

    test do
      threads count: 1 do
        visit name: 'Example domain', url: 'http://example.com'
      end
    end.run(
      path: '/path/to/your/jmeter/bin',
      file: 'test.jmx',
      log: 'jmeter.log',
      jtl: 'result.jtl',
      properties: 'jmeter.properties')
      ^^^^^^^^^^
    

    More information: