selenium-rspec-dsl 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/common/shared/common.rb +167 -0
- data/config/aggregate_reports.rb +124 -0
- data/config/array_extension.rb +13 -0
- data/config/multi_process_behaviour_runner.rb +50 -0
- data/config/selenium-setup.rb +32 -0
- data/config/site_config.rb +8 -0
- data/sites/button.rb +31 -0
- data/sites/buttonAjax.rb +14 -0
- data/sites/buttonJQuery.rb +26 -0
- data/sites/buttonMultiWindow.rb +99 -0
- data/sites/buttonNonLoad.rb +11 -0
- data/sites/checkbox.rb +22 -0
- data/sites/checkboxExtjs.rb +10 -0
- data/sites/checkboxGwt.rb +24 -0
- data/sites/dropdown.rb +28 -0
- data/sites/dropdownAjax.rb +40 -0
- data/sites/dropdownExtjs.rb +32 -0
- data/sites/dropdownJQuery.rb +40 -0
- data/sites/dropdownLoad.rb +25 -0
- data/sites/element.rb +172 -0
- data/sites/form.rb +7 -0
- data/sites/image.rb +7 -0
- data/sites/label.rb +32 -0
- data/sites/link.rb +32 -0
- data/sites/linkMultiWindow.rb +160 -0
- data/sites/linkNonLoad.rb +11 -0
- data/sites/listbox.rb +16 -0
- data/sites/page.rb +16 -0
- data/sites/panel.rb +7 -0
- data/sites/radiobutton.rb +10 -0
- data/sites/tabPanel.rb +7 -0
- data/sites/table.rb +48 -0
- data/sites/tableExtjs.rb +42 -0
- data/sites/test/googleResults_screen.rb +15 -0
- data/sites/test/googleSearch_screen.rb +27 -0
- data/sites/textbox.rb +16 -0
- data/sites/tree.rb +7 -0
- data/sites/treeGwt.rb +32 -0
- data/spec/spec.opts +6 -0
- data/spec/spec_helper.rb +40 -0
- data/spec/test/testPass_spec.rb +36 -0
- data/spec/test/testPending_spec.rb +13 -0
- data/vendor/selenium-client-1.2.17/README.markdown +328 -0
- data/vendor/selenium-client-1.2.17/examples/rspec/google_spec.rb +41 -0
- data/vendor/selenium-client-1.2.17/examples/script/google.rb +25 -0
- data/vendor/selenium-client-1.2.17/examples/testunit/google_test.rb +39 -0
- data/vendor/selenium-client-1.2.17/lib/nautilus/shell.rb +32 -0
- data/vendor/selenium-client-1.2.17/lib/selenium.rb +14 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client.rb +27 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client/base.rb +118 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client/driver.rb +11 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client/extensions.rb +118 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client/generated_driver.rb +1711 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client/idiomatic.rb +488 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client/javascript_expression_builder.rb +116 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client/javascript_frameworks/jquery.rb +13 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client/javascript_frameworks/prototype.rb +13 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client/protocol.rb +96 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/client/selenium_helper.rb +34 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/command_error.rb +4 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/protocol_error.rb +4 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/rake/default_tasks.rb +16 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/rake/remote_control_start_task.rb +70 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/rake/remote_control_stop_task.rb +44 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/rake/tasks.rb +6 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/remote_control/remote_control.rb +33 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/rspec/reporting/file_path_strategy.rb +78 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/rspec/reporting/html_report.rb +123 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/rspec/reporting/selenium_test_report_formatter.rb +87 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/rspec/reporting/system_capture.rb +72 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/rspec/rspec_extensions.rb +96 -0
- data/vendor/selenium-client-1.2.17/lib/selenium/rspec/spec_helper.rb +35 -0
- data/vendor/selenium-client-1.2.17/lib/tcp_socket_extension.rb +32 -0
- data/vendor/selenium-client-1.2.17/test/all_unit_tests.rb +3 -0
- data/vendor/selenium-grid-1.0.4/Capfile +107 -0
- data/vendor/selenium-grid-1.0.4/README +10 -0
- data/vendor/selenium-grid-1.0.4/Rakefile +190 -0
- data/vendor/selenium-grid-1.0.4/build.xml +182 -0
- data/vendor/selenium-grid-1.0.4/doc/resources/Multiple Environments Demo Setup.svg +518 -0
- data/vendor/selenium-grid-1.0.4/doc/resources/Multiple Machine Demo Setup.svg +371 -0
- data/vendor/selenium-grid-1.0.4/doc/resources/Rakefile +18 -0
- data/vendor/selenium-grid-1.0.4/doc/resources/Requesting a Specific Environment.svg +576 -0
- data/vendor/selenium-grid-1.0.4/doc/resources/Selenium Grid Setup.svg +539 -0
- data/vendor/selenium-grid-1.0.4/doc/resources/Selenium Grid.css +68 -0
- data/vendor/selenium-grid-1.0.4/doc/resources/Traditional Selenium Setup.svg +295 -0
- data/vendor/selenium-grid-1.0.4/doc/website/Rakefile +37 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Multiple Environment Demo Setup - Small.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Multiple Environment Demo Setup.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Multiple Machine Demo Setup - Small.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Multiple Machine Demo Setup.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Requesting a Specific Environment - Small.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Requesting a Specific Environment.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Selenium Grid Logo.graffle +1015 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Selenium Grid Setup - Small.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Selenium Grid Setup.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Traditional Selenium Setup - Small.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/diagrams/Traditional Selenium Setup.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/faq.markdown +686 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/ant_version_osx_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/ant_version_win_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/background_better.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/background_feedback.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/background_participate.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/background_start_tracks.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/background_started.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/check_path_osx_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/check_path_win_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/dot_profile_editing_osx_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/dot_profile_osx_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/install/linux/linux-ant-install.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/install/linux/linux-ant-profile-update.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/install/linux/linux-ant-verify.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/install/linux/linux-ant-version.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/install/linux/linux-java-version.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/install/linux/linux-navigate-path.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/install/linux/linux-selenium-install.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/install/linux/linux-selenium-sanity-check.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/install/win/selenium-check.bmp +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/install_ant_osx_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/installing_grid_osx_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/java_version_osx_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/java_version_win_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/sanity_check_osx_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/sanity_check_win_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/selenium-grid-logo-huge-white.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/selenium-grid-logo-huge.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/selenium-grid-logo-large.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/selenium-grid-logo-small.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/selenium-grid-logo.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/selenium_grid_logo_large.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/images/update_path_win_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/doc/website/javascripts/shadedborder.js +267 -0
- data/vendor/selenium-grid-1.0.4/doc/website/stylesheets/document.css +82 -0
- data/vendor/selenium-grid-1.0.4/doc/website/stylesheets/faq.css +97 -0
- data/vendor/selenium-grid-1.0.4/doc/website/stylesheets/home.css +133 -0
- data/vendor/selenium-grid-1.0.4/doc/website/stylesheets/openqa.css +72 -0
- data/vendor/selenium-grid-1.0.4/doc/website/stylesheets/site.css +74 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/Capfile +276 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/etc/background.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/etc/background.svg +163 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/lib/selenium_grid/aws/cloud.rb +35 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/lib/selenium_grid/aws/ec2.rb +7 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/lib/selenium_grid/aws/ec2_client.rb +54 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/lib/selenium_grid/aws/hub.rb +22 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/lib/selenium_grid/aws/remote_command.rb +47 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/lib/selenium_grid/aws/server.rb +56 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/test/unit/all_test.rb +2 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/test/unit/cloud_test.rb +27 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/test/unit/ec2_client_test.rb +137 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/test/unit/hub_test.rb +24 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/test/unit/remote_command_test.rb +46 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/test/unit/server_test.rb +22 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/test/unit/test_helper.rb +4 -0
- data/vendor/selenium-grid-1.0.4/examples/ec2/vnc_password +1 -0
- data/vendor/selenium-grid-1.0.4/examples/java/Java Example.iml +18 -0
- data/vendor/selenium-grid-1.0.4/examples/java/build.xml +90 -0
- data/vendor/selenium-grid-1.0.4/examples/java/src/com/thoughtworks/selenium/grid/examples/java/GoogleImageTestBase.java +46 -0
- data/vendor/selenium-grid-1.0.4/examples/java/src/com/thoughtworks/selenium/grid/examples/java/ParisTest.java +50 -0
- data/vendor/selenium-grid-1.0.4/examples/java/src/com/thoughtworks/selenium/grid/examples/java/PerigordTest.java +42 -0
- data/vendor/selenium-grid-1.0.4/examples/java/target/classes/com/thoughtworks/selenium/grid/examples/java/GoogleImageTestBase.class +0 -0
- data/vendor/selenium-grid-1.0.4/examples/java/target/classes/com/thoughtworks/selenium/grid/examples/java/ParisTest.class +0 -0
- data/vendor/selenium-grid-1.0.4/examples/java/target/classes/com/thoughtworks/selenium/grid/examples/java/PerigordTest.class +0 -0
- data/vendor/selenium-grid-1.0.4/examples/java/testng-slow.xml +9 -0
- data/vendor/selenium-grid-1.0.4/examples/java/testng.xml +9 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/README +66 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/Rakefile +101 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/Ruby Example.iml +17 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/flickr_example.rb +16 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/lib/array_extension.rb +13 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/lib/multi_process_behaviour_runner.rb +28 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/paris_spec.rb +34 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/perigord_spec.rb +22 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/spec_helper.rb +59 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_04b8969da99c51289f692b41abbf271b_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_04b8969da99c51289f692b41abbf271b_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_280fd974268e3aecb89fbfbee25b5322_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_280fd974268e3aecb89fbfbee25b5322_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_8808fb9026e023f809d50ddc9cf00cd3_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_8808fb9026e023f809d50ddc9cf00cd3_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_94b209474d36add5ba908f308c63aa15_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_94b209474d36add5ba908f308c63aa15_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_a18dd8ce90cb4681d55b2148326ff085_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_a18dd8ce90cb4681d55b2148326ff085_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_b877a400a718a915c95038427389e0d9_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_b877a400a718a915c95038427389e0d9_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_c1c6e8109e89867b52f6e123b8847b85_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_c1c6e8109e89867b52f6e123b8847b85_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_c9e7156818e496f6abb983a9a1725295_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_c9e7156818e496f6abb983a9a1725295_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_d6b2848186a7e4a73e19692c0fab2ae5_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_d6b2848186a7e4a73e19692c0fab2ae5_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_e30337afe445f0b6ebd29ecfaf4cd9f0_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_e30337afe445f0b6ebd29ecfaf4cd9f0_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_edc2da92cbf119e95eae988bb6f80792_page_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/examples/ruby/tmp/resources/test_report/example_edc2da92cbf119e95eae988bb6f80792_system_screenshot.png +0 -0
- data/vendor/selenium-grid-1.0.4/grid_configuration.yml +46 -0
- data/vendor/selenium-grid-1.0.4/lib/build/common-build.xml +228 -0
- data/vendor/selenium-grid-1.0.4/lib/ruby/file_extensions.rb +9 -0
- data/vendor/selenium-grid-1.0.4/lib/ruby/java/classpath.rb +28 -0
- data/vendor/selenium-grid-1.0.4/lib/ruby/java/vm.rb +31 -0
- data/vendor/selenium-grid-1.0.4/lib/ruby/s_grid/hub.rb +29 -0
- data/vendor/selenium-grid-1.0.4/lib/ruby/s_grid/remote_control.rb +40 -0
- data/vendor/selenium-grid-1.0.4/lib/ruby/tcp_socket_extensions.rb +23 -0
- data/vendor/selenium-grid-1.0.4/lib/selenium-grid-demo-1.0.4.jar +0 -0
- data/vendor/selenium-grid-1.0.4/lib/selenium-grid-demo-standalone-1.0.4.jar +0 -0
- data/vendor/selenium-grid-1.0.4/lib/selenium-grid-hub-1.0.4.jar +0 -0
- data/vendor/selenium-grid-1.0.4/lib/selenium-grid-hub-standalone-1.0.4.jar +0 -0
- data/vendor/selenium-grid-1.0.4/lib/selenium-grid-remote-control-1.0.4.jar +0 -0
- data/vendor/selenium-grid-1.0.4/lib/selenium-grid-remote-control-standalone-1.0.4.jar +0 -0
- data/vendor/selenium-grid-1.0.4/lib/selenium-grid-tools-1.0.4.jar +0 -0
- data/vendor/selenium-grid-1.0.4/lib/selenium-grid-tools-standalone-1.0.4.jar +0 -0
- data/vendor/selenium-grid-1.0.4/lib/testng.policy +11 -0
- data/vendor/selenium-grid-1.0.4/log/test.txt +1 -0
- data/vendor/selenium-grid-1.0.4/project.properties +4 -0
- data/vendor/selenium-grid-1.0.4/sample-scripts/kill-rcs.sh +3 -0
- data/vendor/selenium-grid-1.0.4/sample-scripts/launch-rc.sh +4 -0
- data/vendor/selenium-grid-1.0.4/sample-scripts/launch-rcs.sh +5 -0
- data/vendor/selenium-grid-1.0.4/sample-scripts/launch-remote-controls.rb +20 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/Command line test.html +218 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/classes.html +44 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/groups.html +5 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/index.html +6 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/main.html +2 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/methods-alphabetical.html +12 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/methods-not-run.html +2 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/methods.html +12 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/reporter-output.html +1 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/testng.xml.html +1 -0
- data/vendor/selenium-grid-1.0.4/target/reports/Selenium Grid Demo In Parallel/toc.html +30 -0
- data/vendor/selenium-grid-1.0.4/target/reports/emailable-report.html +117 -0
- data/vendor/selenium-grid-1.0.4/target/reports/index.html +9 -0
- data/vendor/selenium-grid-1.0.4/vendor/commons-logging-1.0.4.jar +0 -0
- data/vendor/selenium-grid-1.0.4/vendor/selenium-java-client-driver-1.0.1.jar +0 -0
- data/vendor/selenium-grid-1.0.4/vendor/selenium-server-1.0.3.jar +0 -0
- data/vendor/selenium-grid-1.0.4/vendor/testng-5.7-jdk15.jar +0 -0
- metadata +296 -0
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,686 @@
|
|
1
|
+
Title: Selenium Grid FAQ
|
2
|
+
CSS: stylesheets/site.css stylesheets/document.css stylesheets/faq.css
|
3
|
+
Use numbered headers: false
|
4
|
+
|
5
|
+
<div class="header">
|
6
|
+
<a href="index.html"><img alt="Selenium_grid_logo_large" src="images/selenium-grid-logo-large.png"/></a>
|
7
|
+
<p>FAQ</p>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
Table Of Content:
|
11
|
+
{: class=toc}
|
12
|
+
|
13
|
+
* This will become a table of contents (this text will be scraped).
|
14
|
+
{:toc}
|
15
|
+
|
16
|
+
General
|
17
|
+
=======
|
18
|
+
|
19
|
+
Would you recommend using Selenium Grid for performance/Load testing?
|
20
|
+
---------------------------------------------------------------------
|
21
|
+
|
22
|
+
Selenium Grid is not designed for performance and load testing, but very
|
23
|
+
efficient web acceptance/functional testing. The main reason for this is
|
24
|
+
that conducting performance/load testing with real browser is a pretty bad
|
25
|
+
idea as it is hard/expensive to scale the load and the actual load is very
|
26
|
+
inconsistent.
|
27
|
+
|
28
|
+
For load/performance testing I would advise using tools like JMeter, Grinder
|
29
|
+
or httperf. What you can do though, is reuse your selenium tests to record
|
30
|
+
the use cases you will use for your load testing. If you really want to
|
31
|
+
conduct load testing with Selenium, check out [Browser Mob](http://browsermob.com/welcome).
|
32
|
+
|
33
|
+
To simulate 200 concurrent users for instance, you would need 200 concurrent
|
34
|
+
browsers with a load testing framework based on Selenium Grid. Even if you
|
35
|
+
use Firefox on Linux (so the most efficient setup) you will probably need at
|
36
|
+
least 10 machines to generate that kind of load. Quite insane when
|
37
|
+
JMeter/Grinder/httperf can generate the same kind of load with a single
|
38
|
+
machine.
|
39
|
+
|
40
|
+
Installing
|
41
|
+
==========
|
42
|
+
|
43
|
+
Do you have step by step, "assume I am an idiot", installation instructions?
|
44
|
+
------------------------------------------------------------------------------
|
45
|
+
|
46
|
+
First if you are trying out Selenium Grid you are certainly *not* an idiot. ;-)
|
47
|
+
Second, yes we do have step by step installation instructions, check out:
|
48
|
+
|
49
|
+
* [Step by Step Installation Instructions for Windows](./step_by_step_installation_instructions_for_windows.html)
|
50
|
+
* [Step by Step Installation Instructions for Mac OS X](./step_by_step_installation_instructions_for_osx.html)
|
51
|
+
|
52
|
+
|
53
|
+
Running the Demo
|
54
|
+
================
|
55
|
+
|
56
|
+
Tests Are Failing When I Run the Demo. How can I troubleshoot the problem?
|
57
|
+
--------------------------------------------------------------------------
|
58
|
+
|
59
|
+
> I started the Hub on the UNIX machine and then I've created 2
|
60
|
+
> remote controls on a Window laptop. This part worked and I can see the
|
61
|
+
> Hub console listing the 2 remote controls.
|
62
|
+
> When I start `ant run-demo-in-parallel` on the UNIX box, however, the
|
63
|
+
> following error appears:
|
64
|
+
>
|
65
|
+
[java] ===============================================
|
66
|
+
[java] Selenium Grid Demo In Parallel
|
67
|
+
[java] Total tests run: 4, Failures: 4, Skips: 0
|
68
|
+
[java] ===============================================
|
69
|
+
>
|
70
|
+
> How can I investigate the problem?
|
71
|
+
|
72
|
+
Here are a few things you can do to try to understand what is going on:
|
73
|
+
|
74
|
+
* Look at the TestNG report under `target/reports/index.html` on the test
|
75
|
+
runner machine (the UNIX one in your case), looking for the actual error
|
76
|
+
messages / stack traces.
|
77
|
+
|
78
|
+
* Check the Hub and remote control logs under the `log/` directory
|
79
|
+
|
80
|
+
* Look at the Windows machine where the remote controls are running: Are the
|
81
|
+
remote controls logging any command at all? Are browsers popping up at
|
82
|
+
least? Take a good look at the Selenium Remote Control logs while the tests
|
83
|
+
are running.
|
84
|
+
|
85
|
+
If the remote controls on the Windows machine are not even contacted, this
|
86
|
+
is most likely to be a setting/network/browser configuration problem. Check
|
87
|
+
the way you launched the hub and the remote controls, as well as your
|
88
|
+
network.
|
89
|
+
|
90
|
+
If the remote controls on the windows machine are contacted but fail to run
|
91
|
+
the tests properly, this is probably just a problem on the local machine.
|
92
|
+
Try to run Selenium Grid demo exclusively on this machine (or any Selenium
|
93
|
+
Test you have) to understand the nature of the problem in a less complex
|
94
|
+
environment.
|
95
|
+
|
96
|
+
If finding the actual problem still end up being hard, please
|
97
|
+
[post a message in the Selenium Grid forum](http://clearspace.openqa.org/community/selenium/advanced)
|
98
|
+
with precise information on:
|
99
|
+
|
100
|
+
* The O.S. and browser combination that you are using
|
101
|
+
* Whether you see browsers popping up or not
|
102
|
+
* A screenshot of the Hub console before you launch the tests
|
103
|
+
(The console can usually be accessed at http://localhost:4444/console
|
104
|
+
on the machine running the Hub)
|
105
|
+
* The test client side errors (TestNG reports)
|
106
|
+
* Selenium Grid Hub logs (`log/hub.log`)
|
107
|
+
* Remote Control logs (`log/rc-*.log`)
|
108
|
+
|
109
|
+
|
110
|
+
Running the Demo Using a Different Browser
|
111
|
+
------------------------------------------
|
112
|
+
|
113
|
+
> When i run the selenium grid demo then all remote control by default launched Firefox.
|
114
|
+
> so how and where could I update the browser name incase of Selenium Grid.
|
115
|
+
|
116
|
+
|
117
|
+
Here is how you would do to run the demo with the Safari web browser for instance.
|
118
|
+
|
119
|
+
Launch the Hub the standard way:
|
120
|
+
|
121
|
+
ant launch-hub
|
122
|
+
|
123
|
+
Launch a remote control declaring that it provides the Safari environment:
|
124
|
+
|
125
|
+
ant -Denvironment="*safari" launch-remote-control
|
126
|
+
|
127
|
+
Launch the other remote controls the same way:
|
128
|
+
|
129
|
+
ant -Denvironment="*safari" -Dport=5556 launch-remote-control
|
130
|
+
ant -Denvironment="*safari" -Dport=5557 launch-remote-control
|
131
|
+
|
132
|
+
Launch the demo overriding the browser system property:
|
133
|
+
|
134
|
+
ant -Dbrowser="*safari" run-demo-in-parallel
|
135
|
+
|
136
|
+
Voila! you're done!
|
137
|
+
|
138
|
+
If you are using Ruby automation (power to you), you can also achieve the
|
139
|
+
same thing easily:
|
140
|
+
|
141
|
+
Launch the Hub the standard way:
|
142
|
+
|
143
|
+
rake hub:start
|
144
|
+
|
145
|
+
Launch the remote controls declaring that they provides the Safari environment:
|
146
|
+
|
147
|
+
rake rc:start_all ENVIRONMENT=*safari
|
148
|
+
|
149
|
+
Launch the demo overriding the browser system property:
|
150
|
+
|
151
|
+
ant -Dbrowser="*safari" run-demo-in-parallel
|
152
|
+
|
153
|
+
|
154
|
+
Customizing Selenium Grid
|
155
|
+
=========================
|
156
|
+
|
157
|
+
Can I change the version of Selenium RC used by the Grid?
|
158
|
+
---------------------------------------------------------
|
159
|
+
|
160
|
+
Every remote control that you launch with `ant launch-remote-control` or
|
161
|
+
`rake rc:start` is using the first Selenium Remote Control standalone jar
|
162
|
+
packaged in the `vendor` directory whose name matches `selenium-server-*.jar`.
|
163
|
+
|
164
|
+
To use your own version of Selenium Remote Control, just
|
165
|
+
delete the `vendor/selenium-server-*.jar` file that comes with Selenium
|
166
|
+
Grid distribution and replace it any standalone Remote Control jar that
|
167
|
+
you fancy! This technique is especially useful to workaround
|
168
|
+
regressions in Remote Control nightly builds...
|
169
|
+
|
170
|
+
Analysing Failures
|
171
|
+
==================
|
172
|
+
|
173
|
+
|
174
|
+
When we test the application with Selenium Grid, we get nondeterministic results
|
175
|
+
--------------------------------------------------------------------------------
|
176
|
+
|
177
|
+
> Locally, when we test the application with Selenium Grid, we get
|
178
|
+
> nondeterministic results. Tests seem to fail randomly. Messing with the
|
179
|
+
> number of nodes in the grid seems to help, but its really annoying that we
|
180
|
+
> can't seem to get consistent results.
|
181
|
+
|
182
|
+
Most likely some tests are timing out in a non-deterministic manner because
|
183
|
+
your CPU or Network is over-utilized. Monitor your CPU and Network activity on
|
184
|
+
all the machines involved. Once you find the bottleneck launch fewer
|
185
|
+
processes. For instance if your load average is way higher than the number of
|
186
|
+
CPUs on the machine running the remote controls, cut the number of remote
|
187
|
+
controls you launch by two until you get to a sustainable machine load.
|
188
|
+
|
189
|
+
Make sure you spend some time figuring out the optimal number of
|
190
|
+
concurrent test runners and remote controls to run in parallel on each
|
191
|
+
machine, before deploying a Selenium Grid infrastructure your organization
|
192
|
+
is going to depend on.
|
193
|
+
|
194
|
+
|
195
|
+
Managing the Hub and the Remote Controls
|
196
|
+
=========================================
|
197
|
+
|
198
|
+
How can I shutdown Selenium Grid Hub?
|
199
|
+
-------------------------------------
|
200
|
+
|
201
|
+
If you are using the rake task provided with Selenium Grid you can just
|
202
|
+
run:
|
203
|
+
|
204
|
+
rake hub:stop
|
205
|
+
|
206
|
+
If Rake is not an option or you want to hook your instrumentation logic
|
207
|
+
you can also shutdown the Hub with a single HTTP request. You need to
|
208
|
+
submit a POST request to the Hub targeting `/lifecycle-manager` with a
|
209
|
+
parameter `action=shutdown`. For instance if the Hub is running on
|
210
|
+
`localhost` on port `4444` you could shut it down with:
|
211
|
+
|
212
|
+
curl -d action=shutdown http://localhost:4444/lifecycle-manager
|
213
|
+
|
214
|
+
or
|
215
|
+
|
216
|
+
wget --post-data action=shutdown action=shutdown http://localhost:4444/lifecycle-manager
|
217
|
+
|
218
|
+
|
219
|
+
How can I pass additional parameters to the Remote Controls when starting them as part of Selenium Grid?
|
220
|
+
--------------------------------------------------------------------------------------------------------
|
221
|
+
|
222
|
+
Additional parameters can be passed to Selenium remote controls at startup
|
223
|
+
|
224
|
+
Just set the `seleniumArgs` Java property when launching the remote control.
|
225
|
+
For instance, to start a remote control in multi window and debug mode you
|
226
|
+
would use:
|
227
|
+
|
228
|
+
ant -DseleniumArgs="-multiWindow -debug" launch-remote-control
|
229
|
+
|
230
|
+
Of course you can also achieve the same thing with the Rake task:
|
231
|
+
|
232
|
+
rake hub:start SELENIUM_ARGS="-multiWindow -debug"
|
233
|
+
|
234
|
+
|
235
|
+
How can I use the `-firefoxProfileTemplate` option on Windows?
|
236
|
+
--------------------------------------------------------------
|
237
|
+
|
238
|
+
On OS X or UNIX, you can use a custom Firefox profile with Selenium
|
239
|
+
Grid by launching the remote controls with the `-firefoxProfileTemplate`
|
240
|
+
option:
|
241
|
+
|
242
|
+
ant -DseleniumArgs="-firefoxProfileTemplate /path/to/my_profile" launch-remote-control
|
243
|
+
|
244
|
+
On Windows figuring out the right path to provide for your profile
|
245
|
+
can be confusing espcially if you file path contains spaces
|
246
|
+
(like `\Documents and Settings`). Just make sure you are
|
247
|
+
providing the short filename (visible with a `dir /x`) and everything
|
248
|
+
will be fine.
|
249
|
+
|
250
|
+
I need to run the Hub and Remote Control in background.... How can I do it?
|
251
|
+
------------------------------------------------------------------------
|
252
|
+
|
253
|
+
On UNIX you just add a ampersand at the end of the command line. See:
|
254
|
+
|
255
|
+
* [Working with the UNIX shell](http://www.washington.edu/computing/unix/startdoc/shell.html)
|
256
|
+
* [`nohup`](http://en.wikipedia.org/wiki/Nohup)
|
257
|
+
|
258
|
+
On Windows you can use "start /wait/ /b" : Check out the [`start` command reference](http://www.ss64.com/nt/start.html) for more details.
|
259
|
+
|
260
|
+
This said, if you are running on a UNIX platform or Mac OS X, the
|
261
|
+
easiest way to start the Hub and Remote Controls is to use the Rake
|
262
|
+
tasks that come with Selenium Grid distribution.
|
263
|
+
`cd` to the root of the Selenium distribution and type:
|
264
|
+
|
265
|
+
rake hub:start BACKGROUND=true
|
266
|
+
|
267
|
+
Which will launch the hub in the background. You can then launch
|
268
|
+
remote controls in the background with:
|
269
|
+
|
270
|
+
rake rc:start PORT=4445 BACKGROUND=true
|
271
|
+
|
272
|
+
In practice, it is actually easier to launch the hub and all
|
273
|
+
the remote controls in the background with a single command:
|
274
|
+
|
275
|
+
rake all:start
|
276
|
+
|
277
|
+
Of course you can also stop them all in a similar way:
|
278
|
+
|
279
|
+
rake all:start
|
280
|
+
|
281
|
+
When starting Firefox I get: java java.lang.RuntimeException: Firefox refused shutdown while preparing a profile"
|
282
|
+
------------------------------------------------------------------------------------------------------------------
|
283
|
+
|
284
|
+
> Here is my log on this error:
|
285
|
+
> ...
|
286
|
+
> java Caused by: org.seleniumhq.selenium.server.browserlaunchers.FirefoxChromeLauncher$FileLockRemainedException: Lock file still present! C:\DOKUME1\Semadou\LOKALE1\Temp\customProfileDir9d4a3879bb7d4ca5b75dbbb488ec30b1\parent.lock
|
287
|
+
|
288
|
+
|
289
|
+
Sometimes Selenium Remote Control does not stop Firefox properly on Windows
|
290
|
+
and things get very messy (leaving lock files behind). This does happen when
|
291
|
+
you Ctrl-C while running the test suite for instance.
|
292
|
+
|
293
|
+
If you encounter this problem, I would advise you to:
|
294
|
+
|
295
|
+
* Kill all running Firefox instances and make sure that there is no Firefox process in the task manager (or even better reboot)
|
296
|
+
* Delete all the directories: `C:\DOCUME1\<your login>\LOCALS1\Temp\customProfileDir*`
|
297
|
+
* While you are at it cleanup `C:\DOCUME1\<your login>\LOCALS1\Temp as much as possible`
|
298
|
+
* Run your tests or the demo again
|
299
|
+
|
300
|
+
Why do I have duplicate entries in the Hub after restarting my Remote Controls?
|
301
|
+
------------------------------------------------------------------------
|
302
|
+
|
303
|
+
> Say I have a hub setup with three RCs ready and waiting, and then I
|
304
|
+
> go and restart those RCs, my hub now shows 6 RCs even though there are
|
305
|
+
> actually only 3. Is this anything to worry about? Will the hub try
|
306
|
+
> to send requests to the "dead" entries? Do I have to restart the hub
|
307
|
+
> every time I need to restart and RC?
|
308
|
+
|
309
|
+
You are probably stopping the remote controls a little too "harshly"? For
|
310
|
+
instance, if you do a `kill -9` or use Windows task manager, the JVM shutdown
|
311
|
+
hook does not have a chance to unregister the remote control and the Hub
|
312
|
+
does not realize that the remote control is gone.
|
313
|
+
|
314
|
+
But if you stop the remote control in a more "civil" manner everything should
|
315
|
+
be fine (e.g. `kill` or using the shutdown method in selenium client api).
|
316
|
+
Even better use the Rake tasks provided with Selenium Grid distribution:
|
317
|
+
`rake rc:start_all` and `rake rc:stop_all` multiple times on my machine.
|
318
|
+
|
319
|
+
If you end up in this state I do recommend that you restart the Hub which
|
320
|
+
would otherwise end up in a "non predictable state". Future releases of
|
321
|
+
Selenium Grid will take care of this problem transparently, but for now a
|
322
|
+
restart is safer.
|
323
|
+
|
324
|
+
Can I configure the Remote Control to use a custom HTTP/HTTPS proxy?
|
325
|
+
--------------------------------------------------------------------
|
326
|
+
|
327
|
+
To use custom http proxy settings set the `http.proxyHost` and the
|
328
|
+
`http.proxyPort` java system properties when starting the remote
|
329
|
+
controls and the hub.
|
330
|
+
|
331
|
+
For instance:
|
332
|
+
|
333
|
+
ant -Dhttp.proxyHost=my_proxy.my_company.com -Dhttp.proxyPort=3128 launch-hub
|
334
|
+
ant -Dhttp.proxyHost=my_proxy.my_company.com -Dhttp.proxyPort=3128 launch-remote-control
|
335
|
+
|
336
|
+
Note that the JVM use different properties for http and https
|
337
|
+
proxies. So if you also want to use the same proxy for http *and* https
|
338
|
+
you need to use:
|
339
|
+
|
340
|
+
ant -Dhttp.proxyHost=my_proxy.my_company.com -Dhttp.proxyPort=3128 \
|
341
|
+
-Dhttps.proxyHost=my_proxy.my_company.com -Dhttps.proxyPort=3128 \
|
342
|
+
launch-hub
|
343
|
+
|
344
|
+
ant -Dhttp.proxyHost=my_proxy.my_company.com -Dhttp.proxyPort=3128 \
|
345
|
+
-Dhttps.proxyHost=my_proxy.my_company.com -Dhttps.proxyPort=3128 \
|
346
|
+
launch-remote-control
|
347
|
+
|
348
|
+
Running the Examples Included in Selenium Grid Distribution
|
349
|
+
===========================================================
|
350
|
+
|
351
|
+
How to run the Java example?
|
352
|
+
----------------------------
|
353
|
+
|
354
|
+
1. Go to the root directory of your Selenium Grid distribution
|
355
|
+
|
356
|
+
2. Launch Selenium Grid Hub and 4 remote controls as explained in
|
357
|
+
["Run the Demo"](http://selenium-grid.seleniumhq.org/run_the_demo.html)
|
358
|
+
|
359
|
+
3. Go to the Java example directory: `cd ./examples/java`
|
360
|
+
|
361
|
+
4. Launch the tests with: `ant run`
|
362
|
+
|
363
|
+
How to Run the Ruby Example?
|
364
|
+
----------------------------
|
365
|
+
|
366
|
+
1. Go to the root directory of your Selenium Grid distribution
|
367
|
+
|
368
|
+
2. (Re)start Selenium Grid Hub and the remote controls with:
|
369
|
+
`rake all:restart`
|
370
|
+
|
371
|
+
3. Go to the Ruby example directory: `cd ./examples/ruby`
|
372
|
+
|
373
|
+
4. Launch the tests with: `rake tests:run_in_parallel`
|
374
|
+
|
375
|
+
|
376
|
+
The Ruby Example Does Not Seem to Work on Windows!
|
377
|
+
--------------------------------------------------
|
378
|
+
|
379
|
+
> When running the Ruby example on Windows I get:
|
380
|
+
>
|
381
|
+
> `[DeepTest] Started DeepTest service at druby://0.0.0.0:6969
|
382
|
+
> c:/ruby/lib/ruby/gems/1.8/gems/deep_test-1.2.2/lib/deep_test.rb:15:in fork: the fork() function is unimplemented on this machine (NotImplementedError)`
|
383
|
+
|
384
|
+
This is expected. The Ruby example will *not* work on Windows.
|
385
|
+
|
386
|
+
The Ruby example demonstrates best practices for high ROI in-browser web
|
387
|
+
testing in Ruby. As a consequence it relies on
|
388
|
+
[DeepTest](http://deep-test.rubyforge.org), the best parallel and distributed
|
389
|
+
test runner available for Ruby. In turns, DeepTest make extensive use of
|
390
|
+
`Kernel.fork()`... which is not implemented on Windows.
|
391
|
+
|
392
|
+
This is not really a problem as the Ruby community has widely embraced the
|
393
|
+
Mac OS X and UNIX platforms which provide a far better environment to
|
394
|
+
execute your tests. Besides, with Selenium Grid (or Selenium RC) it is very
|
395
|
+
simple to run your tests on UNIX while driving a web browser running on
|
396
|
+
Windows. So there is no need to run your tests on Windows to test a Windows'
|
397
|
+
browser. Consequently I strongly advise to always run your tests on Linux or
|
398
|
+
Mac OS X and just target a Selenium RC running on a Windows platform when
|
399
|
+
you need to test Internet Explorer. You will also save yourself a lot of
|
400
|
+
headaches as very few Ruby users run on Windows anyway...
|
401
|
+
|
402
|
+
|
403
|
+
Running the Ruby Example Using a Different Browser
|
404
|
+
--------------------------------------------------
|
405
|
+
|
406
|
+
Here is how you would do to run the Ruby example with the Safari web browser for instance.
|
407
|
+
|
408
|
+
Launch the Hub the standard way (from the root of Selenium Grid distribution):
|
409
|
+
|
410
|
+
rake hub:start
|
411
|
+
|
412
|
+
Launch a bunch of remote controls declaring that they provides the Safari environment:
|
413
|
+
|
414
|
+
rake rc:start_all ENVIRONMENT=*safari
|
415
|
+
|
416
|
+
Launch the tests overriding the browser environment variable:
|
417
|
+
|
418
|
+
cd examples/ruby
|
419
|
+
rake tests:run_in_parallel SELENIUM_RC_BROWSER="*safari"
|
420
|
+
|
421
|
+
Voila! you're done!
|
422
|
+
|
423
|
+
|
424
|
+
Running Your Tests Against Selenium Grid
|
425
|
+
========================================
|
426
|
+
|
427
|
+
I have some test cases and I want to run them against Selenium Grid, what do I need to do?
|
428
|
+
------------------------------------------------------------------------------------------
|
429
|
+
|
430
|
+
The idea is that all you have to do to take advantage of the Selenium Grid
|
431
|
+
is to point your Selenium client driver to the Hub and run your tests in
|
432
|
+
parallel.
|
433
|
+
|
434
|
+
### Java ###
|
435
|
+
|
436
|
+
If you writing your tests using Java, the best is to run your
|
437
|
+
tests with [TestNG parallel runner](http://testng.org/doc/documentation-main.html#parallel-running).
|
438
|
+
|
439
|
+
You can find a concrete example on
|
440
|
+
how this can be achieved in the standard Selenium Grid distribution under
|
441
|
+
the [`examples/java`](http://svn.seleniumhq.org/svn/selenium-grid/trunk/examples/java/)
|
442
|
+
directory.
|
443
|
+
|
444
|
+
### Ruby ###
|
445
|
+
|
446
|
+
If you use Ruby, the best is to use
|
447
|
+
[DeepTest](http://deep-test.rubyforge.org) which can even distribute the test run
|
448
|
+
accross multiple machines.
|
449
|
+
|
450
|
+
You can find a concrete example (a nice test reports) on
|
451
|
+
how this can be achieved in the standard Selenium Grid distribution under
|
452
|
+
the [`examples/ruby`](http://svn.seleniumhq.org/svn/selenium-grid/trunk/examples/ruby/)
|
453
|
+
directory.
|
454
|
+
|
455
|
+
### Python ###
|
456
|
+
|
457
|
+
I have no experience in Python so I do not know what the best solution is.
|
458
|
+
Nevertheless, I can give you the theory and some starting points.
|
459
|
+
|
460
|
+
Basically you need to come up with a way to run your python tests in
|
461
|
+
parallel. How exactly you achieve this usually depends on your testing
|
462
|
+
framework and programming language of choice. I am not personally aware of
|
463
|
+
any parallel test runner for Python but a little Googling found the
|
464
|
+
following starting points that you could investigate:
|
465
|
+
|
466
|
+
* [`py.test` distributed testing section](https://codespeak.net/py/dist/test.html#automated-distributed-testing)
|
467
|
+
* [Parallel Python](http://www.parallelpython.com/)
|
468
|
+
* [Testoob](http://testoob.sourceforge.net/features.html)
|
469
|
+
* [Mailing list archive on parallel testing in Python](http://lists.idyll.org/pipermail/testing-in-python/2007-December/thread.html#463)
|
470
|
+
|
471
|
+
If none of this is helpful, worst case scenario, you can also write your own
|
472
|
+
parallel test runner by launching multiple processes targeting different
|
473
|
+
test file sets and checking the process exit statuses. Not the most
|
474
|
+
elegant/efficient way, but that can get you started. This is actually the
|
475
|
+
way I originally started with Ruby and you can find an example on how this
|
476
|
+
worked in the Ruby example included in Selenium Grid distribution:
|
477
|
+
|
478
|
+
[`examples/ruby/lib/multi_process_behaviour_runner.rb`](http://svn.seleniumhq.org/svn/selenium-grid/trunk/examples/ruby/lib/multi_process_behaviour_runner.rb)
|
479
|
+
|
480
|
+
You launch the whole thing with:
|
481
|
+
|
482
|
+
#
|
483
|
+
# Legacy way to drive tests in parallel before DeepTest RSpec support.
|
484
|
+
# Kept to document a simple way to run the tests in parallel for non-Ruby
|
485
|
+
# platforms.
|
486
|
+
#
|
487
|
+
desc("[DEPRECATED] Run all behaviors in parallel spawing multiple
|
488
|
+
processes. DeepTest offers a better alternative.")
|
489
|
+
task :'tests:run_in_parallel:multiprocess' => :create_report_dir do
|
490
|
+
require File.expand_path(File.dirname(__FILE__) +
|
491
|
+
'/lib/multi_process_behaviour_runner')
|
492
|
+
runner = MultiProcessSpecRunner.new(10)
|
493
|
+
runner.run(Dir['*_spec.rb'])
|
494
|
+
end
|
495
|
+
|
496
|
+
Good luck in your quest for the ultimate Python parallel test runner. Please
|
497
|
+
[contact me](http://ph7spot.com/about/contact_me) if you figure out the best
|
498
|
+
solution for Python, I will put it in the documentation. Even better,
|
499
|
+
send me an example, I will include it in Selenium Grid distribution.
|
500
|
+
|
501
|
+
### .Net ###
|
502
|
+
|
503
|
+
I have no expertise in .Net but [Gallio](http://www.gallio.org/)
|
504
|
+
seems to be able to [run tests in parallel](http://igorbrejc.net/development/continuous-integration/gallio-running-tests-in-parallel)
|
505
|
+
|
506
|
+
### Other ###
|
507
|
+
|
508
|
+
To take advantage of Selenium Grid power, you need to come up with a way to
|
509
|
+
run your tests in parallel. How exactly you achieve this usually depends on
|
510
|
+
your testing framework and programming language of choice. Try
|
511
|
+
googling around for a parallel or distributed test runner for your language.
|
512
|
+
|
513
|
+
If you cannot find any, your fallback plan is to write your own parallel
|
514
|
+
test runner by launching multiple processes targeting different test file
|
515
|
+
sets and checking the process exit statuses. Not the most elegant/efficient
|
516
|
+
way, but that can get you started. This is actually the way I originally
|
517
|
+
started with Ruby and you can find an example on how this worked in the Ruby
|
518
|
+
example included in Selenium Grid distribution:
|
519
|
+
|
520
|
+
[`examples/ruby/lib/multi_process_behaviour_runner.rb`](http://svn.seleniumhq.org/svn/selenium-grid/trunk/examples/ruby/lib/multi_process_behaviour_runner.rb)
|
521
|
+
|
522
|
+
You launch the whole thing with:
|
523
|
+
|
524
|
+
#
|
525
|
+
# Legacy way to drive tests in parallel before DeepTest RSpec support.
|
526
|
+
# Kept to document a simple way to run the tests in parallel for non-Ruby
|
527
|
+
# platforms.
|
528
|
+
#
|
529
|
+
desc("[DEPRECATED] Run all behaviors in parallel spawing multiple
|
530
|
+
processes. DeepTest offers a better alternative.")
|
531
|
+
task :'tests:run_in_parallel:multiprocess' => :create_report_dir do
|
532
|
+
require File.expand_path(File.dirname(__FILE__) +
|
533
|
+
'/lib/multi_process_behaviour_runner')
|
534
|
+
runner = MultiProcessSpecRunner.new(10)
|
535
|
+
runner.run(Dir['*_spec.rb'])
|
536
|
+
end
|
537
|
+
|
538
|
+
Good luck in your quest for the ultimate parallel test runner for your
|
539
|
+
favorite language. Please [contact me](http://ph7spot.com/about/contact_me) if you
|
540
|
+
figure out the best solution for your language, I will put it in the documentation.
|
541
|
+
Even better, send me an example, I will include it in Selenium Grid
|
542
|
+
distribution.
|
543
|
+
|
544
|
+
Is there a way to generate test reports using Selenium?
|
545
|
+
-------------------------------------------------------
|
546
|
+
|
547
|
+
The short answer is that yes you can generate test reports with Selenium.
|
548
|
+
How to achieve this (and their exact format) will however depend on the
|
549
|
+
programming language and test runner you are using (for instance
|
550
|
+
`JUnit`, `TestNG`, `Test::Unit` or `RSpec`).
|
551
|
+
|
552
|
+
You can look at the [`examples/ruby`](http://svn.seleniumhq.org/svn/selenium-grid/trunk/examples/ruby/)
|
553
|
+
directory in the Selenium Grid
|
554
|
+
distribution to see how you can use RSpec and Selenium to generate reports
|
555
|
+
which [include HTML capture and OS screenshots when a test
|
556
|
+
fail](http://ph7spot.com/examples/rspec_report/index.html).
|
557
|
+
|
558
|
+
My test cases are in HTML (Selenese), how can I run those against Selenium Grid ?
|
559
|
+
------------------------------------------------------------------
|
560
|
+
|
561
|
+
You would need a parallel test runner for Selenium Grid.
|
562
|
+
|
563
|
+
I might eventually end up working on such a parallel test runner for HTML
|
564
|
+
test suites, nevertheless my time is limited and this feature is quite low
|
565
|
+
in my priority list: in my experience HTML test suites are a nightmare
|
566
|
+
to maintain you are better off writing and refactoring real code by the time
|
567
|
+
your test suite grows big enough that it takes too long to run.
|
568
|
+
|
569
|
+
This said, there might be hope as some guys seem to be working on it though: see
|
570
|
+
[this thread](http://clearspace.openqa.org/thread/11482)
|
571
|
+
|
572
|
+
Here are more details on why this feature is not high on my priority list:
|
573
|
+
|
574
|
+
1. I write all my tests using a full-featured programming language
|
575
|
+
(not HTML) because I believe that it is a far better approach
|
576
|
+
to in-browser testing -- especially when it come to maintenance.
|
577
|
+
|
578
|
+
2. If you have enough tests to feel the need for Selenium Grid,
|
579
|
+
then test maintenance should matter to you... and using HTML test
|
580
|
+
cases is not going to help!
|
581
|
+
|
582
|
+
3. I have limited development cycles and work on Selenium grid in my
|
583
|
+
free time. There a lot of other features to work on that are more
|
584
|
+
important to me and my teams.
|
585
|
+
|
586
|
+
4. Selenium Grid is an open-source project. If this running HTML tests
|
587
|
+
in parallel is important enough to a large number of users, somebody
|
588
|
+
will write a patch that I will be glad to incorporate it in the codebase.
|
589
|
+
|
590
|
+
|
591
|
+
My test is not working when I use HTTPS!
|
592
|
+
----------------------------------------
|
593
|
+
|
594
|
+
Selenium and Selenium Grid support HTTPS out-of-the-box. Just make sure
|
595
|
+
you are using one of the "privileged" browser modes,
|
596
|
+
namely `*chrome`, `*hta` and `*safari`.
|
597
|
+
|
598
|
+
How can I avoid SSL certificate popups?
|
599
|
+
---------------------------------------
|
600
|
+
|
601
|
+
First make sure you are using a priviledged browser mode
|
602
|
+
(namely `*chrome`, `*hta` or `*safari`).
|
603
|
+
|
604
|
+
The generic solution is to accept the Certificate manually the first
|
605
|
+
time and run the test again. For Firefox the solution is actually a
|
606
|
+
little more involved and will depend whether your SSL certificate is
|
607
|
+
valid or not:
|
608
|
+
|
609
|
+
### Your SSL Certificate is Valid ###
|
610
|
+
|
611
|
+
1. Generate a Firefox [profile](http://support.mozilla.com/en-US/kb/Profiles)
|
612
|
+
accepting the certificate:
|
613
|
+
|
614
|
+
1. Start Firefox manually
|
615
|
+
|
616
|
+
2. Go to the web page trigerring the certificate popup and
|
617
|
+
accept permanently the certification.
|
618
|
+
|
619
|
+
3. Close Firefox.
|
620
|
+
|
621
|
+
2. Copy the Firefox profile you just changed to a new directory
|
622
|
+
(eg `seleniumFirefoxProfile`). You will typically find the
|
623
|
+
Firefox profile under (`~/Library/Mozilla/Profiles/`,
|
624
|
+
`~/.mozilla/firefox/` or `C:\Documents and settings\%USER%\Application Data\Mozilla\Profiles`).
|
625
|
+
|
626
|
+
|
627
|
+
3. Now start the Selenium Remote Control using the profile you just copied
|
628
|
+
using the `-firefoxProfileTemplate` option.
|
629
|
+
|
630
|
+
java -jar selenium-server-1.0.jar -firefoxProfileTemplate ~/seleniumFirefoxProfile
|
631
|
+
|
632
|
+
Or if you are using Selenium Grid:
|
633
|
+
|
634
|
+
ant -DseleniumArgs="-firefoxProfileTemplate ~/seleniumFirefoxProfile" launch-remote-control
|
635
|
+
|
636
|
+
### Your SSL Certificate is Invalid ###
|
637
|
+
|
638
|
+
When you are running Selenium Grid against Developement or QA
|
639
|
+
environments you can run into invalid SSL certificated (expired
|
640
|
+
certificate for instance).
|
641
|
+
|
642
|
+
In that case not only accept permanently the certificate but
|
643
|
+
also install the "Remember Mismatch" Firefox plugin when generating
|
644
|
+
the firefox profile you will use for Selenium.
|
645
|
+
|
646
|
+
If you are desperate, there is another solution (quite brutal):
|
647
|
+
When you generate the Firefox profile to use for Selenium,
|
648
|
+
type about:copy in the browser address line. Then Search every
|
649
|
+
`security.warn` attribute and set it to false!
|
650
|
+
|
651
|
+
I get some strange errors when I run multiple Internet Explorer instances on the same machine
|
652
|
+
---------------------------------------------------------------------------------------------
|
653
|
+
|
654
|
+
Selenium Grid does not officially support running multiple Internet
|
655
|
+
Explorer on a _single_ Windows machine. This is mostly because:
|
656
|
+
|
657
|
+
* People who know IE better than I do (Dan Fabulich) tell me that if
|
658
|
+
you run 2 browsers as the same user in HTA mode they end up sharing a
|
659
|
+
singleton instance in memory, which could cause problems.
|
660
|
+
|
661
|
+
* The `*iexplore` mode is changing the registry settings at each
|
662
|
+
session start/end to have IE use a specific Remote Control as HTTP
|
663
|
+
proxy. If you run multiple Remote Controls at the same time you can
|
664
|
+
see the problems coming! ;-)
|
665
|
+
|
666
|
+
**Currently, the only robust solution for running multiple IE instances
|
667
|
+
with Selenium Grid is to use virtualization.**
|
668
|
+
|
669
|
+
This said, I am not satisfied wit the current state of affairs and I
|
670
|
+
am currently working on better support for IE in Selenium Grid 1.2.
|
671
|
+
|
672
|
+
Development
|
673
|
+
===========
|
674
|
+
|
675
|
+
Where can I find Selenium Grid nightly builds?
|
676
|
+
----------------------------------------------
|
677
|
+
|
678
|
+
Download them from Selenium Grid [core build artifacts](http://xserve.seleniumhq.org:8080/view/Selenium%20Grid/job/Grid%20Core%20-%20Mac/lastSuccessfulBuild/artifact/trunk/target/dist/)
|
679
|
+
|
680
|
+
Where Can I Get Feedback Selenium Grid on Continuous Integration Builds?
|
681
|
+
------------------------------------------------------------------------
|
682
|
+
|
683
|
+
Check out latest Selenium Grid builds on
|
684
|
+
[http://xserve.seleniumhq.org:8080/view/Selenium%20Grid](http://xserve.seleniumhq.org:8080/)
|
685
|
+
|
686
|
+
|