Skip to content

Instantly share code, notes, and snippets.

Last active March 19, 2018 16:16
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Sample JMeter test plan using the ruby-jmeter gem
#!/usr/bin/env ruby
require 'ruby-jmeter'
test do
defaults domain: ''
cookies clear_each_iteration: true
threads count: 10, loops: 1 do
extract name: 'authenticity_token',
regex: 'meta name="csrf-token" content="(.+?)"'
think_time 5000, 2000
transaction 'Log In and View All Books' do
visit '/meta/in' do
assert contains: 'Sign in', scope: 'main'
submit '/meta/in', {
always_encode: true,
fill_in: {
'utf8' => '✓',
'authenticity_token' => '${authenticity_token}',
'user[email]' => '',
'user[password]' => 'p455w0rd',
'commit' => 'Sign in',
} do
assert contains: 'Dashboard', scope: 'main'
visit '/meta/books' do
assert contains: 'Everything I’ve read', scope: 'main'
summary_report true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment