Lightweight Web Load Testing Tool with Curl and Ruby
รุ่นแก้ไขเมื่อ 00:32, 30 มีนาคม 2551 โดย Jittat (คุย | มีส่วนร่วม) (สร้างหน้าใหม่: I have developed a simple web load testing tool using Curl. It is written in Ruby, but you don't have to know much Ruby to use it. First you model your vis...)
I have developed a simple web load testing tool using Curl. It is written in Ruby, but you don't have to know much Ruby to use it.
First you model your visitors in some file, e.g., load_test.rb:
visitor "Viewer" do stores_cookies site_url "http://mysite" get "/" post "/login", {:login => 'guest', :password => 'hello-world'} post "/list" get "/" end visitor "Poster" do stores_cookies site_url "http://mysite" get "/" post "/login", {:login => 'user', :password => 'hello'} post "/list" post "/submit", { :image => {:type => :file, :data => 'picture.png'}, 'category' => 58 }, :multipart => true end
Then you call
ruby runner.rb load_test Poster 10 Viewer 20 -t 60
which loads your definition, creates 10 Poster and 20 Viewer, and executes them for 60 seconds. After it runs, it'll run and give you some report.