Debugging in Cucumber
Spreewald includes a few useful steps for debugging a Capybara session.
Then show me the page # => Opens the page in the browser
Then debugger # => Open a debugging session
Related cards:
Debugging cucumber feature with javascript + firefox vnc
TL;DR Debugging problems with javascript errors in cucumber tests is sometimes easier in the browser. Run the test, stop at the problematic point (with Then pause
from Spreewald 1.7+) and open VNC for...
Never write a Cucumber step definition again with Cucumber Factory - Gem Session: gem
I love Cucumber, but I hate writing step definitions. They are ugly, awkward to write and very, very boring: Most step defintions merely create objects for a scenario to chew on.
cucumber_factory: How to keep using Cucumber 2 Transforms in Cucumber 3
Cucumber up to version 2 had a neat feature called Step Argument Transforms which was dropped in favor of Cucumber 3 [ParameterTypes](https://cucumber.io/blog/upgrading-to-cucum...
Fix: Cucumber won't start though cucumber.yml is correct
This is for you if you get this error:
cucumber.yml was found, but could not be parsed. Please refer to cucumber's documentation on correct profile usage.
Actually, it's likely that your cucumber.yml
is just fine but not your rerun.txt
....
Cucumber may complain about cucumber.yml being invalid when it is valid
Running Cucumber tests while your cucumber.yml is 100% valid may still produce the following error.
cucumber.yml was found, but could not be parsed. Please refer to cucumber's documentation on correct profile usage.
This may in fact be d...
New Firefox and gem versions for our Selenium testing environment (Ubuntu 14.04+)
Firefox 5.0.1, which we were using for most Rails 2.3 projects, does not run on Ubuntu 14.04 any more. Here is how to update affected projects.
- Update (or create)
.firefox-version
with the content:24.0
If you haven't installed Firefo...
Parallel cucumber: How to pass in cucumber arguments
Here is an example with the --tags
option. You need to wrap them inside --cucumber-options
option of parallel_cucumber
.
DISPLAY=:17 bundle exec parallel_cucumber --cucumber-options '--tags @solo' features
See more details in the [d...
How to test bundled applications using Aruba and Cucumber
Aruba is an extension to Cucumber that helps integration-testing command line tools.
When your tests involve a Rails test application, your tool's Bundler environment will shadow that of the test application. ...
How to test a confirm dialog with Cucumber? - Stack Overflow
Seems like there's no way to do it in Capybara, unfortunately. But if you're running your tests with the Selenium driver (and probably other drivers that support JavaScript), you can hack it
Background - cucumber - GitHub
Background allows you to add some context to the scenarios in a single feature. A Background is much like a scenario containing a number of steps. The difference is when it is run. The background is run before each of your scenarios but after any ...