Questions tagged [cucumber]

Cucumber is a Behavior Driven Development (BDD) tool that executes functional descriptions written in plain text (structured in the simple Gherkin language) as automated tests.

Cucumber is a Behavior Driven Development (BDD) tool.

It lets software development teams describe how software should behave in plain text structured in the simple Gherkin language. The text is written in a business-readable domain-specific language and serves as documentation, automated tests and development-aid - all rolled into one format.

Cucumber works with Ruby, Java, .NET, Flex or web applications written in any language. It has been translated to over 30 spoken languages.

Cucumber supports over a dozen different software platforms. Every Cucumber implementation provides the same overall functionality, but they also have their own installation procedure and platform-specific functionality.

References:

Related tags:

10965 questions
18
votes
4 answers

How to see exactly what went wrong in Behave

We recently started using Behave (github link) for BDD of a new python web service. Question Is there any way we can get detailed info about the failure cause as tests fails? They throw AssertionError, but they never show what exactly went wrong.…
JOG
  • 5,590
  • 7
  • 34
  • 54
18
votes
3 answers

Cucumber options annotation

The cucumber-jvm javadocs states that purpose of the glue element is to specify the location of the stepdefinitions and hooks. However, this doesn't seem to work for me. Lets say I have my features in directory a, and my step definitions in…
JustDanyul
  • 13,813
  • 7
  • 53
  • 71
18
votes
6 answers

Can't run Jenkins Build - bundle: "command not found"

I am currently trying to run a jenkins build for some of my cucumber tasks. All of my gems have been installed by using the Bundler. The gems are stored in the vendor folder. However, when I try and run bundle install --deployment in the execute…
Jonathan Warykowski
  • 378
  • 1
  • 4
  • 14
17
votes
3 answers

cucumber re-run failed scenarios automatically with a tag?

In our build there are certain scenarios that fail for reasons which are out of our control or take too long to debug properly. Things such asynchronous javascript etc. Anyway the point is sometimes they work sometimes they don't, so I was thinking…
amleszk
  • 6,192
  • 5
  • 38
  • 43
17
votes
2 answers

When running selenium with capybara/rails, how do I configure the server?

Normally I use the rails dev server at port 3000. Capybara/Cucumber uses Capybara.server_port = 31337. If I swap from the default driver to selenium, it looks like it tries to connect on port 80. I'm trying to understand: When using selenium, do I…
cjm2671
  • 18,348
  • 31
  • 102
  • 161
17
votes
6 answers

"Invalid gemspec in" and "Illformed requirement" whenever I create a new project in rails (cucumber issue)

Every time I create a new project I get the following errors: Adams-MacBook-Pro:for_testing adam$ rails new outsidein Invalid gemspec in [/Users/adam/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/specifications/cucumber-1.0.4.gemspec]: Illformed…
AdamT
  • 6,405
  • 10
  • 49
  • 75
17
votes
4 answers

Cucumber: Wait for ajax:success

I have the following typical cucumber steps in a Rails 3.1 project: ... When I follow "Remove from cart" Then I should see "Test Product removed from cart" The difficulty is that "Remove from cart" button is an ajax :remote call, which returns…
PlankTon
  • 12,443
  • 16
  • 84
  • 153
17
votes
5 answers

Is Test::Unit still relevant in rails?

I am learning Rails the age old way. By reading Agile Web Development with Rails (3rd Edition) as a starting point. I am currently in the chapter that teaches Testing. I am also aware of other BDD Testing framework such as RSPec. So I was wondering…
tundal45
  • 193
  • 3
  • 14
  • 33
17
votes
7 answers

Should I be using RSpec or Cucumber

I'm new to unit/func testing in Rails 3. So I'm starting now, better late than never. I have a method in /lib/mailingjob.rb called find_reply(body) Right now I'm using cucumber to test this but given that this is all backend, no web interface to…
AnApprentice
  • 108,152
  • 195
  • 629
  • 1,012
17
votes
3 answers

Setting http headers RSpec 2.4 / Rails 3

I am getting started with RSpec. I have a new rails 3 app which uses the HTTP_ACCEPT_HEADER or the request 2 letter subdomain to set the application language and redirect accordingly. I am successfully testing my redirection code using Cucumber. Now…
gdelfino
  • 11,053
  • 6
  • 44
  • 48
17
votes
5 answers

How can I run Selenium (used through Capybara) at a lower speed?

By default Selenium runs as fast as possible through the scenarios I defined using Cucumber. I would like to set it to run at a lower speed, so I am able to capture a video of the process. I figured out that an instance of Selenium::Client::Driver…
mlangenberg
  • 1,087
  • 11
  • 21
17
votes
3 answers

How can I add my seed data to my test database using rake db:seed?

I'm using Factory Girl to populate my seed data and adding it to the db in seed.rb. I'm then running my tests using Cucumber. I have a price table that contains seed data that I want in all my environments. I want rake db:seed to add it to my dev…
Jamis Charles
  • 5,827
  • 8
  • 32
  • 42
17
votes
4 answers

Is there an equivalent in RSpec to Cucumber's "Scenarios" or am I using RSpec the wrong way?

I'm impressed at the brevity and usefulness of Cucumber's Scenarios, they're a great way to test a load of different cases. e.g. example Cucumber scenario Feature: Manage Users In order to manage user details As a security enthusiast I want to edit…
Peter Nixey
  • 16,187
  • 14
  • 79
  • 133
17
votes
3 answers

Running single cucumber feature doesn't load step definitions

I have a cucumber feature at features/object/create_object.feature. It passes when I execute all of my features with the 'cucumber' command. I'm trying to execute this feature by itself using these commands: cucumber…
tassock
  • 1,633
  • 1
  • 17
  • 32
17
votes
5 answers

Is there a way to detect that I'm in a Selenium Webdriver page from JavaScript?

I'd like to suppress the initialization of TinyMCE inside my tests and can do this easily if the JavaScript can detect that I'm running inside a Selenium-automated page. So, is there some JavaScript code that I can use to detect the Selenium driver?…
Lee Iverson
  • 171
  • 1
  • 1
  • 3