Selenium Grid Projects
What I have already done to update the ruby example in the Selenium Grid repo. Code Link
- Updated rspec from 1.1.8 to 1.1.12. I accomplished this by getting the most recent deep-test code and adding it to the /lib directory. The new version of the deep test code supports rspec 1.1.12. I then just require it in in the rake file. require File.expand_path(File.dirname(__FILE__) + ‘/lib/deep_test/rake_tasks’)
- The rake file does not need selenium-client 1.2.7. I removed the dependency by adding the reporting files it was referencing into the lib/reporting directory. report_formatter_path = “lib/reporting/selenium_test_report_formatter”
- Updated selenium-client from 1.2.7 to 1.2.18. With the change to the rake file, I am now able to use the most recent version of selenium-client in my specs.
Other helpful tools/tricks I have added to selenium grid (Maybe useful to other Ruby/Grid users)
- I start and stop the grid from the same rake file that I execute the tests from. Examples are grid:all_start and spec:run_in_parallel
- Rake tasks can just run and create a HTML report or run and send test results to Rally
- The tests and rake file runs on OS X, Cent OS, and Windows. (no parallelizaion on windows)
- Specify command options to the rake tasks to switch between hostnames I am running against. (This is useful when you have more than one instance like test.yourdomain.com and stage.yourdomain.com)
- Specify to only run tests for specific sites in the test suit. For example if you wrote tests for www.yourdomain.com and www.yourdomain.es. You can specify which sites to run against
- I use gem bundler with all grid projects to help control gem installation and versions. (My Rakefile automatically installs needed gems if you don’t have them)
- I have a framework for creating ruby classes with selenium locators automatically. I use nokogiri to help with this.
- Spec test to open ruby classes with locators and create a report of all of the changed selenium locators.
Future Goals
- Update Deep Test so that it uses the same version(1.2.8) of rspec as the latest version of Selenium-Client. Right now we are at rspec 1.1.12 and selenium client 1.2.18. Selenium-Client 1.2.18 can use rspec 1.2.8.
- When rspec is updated, I will be able to use the selenium client to provide screen shots if needed
- Figure out how to create a formatter that allows the Team City and Rubymine spec runners to provide the same test runner template as it does for test in sequence when you run test in parallel in deep test.
Rubymine Spec Formatter