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:

9676 questions
229
votes
8 answers

iOS Tests/Specs TDD/BDD and Integration & Acceptance Testing

What are the best technologies to use for behavior-driven development on the iPhone? And what are some open source example projects that demonstrate sound use of these technologies? Here are some options I've found: Unit Testing Test::Unit…
ma11hew28
  • 106,283
  • 107
  • 420
  • 616
136
votes
6 answers

RSpec vs Cucumber (RSpec stories)

When should I use specs for Rails application and when Cucumber (former rspec-stories)? I know how both work and actively use specs, of course. But it still feels weird to use Cucumber. My current view on this, is that it's convenient to use…
snitko
  • 9,407
  • 10
  • 59
  • 89
117
votes
1 answer

What's the difference between RSpec and Cucumber?

I have 6 months of Rails development experience. I've built a web application that's in use now with authentication and authorization and postgresql db. I'm moving on to my second Rails application but this time, after lessons learnt, I would like…
banditKing
  • 8,915
  • 26
  • 89
  • 151
104
votes
5 answers

Reuse Cucumber steps

I want to reuse some Cucumber steps but can't seem to find the right way. I want to write a step like: Given /^I login with (.*) credentials$/ |type| # do stuff with type being one of "invalid" or "valid" end But then have another step…
Daniel Huckstep
  • 5,160
  • 8
  • 38
  • 53
94
votes
9 answers

How to get parent node in Capybara?

I'm working with many jQuery plugins, that often create DOM elements without id or other identification properties, and the only way to get them in Capybara (for clicking for example) - is to get their neighbor (another child of its ancestor) first.…
sandrew
  • 2,980
  • 4
  • 17
  • 28
84
votes
13 answers

How to do block comments in Gherkin?

In gherkin syntax (used by Cucumber and SpecFlow, I can comment out a line by prefixing it with '#' Is there any way to block-comment multiple lines?
dbruning
  • 4,587
  • 5
  • 31
  • 33
82
votes
8 answers

Cucumber alternative for .NET

Quick one, has anyone come across a library similar to Ruby's cucumber (a human readable DSL for defining use case stories that can be tested against) in the .NET sphere?
Owen
  • 6,785
  • 6
  • 38
  • 73
76
votes
12 answers

Unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)

While testing scenario by cucumber i'm getting the following error when running rspec tests unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError) Using ruby (1.9.2)…
75
votes
10 answers

How do I get the HTML in an element using Capybara?

I’m writing a cucumber test where I want to get the HTML in an element. For example: within 'table' do # this works find('//tr[2]//td[7]').text.should == "these are the comments" # I want something like this (there is no "html" method) …
Jon Kruger
  • 3,831
  • 4
  • 30
  • 46
71
votes
11 answers

BDD and TDD for node.js?

What is used for BDD and TDD with node.js? I'm used to use Cucumber + RSpec. What's a good combo for node.js? thanks
donald
  • 22,975
  • 38
  • 136
  • 220
68
votes
4 answers

How do I disable a feature in specflow (Gherkin) without deleting the feature?

I have some SpecFlow features (using the Gherkin syntax) and I would like to temporarily disable the feature to prevent its tests from running? Is there an attribute I can mark the feature with to do this? I'm guessing that something that works with…
Simon Keep
  • 9,578
  • 8
  • 59
  • 76
67
votes
9 answers

Find or create record through factory_girl association

I have a User model that belongs to a Group. Group must have unique name attribute. User factory and group factory are defined as: Factory.define :user do |f| f.association :group, :factory => :group # ... end Factory.define :group do |f| …
Slobodan Kovacevic
  • 6,738
  • 3
  • 26
  • 32
65
votes
4 answers

What are the differences between JBehave and Cucumber?

I have read somewhere that JBehave is actually the Java equivalent of Cucumber, whereas Cucumber is based on Ruby. Can someone describe the differences between them provide links that do?
Manoj
  • 863
  • 1
  • 7
  • 9
60
votes
8 answers

Good Cucumber examples in the wild?

I've tried Cucumber for a few projects a couple of years ago and am looking to give it another go. I don't really need another "Beginning Cucumber" article. Instead, I'd like to see some actual uses in the wild—one's that other Cucumber users would…
AndrewO
  • 1,496
  • 1
  • 16
  • 23
51
votes
7 answers

How to pass variables between cucumber-jvm steps

To pass variables between steps I have the step methods belong to the same class, and use fields of the class for the passed information. Here is an example as follows: Feature: Demo Scenario: Create user Given User creation form management …
troig
  • 6,257
  • 4
  • 35
  • 60
1
2 3
99 100