Load testing with RWebSpec
- Reuse functional test scripts
Different from most current load testing scripts (which work on HTTP request levels), our loading test scripts use same syntax of functional test scripts: RWebSpec, which is known to be very readable. Furthermore, you can reuse the functional test scripts for load tests with only slight modifications.
- See load test scripts in action in Firefox browser
Although execution of load tests is in headless mode, ie, seeing test running in a browser during development greatly improve the experience and confidence. Load tests with RWebSpec just allow you that.
- Can verify page contents just as functional testing.
C:\>cd iLoad2-0.1 C:\iLoad2-0.1>SET PATH=C:\iLoad2-0.1\bin;%PATH%4. Preview load testing run in Firefox browser ("install JSSH plugin":http://TestWise.com/documentation/firefox-support first)
spec -fs samples\agile_travel\deny_access_preview_rwebspec.rb5. Run load tests with a number of virtual users.
spec -fs samples\agile_travel\deny_access_rwebspec.rbThe output shows how long does it take for each virtual user:
Thread[1] 6.861s Thread[3] 7.455s Thread[2] 7.674s Thread[4] 9.456sNow let's example the actual load test scripts:
run_with_virtual_users(4) { browser = open_browser("http://travel.agileway.net", {:resynchronize : false}) home_page = HomePage.new(browser) # We cam reuse page objects! home_page.click_sign_in assert browser.text.include?("You did not provide any details for authentication.") }