Reputation: 1401
We are building a QA automation setup with test::unit and selenium. Tests for each page in our web app lives in separate directory, and at the top level directory, we have this:
require 'rubygems'
require 'test/unit'
require 'test/unit/runner/html'
require 'test/unit/ui/html/html_runner.rb'
Dir["*/test_*.rb"].each do |file|
require file
end
This creates a dynamic test suite and executes it. Inside the test scripts, there is a configuration file, which has configurations for the selenium browser driver to be used, the base url to start with, etc. We have to run the tests with all the browsers. Currently, we have to manually edit the configuration and change the selenium driver name from say, 'chrome' to 'firefox' each time after the suite is executed, and manually run it again. Can we instead set at the top level script so that the whole test suite repeats some 'x' number of times for different configurations?
Upvotes: 0
Views: 435
Reputation: 712
If you're using Hudson, you could go with wonky Selenium Server approach where for each job (running the tests under a given browser), you can start up Selenium Server with forcedBrowserMode set to whatever browser you want to test under.
Upvotes: 1