Skip to content

Instantly share code, notes, and snippets.

@davidcharlesweber
davidcharlesweber / ruby-jmeter test plan as rake file
Last active April 28, 2020 05:56
Gist for ruby-jmeter that will happily down a production rails app for you. Assumes that the application is using devise. Change thread count, duration and rampup to your needs. This will sign in as two different types of uses as a sample. Modify for your needs.
desc 'Generate and execute jmeter test plan'
task :generate_jmeter_plan do |t, args|
require 'ruby-jmeter'
generate_report
end
def generate_report
uri = URI('https://yourapp.com')
domain = uri.host
test do