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
@@ -0,0 +1,101 @@
|
|
1
|
+
# Selenium Grid Ruby Example Rakefile
|
2
|
+
#
|
3
|
+
# Document best practices to drive Selenium tests written in Ruby and
|
4
|
+
# targetting Selenium Grid.
|
5
|
+
|
6
|
+
#
|
7
|
+
# Loading required dependencies
|
8
|
+
#
|
9
|
+
|
10
|
+
require "rubygems"
|
11
|
+
gem "rspec", "=1.1.8"
|
12
|
+
require 'rake'
|
13
|
+
require 'spec/rake/spectask'
|
14
|
+
|
15
|
+
gem "selenium-client", "=1.2.7"
|
16
|
+
require "selenium/rake/tasks"
|
17
|
+
|
18
|
+
# Make sure we pick up the reporter from the appropriate selenium-client
|
19
|
+
# install as RSpec runner --require does not discriminate between multiple
|
20
|
+
# selenium-client gems.
|
21
|
+
gem_executable = Config::CONFIG["host_os"] =~ /mswin/ ? "gem.bat" : "gem"
|
22
|
+
report_formatter_path = `#{gem_executable} which -q "selenium/rspec/reporting/selenium_test_report_formatter"`.chomp
|
23
|
+
report_formatter_path.gsub! /selenium-client-\d+\.\d+.\d+/, "selenium-client-1.2.7"
|
24
|
+
|
25
|
+
|
26
|
+
gem "deep_test", "=1.2.2"
|
27
|
+
require "deep_test/rake_tasks"
|
28
|
+
|
29
|
+
task :default => :'tests:run_in_parallel'
|
30
|
+
|
31
|
+
#
|
32
|
+
# Recommended way to run tests in parallel and leverage Selenium Grid.
|
33
|
+
#
|
34
|
+
|
35
|
+
desc("Run all tests in parallel using DeepTest.")
|
36
|
+
Spec::Rake::SpecTask.new("tests:run_in_parallel") do |t|
|
37
|
+
t.spec_files = FileList['./**/*_spec.rb']
|
38
|
+
t.deep_test :number_of_workers => 6,
|
39
|
+
:timeout_in_seconds => 300
|
40
|
+
t.spec_opts << '--color'
|
41
|
+
t.spec_opts << "--require 'rubygems,#{report_formatter_path}'"
|
42
|
+
t.spec_opts << "--format=Selenium::RSpec::SeleniumTestReportFormatter:./tmp/test_report.html"
|
43
|
+
t.spec_opts << "--format=progress"
|
44
|
+
end
|
45
|
+
task :'tests:run_in_parallel' => :create_report_dir
|
46
|
+
|
47
|
+
#
|
48
|
+
# Running tests in sequence (without taking advantage of Selenium Grid),
|
49
|
+
# useful to troubleshoot problems with the parallel run.
|
50
|
+
#
|
51
|
+
|
52
|
+
|
53
|
+
desc "Run all behaviors in sequence"
|
54
|
+
Spec::Rake::SpecTask.new('tests:run_in_sequence') do |t|
|
55
|
+
t.pattern = "**/*_spec.rb"
|
56
|
+
t.spec_opts << '--color'
|
57
|
+
t.spec_opts << "--require 'rubygems,#{report_formatter_path}'"
|
58
|
+
t.spec_opts << "--format=Selenium::RSpec::SeleniumTestReportFormatter:./tmp/test_report.html"
|
59
|
+
t.spec_opts << "--format=progress"
|
60
|
+
t.fail_on_error = true
|
61
|
+
end
|
62
|
+
task :'tests:run_in_sequence' => :create_report_dir
|
63
|
+
|
64
|
+
|
65
|
+
#
|
66
|
+
# Legacy way to drive tests in parallel before DeepTest RSpec support.
|
67
|
+
# Kept to document a simple way to run the tests in parallel for non-Ruby
|
68
|
+
# platforms.
|
69
|
+
#
|
70
|
+
|
71
|
+
desc("[DEPRECATED] Run all behaviors in parallel spawing multiple processes. DeepTest offers a better alternative.")
|
72
|
+
task :'tests:run_in_parallel:multiprocess' => :create_report_dir do
|
73
|
+
require File.expand_path(File.dirname(__FILE__) + '/lib/multi_process_behaviour_runner')
|
74
|
+
runner = MultiProcessSpecRunner.new(10)
|
75
|
+
runner.run(Dir['*_spec.rb'])
|
76
|
+
end
|
77
|
+
|
78
|
+
task :create_report_dir do
|
79
|
+
rm_f File.expand_path(File.dirname(__FILE__) + "/tmp/rspec_report")
|
80
|
+
mkdir_p File.expand_path(File.dirname(__FILE__) + "/tmp/rspec_report")
|
81
|
+
ENV['SELENIUM_TEST_REPORT_FILE'] = "./tmp/test_report.html" # Workaround for DeepTest reports
|
82
|
+
end
|
83
|
+
|
84
|
+
desc "Check whether you installed all dependencies and you environmnet is OK."
|
85
|
+
task :sanity_check do
|
86
|
+
require report_formatter_path
|
87
|
+
STDOUT.puts <<-EOS
|
88
|
+
|
89
|
+
Congratulations, your environment is set properly.
|
90
|
+
|
91
|
+
Run the tests in parallel with:
|
92
|
+
|
93
|
+
rake tests:run_in_parallel
|
94
|
+
|
95
|
+
Or in sequence with:
|
96
|
+
|
97
|
+
rake tests:run_in_sequence
|
98
|
+
|
99
|
+
EOS
|
100
|
+
end
|
101
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module relativePaths="true" type="RUBY_MODULE" version="4">
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
4
|
+
<content url="file://$MODULE_DIR$" />
|
5
|
+
<orderEntry type="jdk" jdkName="Ruby SDK 1.8.6" jdkType="RUBY_SDK" />
|
6
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
7
|
+
<orderEntryProperties />
|
8
|
+
</component>
|
9
|
+
<component name="RModuleContentRootManager">
|
10
|
+
<TEST_URLS url="file://$MODULE_DIR$" />
|
11
|
+
</component>
|
12
|
+
<component name="RModuleSettingsStorage">
|
13
|
+
<RMODULE_SETTINGS_STORAGE_ID NAME="SHOULD_USE_RSPEC_TEST_FRAMEWORK" VALUE="true" />
|
14
|
+
<RMODULE_SETTINGS_STORAGE_ID NAME="NUMBER" VALUE="0" />
|
15
|
+
</component>
|
16
|
+
</module>
|
17
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module FlickrExample
|
2
|
+
|
3
|
+
def run_flickr_scenario(options)
|
4
|
+
browser.open "/"
|
5
|
+
page.location.should match(%r{http://images.google.com/})
|
6
|
+
page.type "q", options[:search_string]
|
7
|
+
page.click "btnG", :wait_for => :page
|
8
|
+
page.click "link=Advanced Image Search", :wait_for => :page
|
9
|
+
page.click "rimgtype4"
|
10
|
+
page.click "sf"
|
11
|
+
page.select "imgc", "full color"
|
12
|
+
page.click "btnG", :wait_for => :page
|
13
|
+
page.text?(options[:search_string].split(/ /).first).should be_true
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/array_extension')
|
2
|
+
Array.send :include, ArrayExtension
|
3
|
+
|
4
|
+
class MultiProcessSpecRunner
|
5
|
+
|
6
|
+
def initialize(max_concurrent_processes = 10)
|
7
|
+
@max_concurrent_processes = max_concurrent_processes
|
8
|
+
end
|
9
|
+
|
10
|
+
def run(spec_files)
|
11
|
+
concurrent_processes = [ @max_concurrent_processes, spec_files.size ].min
|
12
|
+
spec_files_by_process = spec_files / concurrent_processes
|
13
|
+
concurrent_processes.times do |i|
|
14
|
+
cmd = "spec #{spec_files_by_process[i].join(' ')}"
|
15
|
+
puts "Launching #{cmd}"
|
16
|
+
exec(cmd) if fork == nil
|
17
|
+
end
|
18
|
+
success = true
|
19
|
+
concurrent_processes.times do |i|
|
20
|
+
pid, status = Process.wait2
|
21
|
+
puts "Test process ##{i} with pid #{pid} completed with #{status}"
|
22
|
+
success &&= status.exitstatus.zero?
|
23
|
+
end
|
24
|
+
|
25
|
+
raise "Build failed" unless success
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/spec_helper")
|
2
|
+
|
3
|
+
describe "Paris" do
|
4
|
+
include FlickrExample
|
5
|
+
|
6
|
+
it "Has museums" do
|
7
|
+
run_flickr_scenario :search_string => "Louvre"
|
8
|
+
end
|
9
|
+
|
10
|
+
it "Has bridges" do
|
11
|
+
run_flickr_scenario :search_string => "Pont Neuf"
|
12
|
+
end
|
13
|
+
|
14
|
+
it "Has magnific cathedrals" do
|
15
|
+
run_flickr_scenario :search_string => "Notre Dame de Paris"
|
16
|
+
end
|
17
|
+
|
18
|
+
it "Has magnificent Castles" do
|
19
|
+
run_flickr_scenario :search_string => "Versailles"
|
20
|
+
end
|
21
|
+
|
22
|
+
it "Has a gorgeous river" do
|
23
|
+
run_flickr_scenario :search_string => "Seine by Night"
|
24
|
+
end
|
25
|
+
|
26
|
+
it "Has weird towers" do
|
27
|
+
run_flickr_scenario :search_string => "Tour Eiffel"
|
28
|
+
end
|
29
|
+
|
30
|
+
it "Has avenues" do
|
31
|
+
run_flickr_scenario :search_string => "Avenue des Champs Elysees"
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/spec_helper")
|
2
|
+
|
3
|
+
describe "Perigord" do
|
4
|
+
include FlickrExample
|
5
|
+
|
6
|
+
it "Has magnific cro-magnon paintings" do
|
7
|
+
run_flickr_scenario :search_string => "lascaux hall of the bull"
|
8
|
+
end
|
9
|
+
|
10
|
+
it "Has magnific cities" do
|
11
|
+
run_flickr_scenario :search_string => "Sarlat"
|
12
|
+
end
|
13
|
+
|
14
|
+
it "Has magnific cathedrals" do
|
15
|
+
run_flickr_scenario :search_string => "Cathedral in Périgueux"
|
16
|
+
end
|
17
|
+
|
18
|
+
it "Has great wines" do
|
19
|
+
run_flickr_scenario :search_string => "Montbazillac"
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
$:.unshift
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
gem "rspec", "=1.1.8"
|
5
|
+
require 'spec/rake/spectask'
|
6
|
+
|
7
|
+
require "rake"
|
8
|
+
|
9
|
+
gem "selenium-client", "=1.2.7"
|
10
|
+
require "selenium/rake/tasks"
|
11
|
+
require "selenium/client"
|
12
|
+
require "selenium/rspec/spec_helper"
|
13
|
+
|
14
|
+
require File.expand_path(File.dirname(__FILE__) + "/flickr_example")
|
15
|
+
|
16
|
+
Spec::Runner.configure do |config|
|
17
|
+
|
18
|
+
config.before(:each) do
|
19
|
+
create_selenium_driver
|
20
|
+
start_new_browser_session
|
21
|
+
end
|
22
|
+
|
23
|
+
# The system capture need to happen BEFORE the closing the Selenium session
|
24
|
+
config.append_after(:each) do
|
25
|
+
@selenium_driver.close_current_browser_session
|
26
|
+
end
|
27
|
+
|
28
|
+
def start_new_browser_session
|
29
|
+
@selenium_driver.start_new_browser_session
|
30
|
+
@selenium_driver.set_context "Starting example '#{self.description}'"
|
31
|
+
end
|
32
|
+
|
33
|
+
def selenium_driver
|
34
|
+
@selenium_driver
|
35
|
+
end
|
36
|
+
|
37
|
+
def browser
|
38
|
+
@selenium_driver
|
39
|
+
end
|
40
|
+
|
41
|
+
def page
|
42
|
+
@selenium_driver
|
43
|
+
end
|
44
|
+
|
45
|
+
def create_selenium_driver
|
46
|
+
remote_control_server = ENV['SELENIUM_RC_HOST'] || "localhost"
|
47
|
+
port = ENV['SELENIUM_RC_PORT'] || 4444
|
48
|
+
browser = ENV['SELENIUM_RC_BROWSER'] || "*firefox"
|
49
|
+
timeout = ENV['SELENIUM_RC_TIMEOUT'] || 200
|
50
|
+
application_host = ENV['SELENIUM_APPLICATION_HOST'] || "images.google.com"
|
51
|
+
application_port = ENV['SELENIUM_APPLICATION_PORT'] || "80"
|
52
|
+
|
53
|
+
@selenium_driver = Selenium::Client::Driver.new(
|
54
|
+
remote_control_server, port, browser,
|
55
|
+
"http://#{application_host}:#{application_port}", timeout)
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,46 @@
|
|
1
|
+
hub:
|
2
|
+
port: 4444
|
3
|
+
environments:
|
4
|
+
- name: "Windows-Firefox3"
|
5
|
+
browser: "*firefox"
|
6
|
+
- name: "Firefox on OS X"
|
7
|
+
browser: "*firefox"
|
8
|
+
- name: "Linux-Firefox2"
|
9
|
+
browser: "*firefox"
|
10
|
+
- name: "Linux-Firefox3.5"
|
11
|
+
browser: "*firefox"
|
12
|
+
- name: "Linux-Firefox3"
|
13
|
+
browser: "*firefox"
|
14
|
+
- name: "Windows-IE8"
|
15
|
+
browser: "*iexplore"
|
16
|
+
- name: "Safari on OS X"
|
17
|
+
browser: "*safari"
|
18
|
+
|
19
|
+
- name: "*firefox"
|
20
|
+
browser: "*firefox"
|
21
|
+
- name: "*firefox2"
|
22
|
+
browser: "*firefox2"
|
23
|
+
- name: "*firefox3"
|
24
|
+
browser: "*firefox3"
|
25
|
+
- name: "*chrome"
|
26
|
+
browser: "*chrome"
|
27
|
+
- name: "*iexplore"
|
28
|
+
browser: "*iexplore"
|
29
|
+
- name: "*iehta"
|
30
|
+
browser: "*iehta"
|
31
|
+
- name: "*safari"
|
32
|
+
browser: "*safari"
|
33
|
+
- name: "*opera"
|
34
|
+
browser: "*opera"
|
35
|
+
- name: "*googlechrome"
|
36
|
+
browser: "*googlechrome"
|
37
|
+
- name: "*firefoxproxy"
|
38
|
+
browser: "*firefoxproxy"
|
39
|
+
- name: "*pifirefox"
|
40
|
+
browser: "*pifirefox"
|
41
|
+
- name: "*iexploreproxy"
|
42
|
+
browser: "*iexploreproxy"
|
43
|
+
- name: "*piiexplore"
|
44
|
+
browser: "*piiexplore"
|
45
|
+
- name: "*safariproxy"
|
46
|
+
browser: "*safariproxy"
|
@@ -0,0 +1,228 @@
|
|
1
|
+
<project name="Selenium Grid Common Build Tasks">
|
2
|
+
|
3
|
+
<description>Selenium Grid Common Build Tasks</description>
|
4
|
+
|
5
|
+
<tstamp/>
|
6
|
+
|
7
|
+
<property name="build.src" location="src/main/java"/>
|
8
|
+
<property name="build.output" location="target/classes"/>
|
9
|
+
<property name="dist" location="${basedir}/target/dist"/>
|
10
|
+
<property name="test.src" location="src/test/unit/java"/>
|
11
|
+
<property name="test.output" location="target/test-classes"/>
|
12
|
+
<property name="test.reports" location="target/test-reports"/>
|
13
|
+
<property name="metrics.reports" location="target/metrics"/>
|
14
|
+
<property name="metrics.pmd.reports" location="${metrics.reports}/pmd"/>
|
15
|
+
<property name="metrics.coverage.reports" location="${metrics.reports}/coverage"/>
|
16
|
+
<property environment="env"/>
|
17
|
+
|
18
|
+
<path id="mocking.classpath">
|
19
|
+
<fileset dir="${rootdir}/vendor">
|
20
|
+
<include name="jbehave-1.0.1.jar"/>
|
21
|
+
<include name="jmock-junit4-2.2.0.jar"/>
|
22
|
+
<include name="jmock-legacy-2.2.0.jar"/>
|
23
|
+
<include name="proxytoys-0.2.1.jar"/>
|
24
|
+
<include name="objenesis-1.0.jar"/>
|
25
|
+
<include name="jmock-2.2.0.jar"/>
|
26
|
+
<include name="cglib-nodep-2.1_3.jar"/>
|
27
|
+
</fileset>
|
28
|
+
</path>
|
29
|
+
|
30
|
+
<path id="junit.core.classpath">
|
31
|
+
<fileset dir="${rootdir}/vendor">
|
32
|
+
<include name="junit-4.4.jar"/>
|
33
|
+
</fileset>
|
34
|
+
<pathelement location="${build.output}"/>
|
35
|
+
<pathelement path="${java.class.path}/"/>
|
36
|
+
</path>
|
37
|
+
|
38
|
+
<path id="junit.classpath" />
|
39
|
+
|
40
|
+
<path id="testing.classpath">
|
41
|
+
<path refid="compile.classpath"/>
|
42
|
+
<path refid="junit.core.classpath"/>
|
43
|
+
<path refid="junit.classpath"/>
|
44
|
+
<path refid="mocking.classpath"/>
|
45
|
+
<path refid="cobertura.classpath"/>
|
46
|
+
<pathelement location="${build.output}"/>
|
47
|
+
<pathelement location="${test.output}"/>
|
48
|
+
</path>
|
49
|
+
|
50
|
+
<path id="pmd.classpath">
|
51
|
+
<fileset dir="${rootdir}/vendor">
|
52
|
+
<include name="pmd-4.2.2.jar"/>
|
53
|
+
<include name="jaxen-1.1.1.jar"/>
|
54
|
+
<include name="asm-3.1.jar"/>
|
55
|
+
</fileset>
|
56
|
+
<pathelement path="${java.class.path}/"/>
|
57
|
+
</path>
|
58
|
+
|
59
|
+
<path id="cobertura.classpath">
|
60
|
+
<fileset dir="${rootdir}/vendor">
|
61
|
+
<include name="cobertura-1.9.jar"/>
|
62
|
+
<include name="log4j-1.2.9.jar"/>
|
63
|
+
<include name="asm-2.2.1.jar"/>
|
64
|
+
<include name="asm-tree-2.2.1.jar"/>
|
65
|
+
<include name="jakarta-oro-2.0.8.jar"/>
|
66
|
+
</fileset>
|
67
|
+
<pathelement path="${java.class.path}/"/>
|
68
|
+
</path>
|
69
|
+
|
70
|
+
<target name="package-standalone" depends="package"/>
|
71
|
+
<target name="build" depends="test"/>
|
72
|
+
<target name="dist" depends="package-standalone"/>
|
73
|
+
|
74
|
+
<target name="clean" description="Remove generated artifacts">
|
75
|
+
<delete dir="target"/>
|
76
|
+
</target>
|
77
|
+
|
78
|
+
<target name="compile" description="compile the source ">
|
79
|
+
<mkdir dir="${build.output}"/>
|
80
|
+
<javac srcdir="${build.src}"
|
81
|
+
destdir="${build.output}"
|
82
|
+
debug="true"
|
83
|
+
source="1.5"
|
84
|
+
target="1.5">
|
85
|
+
<classpath refid="compile.classpath"/>
|
86
|
+
</javac>
|
87
|
+
<copy todir="${build.output}" verbose="true">
|
88
|
+
<fileset dir="${build.src}" includes="**/*.html"/>
|
89
|
+
<fileset dir="${build.src}" includes="**/*.yml"/>
|
90
|
+
</copy>
|
91
|
+
</target>
|
92
|
+
|
93
|
+
<target name="compile-tests" depends="compile" description="compile tests">
|
94
|
+
<mkdir dir="${test.output}"/>
|
95
|
+
<mkdir dir="${test.reports}"/>
|
96
|
+
|
97
|
+
<javac srcdir="${test.src}"
|
98
|
+
destdir="${test.output}"
|
99
|
+
excludes="**/package.html"
|
100
|
+
source="1.5"
|
101
|
+
target="1.5"
|
102
|
+
debug="true"
|
103
|
+
deprecation="true">
|
104
|
+
<classpath refid="testing.classpath"/>
|
105
|
+
</javac>
|
106
|
+
</target>
|
107
|
+
|
108
|
+
<macrodef name="run-unit-tests">
|
109
|
+
<element name="options" optional="true"/>
|
110
|
+
<sequential>
|
111
|
+
<mkdir dir="${test.output}"/>
|
112
|
+
<mkdir dir="${test.reports}"/>
|
113
|
+
|
114
|
+
<copy todir="${test.output}" verbose="true">
|
115
|
+
<fileset dir="${test.src}" includes="**/*.html"/>
|
116
|
+
</copy>
|
117
|
+
<junit printSummary="no" haltonerror="true" haltonfailure="true" fork="true" dir="${test.reports}">
|
118
|
+
<options/>
|
119
|
+
<classpath refid="testing.classpath"/>
|
120
|
+
<formatter type="xml"/>
|
121
|
+
<formatter type="plain"/>
|
122
|
+
<batchtest todir="${test.reports}">
|
123
|
+
<fileset dir="${test.src}">
|
124
|
+
<include name="**/*Test.java"/>
|
125
|
+
</fileset>
|
126
|
+
</batchtest>
|
127
|
+
</junit>
|
128
|
+
</sequential>
|
129
|
+
</macrodef>
|
130
|
+
|
131
|
+
<target name="test" depends="compile, compile-tests" description="run tests">
|
132
|
+
<run-unit-tests/>
|
133
|
+
</target>
|
134
|
+
|
135
|
+
<target name="package" depends="test" description="Package as a jar">
|
136
|
+
<mkdir dir="${dist}/lib"/>
|
137
|
+
<jar jarfile="${dist}/lib/${artifact}-${version}.jar" basedir="${build.output}">
|
138
|
+
<manifest>
|
139
|
+
<attribute name="Main-Class" value="com.thoughtworks.selenium.grid.hub.HubServer"/>
|
140
|
+
<attribute name="Built-By" value="OpenQA.org"/>
|
141
|
+
<attribute name="Build-Time" value="${DSTAMP}${TSTAMP}"/>
|
142
|
+
<section name="common">
|
143
|
+
<attribute name="Specification-Title" value="${name}"/>
|
144
|
+
<attribute name="Specification-Version" value="${version}"/>
|
145
|
+
<attribute name="Specification-Vendor" value="OpenQA.org"/>
|
146
|
+
</section>
|
147
|
+
</manifest>
|
148
|
+
</jar>
|
149
|
+
</target>
|
150
|
+
|
151
|
+
<macrodef name="package-standalone-jar">
|
152
|
+
<attribute name="main-class"/>
|
153
|
+
<element name="dependencies" optional="yes"/>
|
154
|
+
<sequential>
|
155
|
+
<tstamp/>
|
156
|
+
<mkdir dir="${dist}/lib"/>
|
157
|
+
<jar jarfile="${dist}/lib/${artifact}-standalone-${version}.jar">
|
158
|
+
<manifest>
|
159
|
+
<attribute name="Main-Class" value="@{main-class}"/>
|
160
|
+
<attribute name="Built-By" value="OpenQA.org"/>
|
161
|
+
<attribute name="Build-Time" value="${DSTAMP}${TSTAMP}"/>
|
162
|
+
<section name="common">
|
163
|
+
<attribute name="Specification-Title" value="${name}"/>
|
164
|
+
<attribute name="Specification-Version" value="${version}"/>
|
165
|
+
<attribute name="Specification-Vendor" value="OpenQA.org"/>
|
166
|
+
</section>
|
167
|
+
</manifest>
|
168
|
+
<zipfileset src="${dist}/lib/${artifact}-${version}.jar"/>
|
169
|
+
<dependencies/>
|
170
|
+
</jar>
|
171
|
+
</sequential>
|
172
|
+
</macrodef>
|
173
|
+
|
174
|
+
<target name="pmd-analysis" description="Performs Code Analysis using PMD Inspection Tool">
|
175
|
+
<echo message="Performing analysis code using PMD"/>
|
176
|
+
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.classpath"/>
|
177
|
+
<mkdir dir="${metrics.pmd.reports}"/>
|
178
|
+
<pmd shortFilenames="true">
|
179
|
+
<ruleset>lib/build/pmd-ruleset.xml</ruleset>
|
180
|
+
<formatter type="html" toFile="${metrics.pmd.reports}/pmd_report.html"
|
181
|
+
linkPrefix="http://pmd.sourceforge.net/xref/"/>
|
182
|
+
<fileset dir="${build.src}">
|
183
|
+
<include name="**/*.java"/>
|
184
|
+
</fileset>
|
185
|
+
</pmd>
|
186
|
+
</target>
|
187
|
+
|
188
|
+
<target name="coverage-analysis" depends="compile, compile-tests" description="Gather code coverage metrics">
|
189
|
+
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
|
190
|
+
|
191
|
+
<delete file="${build.output}/cobertura.ser" />
|
192
|
+
|
193
|
+
<cobertura-instrument datafile="${build.output}/cobertura.ser">
|
194
|
+
<fileset dir="${build.output}">
|
195
|
+
<include name="**/*.class"/>
|
196
|
+
</fileset>
|
197
|
+
</cobertura-instrument>
|
198
|
+
|
199
|
+
<run-unit-tests>
|
200
|
+
<options>
|
201
|
+
<sysproperty key="net.sourceforge.cobertura.datafile" file="${build.output}/cobertura.ser" />
|
202
|
+
<classpath refid="cobertura.classpath"/>
|
203
|
+
</options>
|
204
|
+
</run-unit-tests>
|
205
|
+
|
206
|
+
<cobertura-report srcdir="${build.src}" destdir="${metrics.coverage.reports}" datafile="${build.output}/cobertura.ser"/>
|
207
|
+
</target>
|
208
|
+
|
209
|
+
<macrodef name="build-subprojects">
|
210
|
+
<attribute name="target"/>
|
211
|
+
<sequential>
|
212
|
+
<subant target="@{target}">
|
213
|
+
<filelist dir=".">
|
214
|
+
<file name="infrastructure/core/build.xml"/>
|
215
|
+
<file name="infrastructure/webserver/build.xml"/>
|
216
|
+
<file name="hub/build.xml"/>
|
217
|
+
<file name="agent/build.xml"/>
|
218
|
+
<file name="remote-control/build.xml"/>
|
219
|
+
<file name="tools/build.xml"/>
|
220
|
+
<file name="demo/build.xml"/>
|
221
|
+
<file name="examples/java/build.xml"/>
|
222
|
+
<file name="regression-tests"/>
|
223
|
+
</filelist>
|
224
|
+
</subant>
|
225
|
+
</sequential>
|
226
|
+
</macrodef>
|
227
|
+
|
228
|
+
</project>
|