Skip to content

Commit

Permalink
rb - run specs on remote driver with each browser
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Oct 12, 2015
1 parent f1ac863 commit 69be286
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 5 deletions.
14 changes: 10 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,22 @@ task :test_java => [
task :test_rb => [
"//rb:unit-test",
"//rb:rc-client-unit-test",
"//rb:firefox-test",
"//rb:remote-test",
"//rb:rc-client-integration-test",
"//rb:chrome-test",
"//rb:firefox-test",
"//rb:phantomjs-test",
"//rb:remote-chrome-test",
"//rb:remote-firefox-test",
"//rb:remote-phantomjs-test",
("//rb:wires-test" if ENV['MARIONETTE_PATH']),
("//rb:remote-wires-test" if ENV['MARIONETTE_PATH']),
("//rb:safari-test" if mac?),
("//rb:remote-safari-test" if mac?),
("//rb:ie-test" if windows?),
("//rb:edge-test" if windows?)
].compact
("//rb:remote-ie-test" if windows?),
("//rb:edge-test" if windows?),
("//rb:remote-edge-test" if windows?)
].compact

task :test_py => [ :py_prep_for_install_release, "//py:firefox_test:run" ]

Expand Down
8 changes: 7 additions & 1 deletion rake-tasks/crazy_fun/mappings/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,13 @@ def handle(fun, dir, args)
STDOUT.sync = true
puts "Running: #{args[:name]} ruby tests"

ENV['WD_SPEC_DRIVER'] = args[:name]
if args[:name].match /^remote-(.*)/
ENV['WD_REMOTE_BROWSER'] = $1
ENV['WD_SPEC_DRIVER'] = 'remote'
else
ENV['WD_SPEC_DRIVER'] = args[:name]
end

ENV['CI_REPORTS'] = "build/test_logs"

ruby :include => args[:include],
Expand Down
84 changes: 84 additions & 0 deletions rb/build.desc
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,90 @@ ruby_test(name = "remote",
]
)

ruby_test(name = "remote-chrome",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
"spec/integration/selenium/webdriver/remote/**/*_spec.rb"
],
include = ["rb/spec/integration", "build/rb/lib"],
deps = [
"//java/server/test/org/openqa/selenium:server-with-tests:uber",
":remote"
]
)

ruby_test(name = "remote-firefox",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
"spec/integration/selenium/webdriver/remote/**/*_spec.rb"
],
include = ["rb/spec/integration", "build/rb/lib"],
deps = [
"//java/server/test/org/openqa/selenium:server-with-tests:uber",
":remote"
]
)

ruby_test(name = "remote-phantomjs",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
"spec/integration/selenium/webdriver/remote/**/*_spec.rb"
],
include = ["rb/spec/integration", "build/rb/lib"],
deps = [
"//java/server/test/org/openqa/selenium:server-with-tests:uber",
":remote"
]
)

ruby_test(name = "remote-safari",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
"spec/integration/selenium/webdriver/remote/**/*_spec.rb"
],
include = ["rb/spec/integration", "build/rb/lib"],
deps = [
"//java/server/test/org/openqa/selenium:server-with-tests:uber",
":remote"
]
)

ruby_test(name = "remote-ie",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
"spec/integration/selenium/webdriver/remote/**/*_spec.rb"
],
include = ["rb/spec/integration", "build/rb/lib"],
deps = [
"//java/server/test/org/openqa/selenium:server-with-tests:uber",
":remote"
]
)

ruby_test(name = "remote-edge",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
"spec/integration/selenium/webdriver/remote/**/*_spec.rb"
],
include = ["rb/spec/integration", "build/rb/lib"],
deps = [
"//java/server/test/org/openqa/selenium:server-with-tests:uber",
":remote"
]
)

ruby_test(name = "remote-wires",
srcs = [
"spec/integration/selenium/webdriver/*_spec.rb",
"spec/integration/selenium/webdriver/remote/**/*_spec.rb"
],
include = ["rb/spec/integration", "build/rb/lib"],
deps = [
"//java/server/test/org/openqa/selenium:server-with-tests:uber",
":remote"
]
)

ruby_library(name = "safari",
srcs = [
"lib/selenium/webdriver/safari/**/*.rb",
Expand Down

0 comments on commit 69be286

Please sign in to comment.