rspec-retry | retry randomly failing rspec example | Image Editing library
kandi X-RAY | rspec-retry Summary
kandi X-RAY | rspec-retry Summary
retry randomly failing rspec example
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initialize new instance .
- Convenience method to return a decimal number
- Retrieve the retries of retry
- Determine the default value to sleep
- Determine if not found
- Returns the current instance
- Creates a new example .
rspec-retry Key Features
rspec-retry Examples and Code Snippets
Community Discussions
Trending Discussions on rspec-retry
QUESTION
I use Selenium WebDriver and Chrome to do feature testing in my app. I have already successfully setup multiple rails app with rspec, capybara and selenium, but I can't get why this one does not work.
Here's the problem: When I run the feature tests for the first time, it works according to plan. However, if I run it a second time, selenium crashes with the following message:
Selenium::WebDriver::Error::NoSuchDriverError: invalid session id (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Mac OS X 10.14.3 x86_64)
I might add that feature tests work perfectly in other apps, so this is not a Chrome/chromedriver compatibility issue.
I have been working on this for days now and I cannot figure out what's happening
Here's my config:
- selenium-webdriver (3.141.0)
- capybara (2.7.1)
- Chrome 74 and chromedriver 74.0.3729.6
support/capyabara.rb
ANSWER
Answered 2019-May-06 at 16:59The first thing I notice is that you're using a 3 year old version of Capybara with new versions of selenium-webdriver
, Chrome
, and chromedriver
. Since selenium-webdriver
doesn't follow SemVer expecting those to work correctly together is a stretch. You probably want to upgrade Capybara.
Often this error is caused by resource issues with Chrome. Since you appear to be running on MacOS that's not as likely as if you were running this in containers. However it wouldn't hurt to try adding the disable-dev-shm-usage
chrome option, and/or setting the window size smaller to see if the error goes away. You could also just try a reboot.
Beyond that a couple of other potentials are
You have an after block registered that has already closed the session - comment out the after block and see if the issue goes away
A bug in chromedriver 74 (of which a few have been reported - https://bugs.chromium.org/p/chromedriver/issues/detail?id=2885, etc) - try rolling back to chrome and chromedriver 73 to see if the issue goes away
QUESTION
I have a docker-compose.yml as given below with service defined for selenium using selenium/standalone-chrome-debug
image.
ANSWER
Answered 2019-Jul-16 at 04:59You need the hub image which is missing in the above compose file. Link the hub image to node image
QUESTION
I'm noticing a strange issue that I haven't been able to solve for a few days.
I have a Rails 5 API server with system tests using RSpec and Capybara + Selenium-webdriver driving headless Chrome.
I'm using Capybara.app_host = 'http://localhost:4200'
to make the tests hit a separate development server which is running an Ember front-end. The Ember front-end looks at the user agent to know to then send requests to the Rails API test database.
All the tests run fine except for ones which use RSpec file fixtures.
Here's one spec that is failing:
...ANSWER
Answered 2018-Nov-20 at 05:28I finally got my test suite to pass by switching page.driver.browser.navigate.refresh
to visit(page.current_path)
.
I know it's an ugly hack but it's the only thing I could find to get things working (see my various attempts in the question edits).
I looked at the request to chromedriver that was causing the timeouts each time: POST http://127.0.0.1/session//refresh
. I can only guess that it's some kind of issue with chromedriver. Perhaps incidentally, it only hangs when multiple chromedriver instances are active (which happens when multiple Capybara sessions are being used).
Edit: I needed to account for query params as well:
QUESTION
I have a Deal model with a model Step associated. a deal has_many Steps and a step belongs to a Deal.
I create a Deal Factory:
...ANSWER
Answered 2018-Mar-29 at 17:51The easiest solution to this is to just define arrays of the changing values and use those in your FactoryGirl steps
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rspec-retry
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page