Note that there are some explanatory texts on larger screens.

plurals
  1. PORails + Cucumber + Selenium: Tests failing together, passing separately
    primarykey
    data
    text
    <p>Using: Rails 3.2.13, cucumber (1.2.3), selenium-webdriver (2.31.0), capybara (2.0.3)</p> <p>I am working on a mobile site and need to use selenium to test the javascript features. However, when I try to run the cucumber tests together, the test immediately following the <code>@javascript</code> tagged tests are failing with this:</p> <pre><code> The action 'assets' could not be found for SiteController (AbstractController::ActionNotFound) /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:116:in `process' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:45:in `process' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_controller/metal.rb:203:in `dispatch' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_controller/metal.rb:246:in `block in action' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:36:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:612:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/warden-1.2.1/lib/warden/manager.rb:35:in `block in call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/warden-1.2.1/lib/warden/manager.rb:34:in `catch' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/warden-1.2.1/lib/warden/manager.rb:34:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/head.rb:14:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/params_parser.rb:21:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/flash.rb:242:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/cookies.rb:341:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/activerecord-3.2.13/lib/active_record/query_cache.rb:64:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `_run__1123647381172448721__call__979271738568178806__callbacks' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/cucumber-rails-1.3.1/lib/cucumber/rails/action_controller.rb:10:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/railties-3.2.13/lib/rails/rack/logger.rb:32:in `call_app' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:in `block in call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/activesupport-3.2.13/lib/active_support/tagged_logging.rb:22:in `tagged' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/request_id.rb:22:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/activesupport-3.2.13/lib/active_support/cache/strategy/local_cache.rb:72:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/railties-3.2.13/lib/rails/engine.rb:479:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/railties-3.2.13/lib/rails/application.rb:223:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/builder.rb:134:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/urlmap.rb:64:in `block in call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `each' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/capybara-2.0.3/lib/capybara/server.rb:19:in `call' /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service' /Users/emai/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service' /Users/emai/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run' /Users/emai/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread' </code></pre> <p>I'm guessing something is triggering <code>assets</code> in my wildcard route <code>match ':action(/:id)' =&gt; "site"</code>. However, when I do a command + shift + F in textmate (to look for keywords within the whole project) I can only find one reference to assets in the view and commenting it out doesn't do anything.</p> <p>I also tried changing cucumber to use truncation instead of transaction in my env file:</p> <p>From: <code>Cucumber::Rails::Database.javascript_strategy = :transaction</code> to: <code>Cucumber::Rails::Database.javascript_strategy = :truncation</code></p> <p>but nothing has worked. Is this a bug? Or is there something wrong with my test/views? Is there another alternative to selenium that I could try to test with javascript?</p> <p>UPDATE: trying to install capybara-webkit, but running into error.</p> <pre><code> Nets-Mac-Pro:sl-mobile emai$ bundle install ... ... Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/emai/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb Command 'qmake -spec macx-g++' not available Gem files will remain installed in /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/capybara-webkit-0.14.2 for inspection. Results logged to /Users/emai/.rvm/gems/ruby-1.9.3-p362@sherry3/gems/capybara-webkit-0.14.2/./gem_make.out </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload