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
40
votes
2 answers

Is it possible to write a gherkin step on multiple lines?

I am new to the Gherkin language and this seems to me like very basic question but I could not find answer to it. I am aware that it is possible to write multi-line step argument in Gherking, like this: Given a blog post named "Random" with Markdown…
Dragan Nikolic
  • 1,536
  • 3
  • 17
  • 24
40
votes
9 answers

How to ignore particular scenario in cucumber?

I am using cucumber to feed scenario and java as a language. I need to ignore particular scenario, while running an automation test. I have tried with below @ignore syntax, it doesn't work at all. It doesn't skip particular scenario, it keeps on…
selvi
  • 1,271
  • 2
  • 21
  • 41
40
votes
6 answers

How to assert on number of html table rows in ruby using capybara + cucumber

I am trying to get to grips with BDD web development in Ruby using cucumber + capybara and I am stuck at what should be an easy task - just to check the number of rows in a table. The intention of what I'm trying to achieve is something along the…
Neil
  • 609
  • 2
  • 7
  • 14
39
votes
6 answers

Cuke4Nuke or SpecFlow?

I am trying to decide if I should use Cuke4Nuke or SpecFlow. What are the pro/cons of each? Opinions on which is better and why. Thanks!
Rich Blumer
  • 960
  • 1
  • 15
  • 26
38
votes
8 answers

Are there any non-developer tools to edit gherkin files?

Gherkin syntax files are just plain text so any editor such as notepad can be used. However, one of the more important things we are using this for is to provide tables of sample data. Without good formatting options the files become hard to…
toddles2000
  • 1,032
  • 1
  • 8
  • 16
38
votes
6 answers

BDD with Cucumber and rspec - when is this redundant?

A Rails/tool specific version of: How deep are your unit tests? Right now, I currently write: Cucumber features (integration tests) - these test against the HTML/JS that is returned by our app, but sometimes also tests other things, like calls to…
wuputah
  • 11,285
  • 1
  • 43
  • 60
37
votes
4 answers

Cucumber Capybara scroll to bottom of page

I'd like to use my Cucumber/Capybara setup to test endless scroll by driving a browser and scrolling to the bottom of the page to ensure that the new content is loaded. Is there a way to do this?
Eric M.
  • 5,399
  • 6
  • 41
  • 67
37
votes
8 answers

How do you POST to a URL in Capybara?

Just switched from Cucumber+Webrat to Cucumber+Capybara and I am wondering how you can POST content to a URL in Capybara. In Cucumber+Webrat I was able to have a step: When /^I send "([^\"]*)" to "([^\"]*)"$/ do |file, project| proj =…
Clinton
  • 3,638
  • 3
  • 26
  • 33
37
votes
5 answers

Execute Cucumber step before/after a specific feature

I want to specify certain setup and tear down steps for each specific feature file. I've seen hooks that allows code to execute before every scenario, and hooks to execute code before each feature, but I want to specify code to run once before and…
Dave Novelli
  • 2,086
  • 4
  • 32
  • 42
35
votes
1 answer

I keep getting the error, "Unimplemented substep definition" in IntelliJ with Cucumber?

I have already: Downloaded the Cucumber Java, Gherkin plugin I already have the steps and features directories: My directory structure looks like this: - test - java - features - featureSet1 -…
junecng
  • 525
  • 1
  • 4
  • 12
33
votes
1 answer

what is the difference between io.cucumber and info.cukes

I am trying to integrate BDD using Cucumber. But I am really confused what is the difference between io.cucumber and info.cukes libraries. And which one to use and when. I tried to read and understand the github README.md file still can't make heads…
Alok
  • 1,441
  • 4
  • 20
  • 31
32
votes
2 answers

How to verify number of records using capybara

I am using capybara along with cucumber on a Rails 2.3.9 project. I have users index page and I have two records there. Using capybara how do I assert that there are only two records in the page. HTML structure is like this
Nick Vanderbilt
  • 36,724
  • 29
  • 83
  • 106
31
votes
2 answers

Parse issues when trying to use "Examples" section in Cucumber feature

No luck in googling on this error message features/manage_hand_evaluator.feature: Parse error at features/manage_hand_evaluator.feature:21. Found examples when expecting one of: comment, py_string, row, scenario, scenario_outline, step, tag.…
Craig Flannagan
  • 609
  • 2
  • 8
  • 16
31
votes
2 answers

Capybara expect page to have content more than once

Does anybody know how to find if a page has a text more than once? I know I can use expect(page).to have_content("my-text") to check if text appears once. However, I need something like expect(page).to have_content("my-text").twice (which doesn't…
Tonatiuh
  • 2,205
  • 1
  • 21
  • 22
30
votes
4 answers

Error running osascript -e 'tell app "TextMate" to reload bundles'

I'm trying to install Cucumber bundle for TextMate2. I followed the following instructions from the official page https://github.com/cucumber/cucumber-tmbundle: mkdir -p ~/Library/Application\ Support/TextMate/Bundles/ cd ~/Library/Application\…
carpamon
  • 6,515
  • 3
  • 38
  • 51