Commit Graph

443 Commits

Author SHA1 Message Date
R. Tyler Croy 749859cda2 Prune this unnecessary random ID 2012-05-24 20:14:27 -07:00
R. Tyler Croy 31ad6e6803 Make sure we set an actual browser_url, else the driver won't know where to go (defaulting to saucelabs.com) 2012-05-24 20:14:27 -07:00
R. Tyler Croy 47f17bb959 Make the tests pass in the example world 2012-05-24 20:14:27 -07:00
R. Tyler Croy 47b242a305 Kill this silly development log 2012-05-24 20:14:27 -07:00
R. Tyler Croy 5460b82ad1 Ignore some Rails cruft in the examples directory 2012-05-24 20:14:27 -07:00
R. Tyler Croy 6b6188d2c3 Define a spec:unit and spec:integration rake task in the root Rakefile 2012-05-24 20:14:27 -07:00
R. Tyler Croy 41642f9815 Remove the unnecessary fake domain nonsense from the Rails2 generator
Fixes #56
2012-05-24 20:14:27 -07:00
R. Tyler Croy c40fe0b230 Make `rake spec:selenium:sauce` *run* inside the rails2-demo with Appraisal, but it doesn't pass 2012-05-24 20:14:27 -07:00
R. Tyler Croy 2198f8ea72 Add sauce boiler plate generated cruft 2012-05-24 20:14:27 -07:00
R. Tyler Croy 354f350720 Add rspec boiler plate
(read: cruft)
2012-05-24 20:14:27 -07:00
R. Tyler Croy b4ff933b76 Add boiler-plate rails2 and rails3 generated applications for testing 2012-05-24 20:14:27 -07:00
R. Tyler Croy d14fdc7032 Merge pull request #71 from jodell/heroku-improvements
better heroku support
2012-05-24 19:58:30 -07:00
Jeffrey ODell 443f33c340 better heroku support 2012-05-16 11:29:36 -05:00
R. Tyler Croy 5832b80ff6 Allow SAUCE_DISABLE_RETRY env variable to disable Capybara retrying
This should help @santiycr and I debug errors in the Sauce service itself
2012-05-15 18:26:31 -07:00
R. Tyler Croy 2534c0bb1b Properly handle formatting Scenario Outlines when executing tests with Jenkins
We need to format the name slightly differently for Jenkins integration
purposes, there's no good tests here because I'm lazy and had a reproduction
case in the Lookout code base. I will regret this.
2012-05-15 13:33:20 -07:00
R. Tyler Croy ba7c3f5c06 Add useful job meta-data in the Cucumber Around hook for the All Tests page
This required some minor changes in Sauce::Job which should not impact anything
else, as far as I can tell.

This also lacks decent tests, partially because I'm lazy, and partially because I used
the Lookout code-base as a guinea pig (since we already have this functionality there)

Fixes #69

2012-05-12 16:52:01 -07:00
R. Tyler Croy be15d7417a Push some Jenkins and Scenario related information to Sauce Labs after a Scenario completes
Fixes #69
2012-05-12 16:31:12 -07:00
R. Tyler Croy 8bc50c2c68 Move a comment into a more relevant location inside of the Around hook 2012-05-12 16:15:14 -07:00
R. Tyler Croy f1b6c35929 Stub out the remainder of the Capybara::Driver::Base API that will likely access Selenium
This might not be the comprehensive list, but it covers the APIs that are
covered by the Capybara::Driver::Selenium class

Fixes #67
2012-05-12 15:27:58 -07:00
R. Tyler Croy d01c158556 Refactor the RetryableDriver code up into Sauce::Capybara::Driver
This way the retryable functionality will be enabled by default, and hopefully
the "standard" driver used will be very reliable!
2012-05-12 15:20:38 -07:00
R. Tyler Croy 42d72a3cf3 Remove the broken Cucumber scenario retry code
Fixes #67
2012-05-12 15:16:36 -07:00
R. Tyler Croy 28011735c4 Add actual retry logic to #handle_retry
This will make #67 actually work, presuming the #base_find actually works
2012-05-08 22:02:17 -07:00
R. Tyler Croy f1c0909abb Add the beginnings of a fully wrapped and retryable Capybara driver
In theory this should help with #67, but it's terribly painful to unit test
and I'm not sure I'll really know if this is working until I put it into production :-/
2012-05-08 21:52:51 -07:00
R. Tyler Croy 27a43c3b3b Handle running the Around hook with Scenario Outlines
Fixes #66
2012-05-02 17:15:00 -07:00
R. Tyler Croy b57326f0d6 Need cucumber to run the tests nowadays 2012-05-02 13:30:26 -07:00
R. Tyler Croy 2ada3d1743 Add a best-effort retry to the Cucumber Around('@selenium') hook to mitigate Selenium UnknownError exceptions
This took a while, is ugly as sin, and will cause your nose to bleed if you
look at it too long.

