I just installed cucumber, and I tested it. I got the following error:
teefcomp:cucumber-intro teef$ cucumber features/manage_users.feature
Using the default profile...
F----F
Failing Scenarios:
cucumber features/manage_users.feature:6 # Scenario: User List
1 scenario (1 failed)
4 steps (4 skipped)
0m0.029s
It seems to be suppressing the error. I was expecting something like:
Feature: Manage users
In order to understand my user base better
As an administrator
I want to view a list of users
Scenario: User List
Given I have users named George, Mary
uninitialized constant User (NameError)
./features/step_definitions/user_steps.rb:3
./features/step_definitions/user_steps.rb:2:in '/^I have users named (.*)$/'
features/manage_users.feature:7:in 'Given I have users named George, Mary'
Anyone know how to get cucumber to display the errors in full?
--backtrace
, --verbose
, -b
and --trace
do not work; I still see F----F
and the failing scenario is listed, but I still expect something like description on the "NameError" line. Is this a feature of an older version of cucumber? (I'm using screencasts to start using cucumber.)
If your application is a Rails app, you can use the @allow-rescue tag for the scenario-of-interest, then your rails test_log will include more details about where in your application the error was originally raised.
From the command line you can quickly look at the end of the test log with tail -n200 log/test_log.rb (adjust the number of lines to see the portion of interest).
running with the
-b
flag should give you a full backtraceEDIT:
Additionally, you can use the full notation of
--backtrace
. If you are running via rake, run with the--trace
flagto get full output, you can use the
--format
flag. I generally use--format pretty
to get a line-by-line walk through.from the
--help
output.