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
|
@@ -0,0 +1,163 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
<svg
|
4
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
5
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
6
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
7
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
9
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
10
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
11
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
12
|
+
width="1480"
|
13
|
+
height="1024"
|
14
|
+
id="svg2"
|
15
|
+
sodipodi:version="0.32"
|
16
|
+
inkscape:version="0.45+devel"
|
17
|
+
version="1.0"
|
18
|
+
sodipodi:docname="background.svg"
|
19
|
+
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
20
|
+
inkscape:export-filename="/Users/ph7/Projects/Selenium Grid/trunk/examples/ec2/etc/background.png"
|
21
|
+
inkscape:export-xdpi="90"
|
22
|
+
inkscape:export-ydpi="90">
|
23
|
+
<defs
|
24
|
+
id="defs4">
|
25
|
+
<linearGradient
|
26
|
+
id="linearGradient2998">
|
27
|
+
<stop
|
28
|
+
style="stop-color:#000000;stop-opacity:0.66071427;"
|
29
|
+
offset="0"
|
30
|
+
id="stop3000" />
|
31
|
+
<stop
|
32
|
+
style="stop-color:#000000;stop-opacity:0.19642857;"
|
33
|
+
offset="1"
|
34
|
+
id="stop3002" />
|
35
|
+
</linearGradient>
|
36
|
+
<linearGradient
|
37
|
+
inkscape:collect="always"
|
38
|
+
xlink:href="#linearGradient2998"
|
39
|
+
id="linearGradient3004"
|
40
|
+
x1="648.57147"
|
41
|
+
y1="61.142857"
|
42
|
+
x2="648.57147"
|
43
|
+
y2="995.42859"
|
44
|
+
gradientUnits="userSpaceOnUse" />
|
45
|
+
</defs>
|
46
|
+
<sodipodi:namedview
|
47
|
+
id="base"
|
48
|
+
pagecolor="#ffffff"
|
49
|
+
bordercolor="#666666"
|
50
|
+
borderopacity="1.0"
|
51
|
+
gridtolerance="10000"
|
52
|
+
guidetolerance="10"
|
53
|
+
objecttolerance="10"
|
54
|
+
inkscape:pageopacity="0.0"
|
55
|
+
inkscape:pageshadow="2"
|
56
|
+
inkscape:zoom="1"
|
57
|
+
inkscape:cx="1041.8411"
|
58
|
+
inkscape:cy="399.79368"
|
59
|
+
inkscape:document-units="px"
|
60
|
+
inkscape:current-layer="layer1"
|
61
|
+
showgrid="false"
|
62
|
+
inkscape:window-width="1057"
|
63
|
+
inkscape:window-height="650"
|
64
|
+
inkscape:window-x="77"
|
65
|
+
inkscape:window-y="24" />
|
66
|
+
<metadata
|
67
|
+
id="metadata7">
|
68
|
+
<rdf:RDF>
|
69
|
+
<cc:Work
|
70
|
+
rdf:about="">
|
71
|
+
<dc:format>image/svg+xml</dc:format>
|
72
|
+
<dc:type
|
73
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
74
|
+
</cc:Work>
|
75
|
+
</rdf:RDF>
|
76
|
+
</metadata>
|
77
|
+
<g
|
78
|
+
inkscape:label="Layer 1"
|
79
|
+
inkscape:groupmode="layer"
|
80
|
+
id="layer1">
|
81
|
+
<rect
|
82
|
+
id="rect2419"
|
83
|
+
width="1487.509"
|
84
|
+
height="1024.7954"
|
85
|
+
x="0.63174653"
|
86
|
+
y="-1.0825403"
|
87
|
+
style="fill:url(#linearGradient3004);fill-opacity:1;stroke:none" />
|
88
|
+
<text
|
89
|
+
sodipodi:linespacing="100%"
|
90
|
+
id="text2355"
|
91
|
+
y="398.43076"
|
92
|
+
x="259.96875"
|
93
|
+
style="font-size:144px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#ffd5d5;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Lucida Grande"
|
94
|
+
xml:space="preserve"><tspan
|
95
|
+
y="398.43076"
|
96
|
+
x="259.96875"
|
97
|
+
id="tspan2357"
|
98
|
+
sodipodi:role="line">Selenium Grid</tspan></text>
|
99
|
+
<text
|
100
|
+
xml:space="preserve"
|
101
|
+
style="font-size:144px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#aa0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Lucida Grande"
|
102
|
+
x="257.96875"
|
103
|
+
y="395.43076"
|
104
|
+
id="text2409"
|
105
|
+
sodipodi:linespacing="100%"><tspan
|
106
|
+
sodipodi:role="line"
|
107
|
+
id="tspan2411"
|
108
|
+
x="257.96875"
|
109
|
+
y="395.43076">Selenium Grid</tspan></text>
|
110
|
+
<text
|
111
|
+
sodipodi:linespacing="130%"
|
112
|
+
id="text2345"
|
113
|
+
y="755.77026"
|
114
|
+
x="749.03375"
|
115
|
+
style="font-size:100px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:129.99999523%;writing-mode:lr-tb;text-anchor:middle;fill:#cccccf;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
|
116
|
+
xml:space="preserve"><tspan
|
117
|
+
y="755.77026"
|
118
|
+
x="764.95172"
|
119
|
+
id="tspan2347"
|
120
|
+
sodipodi:role="line">Web Testing That </tspan><tspan
|
121
|
+
y="885.77026"
|
122
|
+
x="749.03375"
|
123
|
+
id="tspan2349"
|
124
|
+
sodipodi:role="line">Doesn't Take Hours!</tspan></text>
|
125
|
+
<text
|
126
|
+
xml:space="preserve"
|
127
|
+
style="font-size:100px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:130%;writing-mode:lr;text-anchor:middle;fill:#333333;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
|
128
|
+
x="745.03375"
|
129
|
+
y="751.77026"
|
130
|
+
id="text2413"
|
131
|
+
sodipodi:linespacing="130%"><tspan
|
132
|
+
sodipodi:role="line"
|
133
|
+
id="tspan2922"
|
134
|
+
x="757.76813"
|
135
|
+
y="751.77026">Web Testing That </tspan><tspan
|
136
|
+
sodipodi:role="line"
|
137
|
+
id="tspan2924"
|
138
|
+
x="745.03375"
|
139
|
+
y="831.77026">Doesn't Take Hours!</tspan></text>
|
140
|
+
<text
|
141
|
+
sodipodi:linespacing="100%"
|
142
|
+
id="text2351"
|
143
|
+
y="539.26727"
|
144
|
+
x="225.04688"
|
145
|
+
style="font-size:64px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Lucida Grande"
|
146
|
+
xml:space="preserve"><tspan
|
147
|
+
y="539.26727"
|
148
|
+
x="225.04688"
|
149
|
+
id="tspan2353"
|
150
|
+
sodipodi:role="line">http://selenium-grid.seleniumhq.org</tspan></text>
|
151
|
+
<text
|
152
|
+
xml:space="preserve"
|
153
|
+
style="font-size:64px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Lucida Grande"
|
154
|
+
x="223.04688"
|
155
|
+
y="537.26727"
|
156
|
+
id="text3008"
|
157
|
+
sodipodi:linespacing="100%"><tspan
|
158
|
+
sodipodi:role="line"
|
159
|
+
id="tspan3010"
|
160
|
+
x="223.04688"
|
161
|
+
y="537.26727">http://selenium-grid.seleniumhq.org</tspan></text>
|
162
|
+
</g>
|
163
|
+
</svg>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module SeleniumGrid
|
2
|
+
module AWS
|
3
|
+
|
4
|
+
class Cloud
|
5
|
+
FILE = "cloud.yml"
|
6
|
+
attr_accessor :hub, :farms
|
7
|
+
|
8
|
+
def self.load
|
9
|
+
begin
|
10
|
+
YAML.load(File.read(FILE))
|
11
|
+
rescue Errno::ENOENT
|
12
|
+
new
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.update
|
17
|
+
cloud = self.load
|
18
|
+
yield cloud
|
19
|
+
ensure
|
20
|
+
cloud.write unless cloud.nil?
|
21
|
+
end
|
22
|
+
|
23
|
+
def write
|
24
|
+
File.open(FILE, "w") {|file| file.write(self.to_yaml)}
|
25
|
+
end
|
26
|
+
|
27
|
+
def farms
|
28
|
+
@farms ||= []
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
@@ -0,0 +1,7 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require "yaml"
|
3
|
+
require File.dirname(__FILE__) + '/cloud'
|
4
|
+
require File.dirname(__FILE__) + '/ec2_client'
|
5
|
+
require File.dirname(__FILE__) + '/server'
|
6
|
+
require File.dirname(__FILE__) + '/hub'
|
7
|
+
require File.dirname(__FILE__) + '/remote_command'
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module SeleniumGrid
|
2
|
+
module AWS
|
3
|
+
module Ec2Client
|
4
|
+
|
5
|
+
def describe(instance_id)
|
6
|
+
output = ec2_shell "ec2-describe-instances #{instance_id}"
|
7
|
+
output =~ /INSTANCE\s+(i-.*)$/
|
8
|
+
fields = $1.split(/\s+/)
|
9
|
+
if output =~ /running/
|
10
|
+
{:instance_id => fields[0],
|
11
|
+
:ami => fields[1],
|
12
|
+
:public_dns => fields[2],
|
13
|
+
:private_dns => fields[3],
|
14
|
+
:status => fields[4] }
|
15
|
+
else
|
16
|
+
{:instance_id => fields[0],
|
17
|
+
:ami => fields[1],
|
18
|
+
:status => fields[2] }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def launch(ami, options ={})
|
23
|
+
output = ec2_shell "ec2-run-instances #{ami} -k #{options[:keypair]}"
|
24
|
+
output =~ /INSTANCE\s+(i-\S+)\s+ami-/
|
25
|
+
$1
|
26
|
+
end
|
27
|
+
|
28
|
+
def shutdown(instance_id)
|
29
|
+
ec2_shell "ec2-terminate-instances #{instance_id}"
|
30
|
+
end
|
31
|
+
|
32
|
+
def version
|
33
|
+
ec2_shell "ec2-version"
|
34
|
+
end
|
35
|
+
|
36
|
+
def authorize_port(port)
|
37
|
+
puts "Opening port #{port}..."
|
38
|
+
ec2_shell "ec2-authorize default -p #{port}"
|
39
|
+
end
|
40
|
+
|
41
|
+
def ec2_shell(command)
|
42
|
+
puts "[EC2] '#{command}'" if tracing?
|
43
|
+
output = `${EC2_HOME}/bin/#{command}`
|
44
|
+
puts "[EC2] #{output}" if tracing?
|
45
|
+
output
|
46
|
+
end
|
47
|
+
|
48
|
+
def tracing?
|
49
|
+
ENV['TRACE_EC2_COMMANDS']
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module SeleniumGrid
|
2
|
+
module AWS
|
3
|
+
|
4
|
+
class Hub < Server
|
5
|
+
|
6
|
+
def url
|
7
|
+
"http://#{public_dns}:4444"
|
8
|
+
end
|
9
|
+
|
10
|
+
def private_url
|
11
|
+
"http://#{private_dns}:4444"
|
12
|
+
end
|
13
|
+
|
14
|
+
def console_url
|
15
|
+
"#{url}/console"
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module SeleniumGrid
|
2
|
+
module AWS
|
3
|
+
|
4
|
+
class RemoteCommand
|
5
|
+
attr_accessor :options
|
6
|
+
|
7
|
+
def initialize(command, options={})
|
8
|
+
@command, @options = command, options
|
9
|
+
end
|
10
|
+
|
11
|
+
def execute
|
12
|
+
puts full_command
|
13
|
+
system full_command
|
14
|
+
raise "Error with #{full_command}" if 0 != $?
|
15
|
+
end
|
16
|
+
|
17
|
+
def full_command
|
18
|
+
cmd = "#{ssh_command} "
|
19
|
+
cmd << "\"su -l #{options[:su]} -c " if options[:su]
|
20
|
+
cmd << "'#{remote_command}'"
|
21
|
+
cmd << '"' if options[:su]
|
22
|
+
cmd
|
23
|
+
end
|
24
|
+
|
25
|
+
def ssh_command
|
26
|
+
shell_command = [ "ssh" ]
|
27
|
+
shell_command << "-i '#{options[:keypair]}'" if options[:keypair]
|
28
|
+
shell_command << "root@#{options[:host]}"
|
29
|
+
|
30
|
+
shell_command.join " "
|
31
|
+
end
|
32
|
+
|
33
|
+
def remote_command
|
34
|
+
shell_command = []
|
35
|
+
shell_command << "PATH=#{options[:path]}:${PATH}; export PATH;" if options[:path]
|
36
|
+
shell_command << "DISPLAY=#{options[:display]}; export DISPLAY;" if options[:display]
|
37
|
+
shell_command << "cd '#{options[:pwd]}';" if options[:pwd]
|
38
|
+
shell_command << @command
|
39
|
+
|
40
|
+
shell_command.join " "
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module SeleniumGrid
|
2
|
+
module AWS
|
3
|
+
|
4
|
+
class Server
|
5
|
+
extend Ec2Client
|
6
|
+
|
7
|
+
attr_accessor :instance_id, :public_dns, :private_dns
|
8
|
+
|
9
|
+
def initialize(instance_id)
|
10
|
+
self.instance_id = instance_id
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.boot(ami, options = {})
|
14
|
+
new launch(ami, options)
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.boot_and_acquire_dns(ami, options)
|
18
|
+
server = boot(ami, options)
|
19
|
+
server.wait_for_dns
|
20
|
+
end
|
21
|
+
|
22
|
+
def wait_for_dns
|
23
|
+
puts "Fetching DNS Info..."
|
24
|
+
until dns_allocated?
|
25
|
+
sleep 2
|
26
|
+
putc "."
|
27
|
+
refresh_status
|
28
|
+
end
|
29
|
+
puts
|
30
|
+
self
|
31
|
+
end
|
32
|
+
|
33
|
+
def dns_allocated?
|
34
|
+
public_dns != nil && public_dns != "" &&
|
35
|
+
private_dns != nil && private_dns != ""
|
36
|
+
end
|
37
|
+
|
38
|
+
def refresh_status
|
39
|
+
info = self.class.describe instance_id
|
40
|
+
@public_dns = info[:public_dns]
|
41
|
+
@private_dns = info[:private_dns]
|
42
|
+
end
|
43
|
+
|
44
|
+
def shutdown
|
45
|
+
self.class.shutdown instance_id
|
46
|
+
end
|
47
|
+
|
48
|
+
def run(command, options)
|
49
|
+
command = RemoteCommand.new command, options.merge(:host => public_dns)
|
50
|
+
command.execute
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/test_helper"
|
2
|
+
|
3
|
+
unit_tests do
|
4
|
+
|
5
|
+
test "hub is nil on a fresh cloud" do
|
6
|
+
assert_nil SeleniumGrid::AWS::Cloud.new.hub
|
7
|
+
end
|
8
|
+
|
9
|
+
test "hub return the latest assigned hub instance" do
|
10
|
+
cloud = SeleniumGrid::AWS::Cloud.new
|
11
|
+
cloud.hub = :old_hub
|
12
|
+
cloud.hub = :new_hub
|
13
|
+
assert_equal :new_hub, cloud.hub
|
14
|
+
end
|
15
|
+
|
16
|
+
test "remote_control_farms is empty on a fresh cloud" do
|
17
|
+
assert_equal [], SeleniumGrid::AWS::Cloud.new.farms
|
18
|
+
end
|
19
|
+
|
20
|
+
test "remote_control_farms returns all added farms" do
|
21
|
+
cloud = SeleniumGrid::AWS::Cloud.new
|
22
|
+
cloud.farms << :a_farm
|
23
|
+
cloud.farms << :another_farm
|
24
|
+
assert_equal [:a_farm, :another_farm], cloud.farms
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/test_helper"
|
2
|
+
|
3
|
+
unit_tests do
|
4
|
+
|
5
|
+
test "run_instance launch a new AMI using ec2-run-instances script" do
|
6
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
7
|
+
client.expects(:ec2_shell).with("ec2-run-instances TheAMI -k TheKeyPair")
|
8
|
+
client.launch "TheAMI", :keypair => "TheKeyPair"
|
9
|
+
end
|
10
|
+
|
11
|
+
test "run_instance returns the instance id when launch is successful" do
|
12
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
13
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
14
|
+
RESERVATION r-ee629587 069216575636 default
|
15
|
+
INSTANCE i-6fef1006 ami-d306e3ba pending grid-keypair 0 m1.small 2008-02-17T20:49:08+0000
|
16
|
+
EOS
|
17
|
+
assert_equal "i-6fef1006", client.launch(:an_ami)
|
18
|
+
end
|
19
|
+
|
20
|
+
test "authorize launch ec2-authorize script for default group" do
|
21
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
22
|
+
client.expects(:ec2_shell).with("ec2-authorize default -p ThePort")
|
23
|
+
client.authorize_port "ThePort"
|
24
|
+
end
|
25
|
+
|
26
|
+
test "describe launch ec2-describe script for a particular AMI" do
|
27
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
28
|
+
client.expects(:ec2_shell).with("ec2-describe-instances TheAMI").returns("INSTANCE i-")
|
29
|
+
client.describe "TheAMI"
|
30
|
+
end
|
31
|
+
|
32
|
+
test "describe returns the instance id when running" do
|
33
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
34
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
35
|
+
RESERVATION r-ee629587 069216575636 default
|
36
|
+
INSTANCE i-6fef1006 ami-d306e3ba ec2-67-202-19-143.compute-1.amazonaws.com domU-12-31-38-00-3D-E6.compute-1.internal running grid-keypair 0 m1.small 2008-02-17T20:49:08+0000
|
37
|
+
EOS
|
38
|
+
assert_equal "i-6fef1006", client.describe(:an_ami)[:instance_id]
|
39
|
+
end
|
40
|
+
|
41
|
+
test "describe returns the ami when running" do
|
42
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
43
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
44
|
+
RESERVATION r-ee629587 069216575636 default
|
45
|
+
INSTANCE i-6fef1006 ami-d306e3ba ec2-67-202-19-143.compute-1.amazonaws.com domU-12-31-38-00-3D-E6.compute-1.internal running grid-keypair 0 m1.small 2008-02-17T20:49:08+0000
|
46
|
+
EOS
|
47
|
+
assert_equal "ami-d306e3ba", client.describe(:an_ami)[:ami]
|
48
|
+
end
|
49
|
+
|
50
|
+
test "describe returns the public_dns when running" do
|
51
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
52
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
53
|
+
RESERVATION r-ee629587 069216575636 default
|
54
|
+
INSTANCE i-6fef1006 ami-d306e3ba ec2-67-202-19-143.compute-1.amazonaws.com domU-12-31-38-00-3D-E6.compute-1.internal running grid-keypair 0 m1.small 2008-02-17T20:49:08+0000
|
55
|
+
EOS
|
56
|
+
assert_equal "ec2-67-202-19-143.compute-1.amazonaws.com",
|
57
|
+
client.describe(:an_ami)[:public_dns]
|
58
|
+
end
|
59
|
+
|
60
|
+
test "describe returns the private_dns when running" do
|
61
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
62
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
63
|
+
RESERVATION r-ee629587 069216575636 default
|
64
|
+
INSTANCE i-6fef1006 ami-d306e3ba ec2-67-202-19-143.compute-1.amazonaws.com domU-12-31-38-00-3D-E6.compute-1.internal running grid-keypair 0 m1.small 2008-02-17T20:49:08+0000
|
65
|
+
EOS
|
66
|
+
assert_equal "domU-12-31-38-00-3D-E6.compute-1.internal",
|
67
|
+
client.describe(:an_ami)[:private_dns]
|
68
|
+
end
|
69
|
+
|
70
|
+
test "describe returns the status when running" do
|
71
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
72
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
73
|
+
RESERVATION r-ee629587 069216575636 default
|
74
|
+
INSTANCE i-6fef1006 ami-d306e3ba ec2-67-202-19-143.compute-1.amazonaws.com domU-12-31-38-00-3D-E6.compute-1.internal running grid-keypair 0 m1.small 2008-02-17T20:49:08+0000
|
75
|
+
EOS
|
76
|
+
assert_equal "running", client.describe(:an_ami)[:status]
|
77
|
+
end
|
78
|
+
|
79
|
+
test "describe returns the instance id when terminated" do
|
80
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
81
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
82
|
+
RESERVATION r-ee629587 069216575636 default
|
83
|
+
INSTANCE i-6fef1006 ami-d306e3ba terminated grid-keypair 0 m1.small 2008-02-17T20:49:08+0000
|
84
|
+
EOS
|
85
|
+
assert_equal "i-6fef1006", client.describe(:an_ami)[:instance_id]
|
86
|
+
end
|
87
|
+
|
88
|
+
test "describe returns the status when pending" do
|
89
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
90
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
91
|
+
RESERVATION r-40609729 069216575636 default
|
92
|
+
INSTANCE i-afee11c6 ami-6801e401 pending grid-keypair 0 m1.small 2008-02-17T22:33:38+0000
|
93
|
+
EOS
|
94
|
+
assert_equal "pending", client.describe(:an_ami)[:status]
|
95
|
+
end
|
96
|
+
|
97
|
+
test "describe returns a nil public dns the status when pending" do
|
98
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
99
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
100
|
+
RESERVATION r-40609729 069216575636 default
|
101
|
+
INSTANCE i-afee11c6 ami-6801e401 pending grid-keypair 0 m1.small 2008-02-17T22:33:38+0000
|
102
|
+
EOS
|
103
|
+
assert_nil client.describe(:an_ami)[:public_dns]
|
104
|
+
end
|
105
|
+
|
106
|
+
test "describe returns a nil private dns the status when pending" do
|
107
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
108
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
109
|
+
RESERVATION r-40609729 069216575636 default
|
110
|
+
INSTANCE i-afee11c6 ami-6801e401 pending grid-keypair 0 m1.small 2008-02-17T22:33:38+0000
|
111
|
+
EOS
|
112
|
+
assert_nil client.describe(:an_ami)[:private_dns]
|
113
|
+
end
|
114
|
+
|
115
|
+
test "describe returns the status when terminated" do
|
116
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
117
|
+
client.stubs(:ec2_shell).returns(<<-EOS)
|
118
|
+
RESERVATION r-ee629587 069216575636 default
|
119
|
+
INSTANCE i-6fef1006 ami-d306e3ba terminated grid-keypair 0 m1.small 2008-02-17T20:49:08+0000
|
120
|
+
EOS
|
121
|
+
assert_equal "terminated", client.describe(:an_ami)[:status]
|
122
|
+
end
|
123
|
+
|
124
|
+
test "shutdown terminates an instance" do
|
125
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
126
|
+
client.expects(:ec2_shell).with("ec2-terminate-instances The-Instance-ID")
|
127
|
+
client.shutdown("The-Instance-ID")
|
128
|
+
end
|
129
|
+
|
130
|
+
test "version returns EC2 version using defined keypair" do
|
131
|
+
client = Class.new.extend SeleniumGrid::AWS::Ec2Client
|
132
|
+
client.expects(:ec2_shell).with("ec2-version").returns(:ec2_version)
|
133
|
+
assert_equal :ec2_version, client.version
|
134
|
+
end
|
135
|
+
|
136
|
+
# ec2-version -K "${EC2_PRIVATE_KEY}"
|
137
|
+
end
|