Getting started with Ruby JMeter

Ruby JMeter is an easy to use language which outputs fully-compatible JMeter scripts

Getting Ruby JMeter

Tired of using the JMeter GUI or looking at hairy XML files?

This Ruby Gem lets you write test plans for JMeter in your favourite text editor, and optionally run them on Tricentis Flood.

Install it yourself as:

$ gem install ruby-jmeter

Creating a Test Plan

Once you have created or downloaded our basic test plan and saved it locally as a .rb file, you can use the .jmxmethod to run locally or the .flood method to launch this on Flood.

To do so, you require an account and API token. If you don't know your token, sign in to Flood and check your account settings.​

More Examples

For a more detailed example with Ruby-JMeter find out how to test a Ruby on Rails application or how to test a RESTful API.

Running your Ruby JMeter script on Flood

To execute the test on Flood, call the .flood method on the test and pass it the API token like this.

test do
  threads count: 10 do
    visit name: 'Google Search', url: 'https://flooded.io'
  end
end.flood('xmzyqayX5dsjsVLqGW1q')

This will then provide you with a link to the live test results on Flood like this.

Results at: https://flood.io/d384673f

Last updated