Preview Load Test
The test framework used in LoadWise is RWebSpec. Different from any other load testing tools/frameworks, with RWebSpec you can Preview execution of load test script in Firefox (single virtual user of course).
Prerequisite
- FireFox installed
- JSSH extension installed for Firefox
- FireFox installed with JSSH
Example
For inpatient readers, just double click c:\jrubyshell\samples\demo-preview.bat. An automated test will be run in current Firefox window: google search 'itest2'. You may say it is functional testing, not load testing. That's correct, but in RWebSpec, it can use the same script to do load testing without modification! And here it is.
RWebSpec Load Test Scriptrequire 'rubygems'
require 'rwebspec'
include RWebSpec::LoadTestHelper
run_with_virtual_users(5) { # You can change virtual user count here
browser = open_browser("http://www.google.com")
browser.enter_text("q", "itest2")
browser.click_button("Google Search")
sleep 0.5 # wait a bit time, as might get intermediate page
assert browser.text.include?("TestWise is a web test automation tool")
}
Run your own test
To preview a load test (we use search_rwebspec.rb as the example), In MS Windows, start a 'Command Window'
> cd c:\jrubyshell > loadtest-preview samples\google\search_rwebspec.rbNow try yours!