The basic gist of how/why we have to do these things is:

    * Cucumber::AST::Scenario, Step and StepCollection don't like to be run
      multiple times. In order to acheive a "sane" retry we need to
      re-initialize the Scenario on each retry in order to instantiate new
      underlying Step/StepCollection/StepInvocation objects
    * Exceptions are actually swallowed up by the Cucumber::AST::Scenario in
      order to be reported properly later, so we must fish the exception out of
      the Scenario in order to tell if we need to retry
    * Selenium::WebDriver aliases UnhandledError to UnknownError, which fubars
      any ability to run `e.is_a? Selenium::WebDriver::Errors::UnhandledError`.
      That said, I think we might find other retryable errors in the future so
      this forced the approach used to be extendable.

I know more than I ever wanted to know about Cucumber::Ast thanks to this bug

Fixes #62
2012-04-27 00:40:42 -07:00
R. Tyler Croy 05763397e9 Refactor the Cucumber hooks into module functions to be a bit easier to test.
In order to test these things effectively, we need to pull in some magic code
straight from the cucumber code-base itself.

As far as I can tell, this is the only "reasonable" way to test hooks or things
of that ilk because of the tendency for "cucumber magic" to happen inside of a
weird global 'World' scope

I could just be misunderstanding all of this though.
2012-04-26 23:27:10 -07:00
R. Tyler Croy 7819b14adf Add ruby-debug to our development group 2012-04-26 23:26:02 -07:00
R. Tyler Croy 48ccacd02e Re-organizing the rspec tree 2012-04-26 19:50:41 -07:00
R. Tyler Croy 5d199d2da2 Clean-up these silly requires by pushing the lib dir into the front of our load path 2012-04-26 19:29:07 -07:00
R. Tyler Croy 24b733c009 Reference a properly-cased RSpec module.
Tired of seeing these errors in these test cases.

    DEPRECATION WARNING: you are using a deprecated constant that will
    be removed from a future version of RSpec.

    /home/tyler/.rvm/gems/ree-1.8.7-2011.12@sauce_ruby/gems/rspec-core-2.9.0/lib/rspec/core/hooks.rb:24:in `call'

    * Rspec is deprecated.
    * RSpec is the new top-level module in RSpec-2
2012-04-26 18:10:16 -07:00
R. Tyler Croy 2be56e8a3a Merge branch 'bug/60-report-cuke-name-to-api' 2012-04-05 00:33:51 -07:00
R. Tyler Croy 5ba2376125 Refactor the capybara+cucumber support into a separate file and properly set the job name.
Fixes #60
2012-04-05 00:33:07 -07:00
R. Tyler Croy f67422a2d7 Ignore the ondemand.yml in the root dir 2012-04-04 23:28:01 -07:00
R. Tyler Croy d2531c13f0 Merge pull request #52 from rtyler/bug/48-cucumber-jenkins-integration
Add an Around hook for Cucumber users to integrate with the Jenkins Sauce OnDemand plugin
2012-04-04 23:27:42 -07:00
R. Tyler Croy 7ce0f3137e Ignore the ondemand.yml in the root dir 2012-04-04 23:24:24 -07:00
R. Tyler Croy 8708361d40 Raise the timeout to boot a failing VM 2012-04-04 23:20:55 -07:00
R. Tyler Croy cdc0e8c8e1 Bump our rspec dependency to 2.9 or greater 2012-04-04 22:52:53 -07:00
R. Tyler Croy dc01f50c01 Prune a couple deprecated config attribute references 2012-04-04 22:52:30 -07:00
R. Tyler Croy 48f7936f88 Remove unnecessary seeding of Sauce.config 2012-04-04 22:41:43 -07:00
R. Tyler Croy 737b2df5b7 Allow Sauce#get_config to be invoked without requiring a "seed" with Sauce#config
Fixes #59
2012-04-04 22:39:50 -07:00
R. Tyler Croy dffaeebe6a Add an Around hook for Cucumber users to integrate with the Jenkins Sauce OnDemand plugin
Unfortunately this doesn't come with any tests, I will have to ponder on a good
mechanism for testing cucumber hooks at a later date, when I'm smarter.
2012-04-01 22:49:40 -07:00
R. Tyler Croy ce00177911 Add a good basic example of using cucumber + capybara with the Sauce gem
There are still a lot of niceities that need to be ported from Lookout's
internal fork into the Sauce gem, but this is a start
2012-04-01 18:20:29 -07:00
R. Tyler Croy ae39fc556f Ignore rvmrc's in the tree 2012-04-01 17:53:37 -07:00
R. Tyler Croy 9fe441a177 Require 'sauce/utilities' since it's references further down 2012-04-01 17:41:30 -07:00
R. Tyler Croy fa6368c557 Refactor test_job into an rspec test 2012-03-30 20:43:24 -07:00
R. Tyler Croy a2e7d8c95a Make sure the integration tests can run together 2012-03-30 20:41:45 -07:00
R. Tyler Croy 86b68ed9e4 Move test_selenium.rb into an rspec-driven Selenium test (that works) 2012-03-30 20:27:29 -07:00
R. Tyler Croy b7162c0910 Minor whitespace clean-up 2012-03-30 20:22:15 -07:00
R. Tyler Croy 0a59125e2b Prune the old Sauce::Selenium2 test case 2012-03-30 20:11:47 -07:00