Permalink
Browse files

use saucelabs-adapter 0.9.0, and new sauce connect tunnel method. ci …

…now runs both rspec and test unit
  • Loading branch information...
1 parent f825290 commit dd7c66a451e789df9b83e1d8bc70ee4da1840674 @thewoolleyman thewoolleyman committed Jan 21, 2011
View
@@ -6,3 +6,4 @@ db/*.sqlite3
.idea
config/selenium.yml
.bundle
+sauce_connect.log
View
@@ -1,8 +1,8 @@
source :gemcutter
gem "rails", "2.3.5"
-gem "saucelabs-adapter", ">= 0.8.22"
-#gem "saucelabs-adapter", :path => "/saucelabs-adapter" # for local testing - create a symlink to your working copy
+gem "saucelabs-adapter", ">= 0.9.0"
+#gem "saucelabs-adapter", :path => "/saucelabs-adapter" # for local testing - comment the line above, uncomment this one, and create a symlink or edit path to your working copy
gem "selenium-client", "1.2.18"
gem "webrat", "0.7.3"
gem "json"
View
@@ -12,9 +12,11 @@ GEM
activesupport (= 2.3.5)
activesupport (2.3.5)
cgi_multipart_eof_fix (2.5.0)
+ cmdparse (2.0.3)
daemons (1.1.0)
fastthread (1.0.7)
gem_plugin (0.2.3)
+ highline (1.6.1)
json (1.4.6)
lsof (0.3.0)
mime-types (1.16)
@@ -23,7 +25,7 @@ GEM
daemons (>= 1.0.3)
fastthread (>= 1.0.1)
gem_plugin (>= 0.2.3)
- net-ssh (2.0.24)
+ net-ssh (2.1.0)
net-ssh-gateway (1.0.1)
net-ssh (>= 1.99.1)
nokogiri (1.4.4)
@@ -44,11 +46,22 @@ GEM
rspec-rails (1.3.3)
rack (>= 1.0.0)
rspec (= 1.3.1)
- saucelabs-adapter (0.8.22)
+ sauce (0.12.9)
+ cmdparse (>= 2.0.2)
+ highline (>= 1.5.0)
+ json (>= 1.4.6)
+ net-ssh
+ net-ssh-gateway
+ rest-client
+ selenium-client (>= 1.2.18)
+ saucelabs-adapter (0.9.0)
+ activesupport (>= 2.3.0)
lsof (>= 0.3.0)
net-ssh (>= 2.0.12)
net-ssh-gateway (>= 1.0.1)
rest-client (>= 1.5.0)
+ sauce (>= 0.12.9)
+ sauce (>= 0.12.9)
selenium-client (>= 1.2.17)
selenium-client (1.2.18)
webrat (0.7.3)
@@ -65,6 +78,6 @@ DEPENDENCIES
rails (= 2.3.5)
rspec (~> 1.3.0)
rspec-rails (~> 1.3.0)
- saucelabs-adapter (>= 0.8.22)
+ saucelabs-adapter (>= 0.9.0)
selenium-client (= 1.2.18)
webrat (= 0.7.3)
View
@@ -4,9 +4,11 @@
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
+
+task :default => 'selenium:ci' # It would be nice if this actually worked...
+
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
-task :default => 'selenium:sauce'
@@ -16,21 +16,6 @@ saucelabs: &saucelabs
saucelabs_browser: "firefox"
saucelabs_browser_version: "3."
saucelabs_max_duration_seconds: 300
- # Selenium RC browser connects to and tests the app at this URL:
- application_address: "this will be ovewritten if tunnel_method == :saucetunnel"
application_port: 4000
- # App host is actually a tunnel that tunnels from <application_address>:<application_port> to localhost:<tunnel_to_localhost_port>
- # There are 3 kinds of tunnels:
- #
- tunnel_method: :saucetunnel
- tunnel_to_localhost_port: 4000 # Warning: application_port and tunnel_to_localhost_port must be identical if you are using Webrat
- tunnel_startup_timeout: 240
- #
- # tunnel_method: :sshtunnel
- # application_address: "proxy.mycompany.com"
- # tunnel_username: fred
- # tunnel_keyfile: "/path/to/keyfile"
- # or
- # tunnel_password: "password"
- #
- # tunnel_method: :othertunnel You're managing your tunnel independently
+ tunnel_to_localhost_port: 4000
+ tunnel_method: :sauceconnecttunnel
@@ -12,7 +12,11 @@ namespace :selenium do
Rake::Task[:'selenium:server'].clear_actions if Rake::Task.exists?('selenium:server')
desc "Run both test/unit and rspec tests, at saucelabs.com"
- task :ci => [:sauce, :'spec:sauce']
+ task :ci => [:'spec:sauce', :'suite'] do
+ if (File.exist?("sauce_connect.log") && ENV['CC_BUILD_ARTIFACTS'])
+ FileUtils.cp("sauce_connect.log", ENV['CC_BUILD_ARTIFACTS'])
+ end
+ end
desc "Run both test/unit and rspec tests, locally"
task :localci => [:local, :'spec:local']
@@ -2,7 +2,7 @@ class WidgetTest < ActionController::IntegrationTest
def test_widget
visit "/widget"
- assert_contain "This is widget/show.html.erb"
+ assert_contain "This is widget/show.html.erb"
click_link "Go to edit page"
assert_contain "Your test appears to be working correctly"
end
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit dd7c66a

Please sign in to comment.