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
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
  • 850
  • 15
  • 25
39
votes
1 answer

Can I escape the pipe in specflow (or gherkin)

I've got a specflow step table that I want to have the | (pipe) character as a part of the content. Example: Then the data should be | Field | Value | | SomeField | a|b|c | But this doesn't work. How can I escape the pipe character?
viggity
  • 14,639
  • 7
  • 79
  • 91
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,022
  • 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,044
  • 1
  • 40
  • 59
36
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,578
  • 3
  • 24
  • 33
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
  • 517
  • 1
  • 4
  • 11
34
votes
2 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,119
  • 6
  • 39
  • 65
33
votes
3 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
  • 1,774
  • 4
  • 23
  • 36
31
votes
1 answer

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
  • 31,184
  • 26
  • 77
  • 102
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\…
Nicolas Garnil
  • 6,146
  • 3
  • 33
  • 48
29
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
  • 974
  • 3
  • 16
  • 27
29
votes
8 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
  • 981
  • 2
  • 13
  • 37
29
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
  • 579
  • 1
  • 7
  • 16
29
votes
5 answers

Is Page Object Model linking compatible with Cucumber's Gherkin?

With Test Automation's Page Object Model we link pages together like this: WebDriver driver = new WebDriver() HomePage homePage = new HomePage(driver); LoginPage loginPage = homePage.GoToLoginPage(); WelcomePage welcomePage =…
Charlie Seligman
  • 3,508
  • 4
  • 50
  • 84
28
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
  • 1,645
  • 1
  • 16
  • 19