LoadWise
Simple and affordable web load testing
Version 0.6.0
Windows XP +
Capture page response time and Script Reuse
Often we want to know page response time under load? In LoadWise, it is quite easy to do so.
Example
This following load test script will try to
- Sign in http://agiletravel.herokuapp.com
- Select flight (arrival and departure city)
- Sign off
To capture page response time for 'Sign in' and 'Flight selection', we just need to add log_time around page submit operation.
require File.join(AGILEWAY_APP_ROOT, "lib", "rwebspec-mechanize", "rwebspec-mechanize.rb") describe "Select Flight" do include RWebSpec::Mechanize::LoadTestHelper it "Sign in, Select Flight, Sign off" do stats = run_with_virtual_users() { browser = open_browser log_time("Open home page") { browser.goto_page("/") } browser.enter_text("username", "agileway") browser.enter_text("password", "test") log_time("Sign in") { browser.click_button("Sign in") } browser.click_radio_option("tripType", "oneway") browser.select_option("fromPort", "New York") browser.select_option("toPort", "Sydney") log_time("Select Flight") { browser.click_button("Continue") } assert browser.text.include?("Passenger Details") log_time("Sign off") { browser.click_link("Sign off") } assert browser.text.include?("Login") } end end
Output like below:
VU[1] 1.985554s VU[2] 2.097716s VU[3] 2.096223s VU[4] 1.994439s [0] Open home page, 0.58735 [0] Sign in, 0.540004 [0] Select Flight, 0.201872 [0] Sign off, 0.635659 [0] Total Duration (Initial), 1.985537 [1] Open home page, 0.584952 [1] Sign in, 0.640863 [1] Select Flight, 0.217303 [1] Sign off, 0.633028 [1] Total Duration (Initial), 2.097707 [2] Open home page, 0.595272 [2] Sign in, 0.62667 [2] Select Flight, 0.204632 [2] Sign off, 0.579938 [2] Total Duration (Initial), 2.096209 [3] Open home page, 0.589808 [3] Sign in, 0.53176 [3] Select Flight, 0.196177 [3] Sign off, 0.654215 [3] Total Duration (Initial), 1.99432
Result Analysis
From above test output, we know 'Flight Selection' is quite quick (around 0.2 second) and 'Sign in' takes a lot longer (0.5 seconds) under the load of 4 concurrent users.
© 2006 - 2024 AgileWay Pty Ltd. Powered by SiteWise CMS