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
30
votes
4 answers

How to get name of scenario in cucumber java?

I would like to get name of scenario to have meaningful logs and to generate custom report at run-time in java. Scenario class have only has getStatus() and getSourceTagNames() methods. I don't find a way to get scenario name. Can someone help me…
user2365105
  • 325
  • 2
  • 5
  • 8
29
votes
12 answers

Selenium-chromedriver: Cannot construct KeyEvent from non-typeable key

I updated my Chrome and Chromedriver to the latest version yesterday, and since then I get the following error messages when running my Cucumber features: .... unknown error: Cannot construct KeyEvent from non-typeable key (Session info:…
user16390406
29
votes
2 answers

Is it possible to navigate from feature file to step definition in VSCode

I am primarily using RubyMine for Cucumber/Ruby, and now, I'm getting my hands on VSCode, with which I'm able to run and debug test cases. I can't find a way to navigate from feature to step definition. I tried searching for extensions and…
Vignesh Paramasivam
  • 2,360
  • 5
  • 26
  • 57
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 S
  • 4,366
  • 6
  • 59
  • 97
29
votes
4 answers

Is it possible to take a screenshot of the whole page with Selenium/Capybara?

PhantomJS has the option of taking a screenshot of the whole page (not just the current viewport). Is there any way to do so using Selenium? I am running the Cucumber/Capybara tests headlessly, using the headless gem. I would use PhantomJS, but I've…
TrashyMcTrash
  • 1,234
  • 2
  • 15
  • 39
27
votes
4 answers

Cucumber / Capybara Error: arguments[0] is undefined (Selenium::WebDriver::Error::JavascriptError)

I've been running my tests via the terminal for a while now without any problems.: cucumber Create\ New\ Game.feature Which contains the following: Feature: Create New Game Background: Given I am logged in Scenario: Cleanup & New Game 01 …
James
  • 303
  • 3
  • 10
27
votes
2 answers

Optional parameter in cucumber

I have a step definition in which I'd like to have an optional parameter. I believe an example of two calls to this step explains better than anything else what I'm after. I check the favorite color count I check the favorite color count for email…
larryq
  • 15,713
  • 38
  • 121
  • 190
26
votes
3 answers

How to find Cucumber steps that are not used

I've been working with Cucumber for about a year and have been continually refactoring the features and step definitions along the way. I have tons of steps defined across many files and I can't help but feel like many of them are no longer needed.…
Peter Brown
  • 50,956
  • 18
  • 113
  • 146
26
votes
6 answers

Rails 3.0.9 + Devise + Cucumber + Capybara the infamous "No route matches /users/sign_out"

I am using devise 1.4.2 with rails 3.0.9, cucumber-rails 1.0.2, capybara 1.0.0. I got No route matches "/users/sign_out" error when I clicked logout. I added :method => :delete to link_to tag after going through this so question (…
Zeeshan
  • 3,462
  • 2
  • 25
  • 28
25
votes
3 answers

cucumber vs. RSpec

I want to start diving into BDD. I have never used TDD before and am not sure if I should start by learning RSpec and then jump to Cucumber or just go straight to using Cucumber. I have been reading on the internet about both and it seems to me…
user1066586
  • 311
  • 3
  • 7
25
votes
1 answer

Rails: Good Rspec2 example usage? (Also: Cucumber, Pickle, Capybara)

I'm looking for a rather recent open source application that uses Rspec 2 as test library. I'd like to see how an experienced developer utilizes the library properly to test the full stack, since I'm constantly in doubt concerning my own knowledge…
polarblau
  • 17,649
  • 7
  • 63
  • 84
25
votes
4 answers

cucumber: how to run specific scenario from a feature file

I have multiple scenarios listed in a feature file and I need to run only a single failing scenario (for debugging purposes). I have mentioned @tag before the scenario but while in Test Runner file when given this tag it is running entire feature…
Aditya
  • 457
  • 2
  • 8
  • 27
25
votes
1 answer

Integration vs acceptance test ... what is Cucumber / Steak?

For integration tests of my Rails web app I use Steak (something like Cucumber). The specs of Steak are in a folder named spec/acceptance. Are Steak/Cucumber now for integration or acceptance testing? I always thought that this is something…
medihack
  • 16,045
  • 21
  • 90
  • 134
25
votes
4 answers

Element is not clickable at point . Other element would receive the click:

I'm trying to click a button on top of the page.I'm using CSS selector and it works perfectly fine when I run it in my local eclipse.But when I try to run it on Jenkins server on my local machine it fails, saying element not clickable. When I saw…
Samantha
  • 357
  • 2
  • 7
  • 17
25
votes
13 answers

Undefined step definitions in IntelliJ

I'm trying to follow this article to match Cucumber specs with step definitions in IntelliJ. When I press Alt+Enter, I see Inspection 'Undefined Step' options. However, I should see the intention action Create Step Definition. I thought I had the…
niftygrifty
  • 3,452
  • 2
  • 28
  • 49