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
17
votes
3 answers

Seed data in cucumber tests

I'm writing a web app which is used a SaS. Each customer has their own db and app directory so I have a rake task which creates all necessary minimum data (seed data) to run their website: default rights and roles, a superadmin user, a "us_states"…
Costi
  • 1,231
  • 2
  • 11
  • 18
17
votes
2 answers

How to use Jasmine and CucumberJS with Protractor

I'm looking to use Protractor, CucumberJS, and Jasmine for testing my project. How do I use both Jasmine and CucumberJS with Protractor? Here's the project setup I've created: /path/to/myproj/protractor.conf.js exports.config = { …
Aristarkh Artemiy
  • 347
  • 1
  • 4
  • 10
17
votes
1 answer

Maven running cucumber specific feature files or folders

How is it possible to use the cucumber feature option from maven command line. Of a tree full of features (tests), I'm trying to run only individual features. In my case - all feature files in a selected folder. I've tried to use the following…
Eldad Assis
  • 10,464
  • 11
  • 52
  • 78
17
votes
4 answers

Cucumber/Capybara vs Selenium?

The other day I was showing one of the testers at my company some tests I had written in cucumber (2 features, 5 scenarios). Then he asked me question that I could not answer: How is this better than selenium or any other functionality test…
treaz
  • 508
  • 2
  • 6
  • 14
17
votes
2 answers

Cucumber "puts" in After hook not outputting anything

In Cucumber, in my env.rb file, I have a before & after hook set up (well, a few of them, some linked to specific tags) but have found the after hooks don't output anything when I put a puts in them. For example, this works: Before do puts "before…
webgirl
  • 395
  • 1
  • 3
  • 12
16
votes
2 answers

Rails 3.1.1 and Cucumber - Error

I have git a little problem running Cucumber. When using cucumber I get the following results: Yanniss-MacBook:rechnungen yannis$ cucumber Using the default…
Jag Älskar
  • 317
  • 3
  • 11
16
votes
1 answer

How to find an image tag by filename using xpath

I am running some cucumber features using capybara and I need to check if a certain image is being shown. I tried this xpath match but apparently the function matches is not available: //img[matches(@src, "my_image.png")]
Macario
  • 2,214
  • 2
  • 22
  • 40
16
votes
4 answers

Is there a BDD framework for testing Javascript that uses Gherkin DSL?

I am very much a fan of BDD and Behat for PHP. Is there something equivalent for Javascript, ie, that uses the Gherkin DSL? Everything I've seen so far is more in line with RSpec, and I would like to approach JS testing more like Cucumber, if…
JoshuaDavid
  • 8,861
  • 8
  • 47
  • 55
16
votes
3 answers

Protractor and Cucumber: function timed out using async/await

I'm doing e2e and bdd tests using Angular 5, Protractor and Cucumber. When I run on terminal ng e2e I get the following error: When I open the page # e2e\steps\home.steps.ts:15 Error: function timed out, ensure the promise resolves within 5000 …
Luis
  • 2,006
  • 5
  • 31
  • 47
16
votes
5 answers

Why is cucumber considered an integration testing tool instead of a unit testing tool?

This has always bothered me. Why is it people say to unit test in rspec but integration test in cucumber? I am not asking why these tests are necessary - I know what the difference is between integration and unit testing. I just don't see why, given…
ryeguy
  • 65,519
  • 58
  • 198
  • 260
16
votes
5 answers

How to run a single cucumber scenario in Intellij?

I have a simple problem - I want to run a single Cucumber scenario, but I can't seem to find any option/configuration for that. I have 5-6 scenarios and I can set up configurations to run all tests, but It takes too much time, when I am correcting…
user3651806
  • 161
  • 1
  • 1
  • 3
16
votes
2 answers

Cucumber scenario outline and examples with generic step definitions

I have a Feature file which is as below: Scenario Outline: Create ABC Given I open the application When I enter username as And I enter password as Then I enter title as And press submit Examples: |…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/cucumber" class="post-tag grid--cell" title="show questions tagged 'cucumber'" rel="tag">cucumber</a> <a href="../../questions/tagged/cucumber-jvm" class="post-tag grid--cell" title="show questions tagged 'cucumber-jvm'" rel="tag">cucumber-jvm</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Mar 25 '14 at 16:10">asked Mar 25 '14 at 16:10</time> <a href="../../users/1165859/trial999" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1165859.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="trial999" /> </a> <div class="s-user-card--info"> <a href="../../users/1165859/trial999" class="s-user-card--link">trial999</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,646</li> <li class="s-award-bling s-award-bling__gold" title="6 gold badges">6</li> <li class="s-award-bling s-award-bling__silver" title="21 silver badges">21</li> <li class="s-award-bling s-award-bling__bronze" title="36 bronze badges">36</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-17277358"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>16</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>4</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/17277358/cucumber-tags-for-scenario-outline-examples" class="question-hyperlink">Cucumber tags for scenario outline examples</a></h3> <div class="excerpt">In the project I am currently working we are using cucumber for integration testing and to keep the regular daily builds from getting too big we use profiles using tags to have a smaller daily test and a larger weekly build test suite. Now I have a…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/cucumber" class="post-tag grid--cell" title="show questions tagged 'cucumber'" rel="tag">cucumber</a> <a href="../../questions/tagged/automated-tests" class="post-tag grid--cell" title="show questions tagged 'automated-tests'" rel="tag">automated-tests</a> <a href="../../questions/tagged/integration-testing" class="post-tag grid--cell" title="show questions tagged 'integration-testing'" rel="tag">integration-testing</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jun 24 '13 at 13:59">asked Jun 24 '13 at 13:59</time> <a href="../../users/1458028/martin-larsson" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1458028.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Martin Larsson" /> </a> <div class="s-user-card--info"> <a href="../../users/1458028/martin-larsson" class="s-user-card--link">Martin Larsson</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,008</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="8 silver badge">8</li> <li class="s-award-bling s-award-bling__bronze" title="25 bronze badge">25</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-12931281"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>16</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/12931281/how-to-organize-the-specs-definition-in-cucumber" class="question-hyperlink">How to organize the specs definition in Cucumber?</a></h3> <div class="excerpt">We are considering to use Cucumber on our project for acceptance testing. When we write a scenario in a Cucumber feature, we write a list of Given, When and Then statements. As we use cucumber-jvm project, the Given, When and Then statement are…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/java" class="post-tag grid--cell" title="show questions tagged 'java'" rel="tag">java</a> <a href="../../questions/tagged/cucumber" class="post-tag grid--cell" title="show questions tagged 'cucumber'" rel="tag">cucumber</a> <a href="../../questions/tagged/acceptance-testing" class="post-tag grid--cell" title="show questions tagged 'acceptance-testing'" rel="tag">acceptance-testing</a> <a href="../../questions/tagged/cucumber-jvm" class="post-tag grid--cell" title="show questions tagged 'cucumber-jvm'" rel="tag">cucumber-jvm</a> <a href="../../questions/tagged/cucumber-junit" class="post-tag grid--cell" title="show questions tagged 'cucumber-junit'" rel="tag">cucumber-junit</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Oct 17 '12 at 09:33">asked Oct 17 '12 at 09:33</time> <a href="../../users/26457/romain-linsolas" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/26457.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Romain Linsolas" /> </a> <div class="s-user-card--info"> <a href="../../users/26457/romain-linsolas" class="s-user-card--link">Romain Linsolas</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">79,475</li> <li class="s-award-bling s-award-bling__gold" title="49 gold badges">49</li> <li class="s-award-bling s-award-bling__silver" title="202 silver badges">202</li> <li class="s-award-bling s-award-bling__bronze" title="273 bronze badges">273</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-1271788"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>16</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>11</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/1271788/session-variables-with-cucumber-stories" class="question-hyperlink">Session variables with Cucumber Stories</a></h3> <div class="excerpt">I am working on some Cucumber stories for a 'sign up' application which has a number of steps. Rather then writing a Huuuuuuuge story to cover all the steps at once, which would be bad, I'd rather work through each action in the controller like a…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/ruby-on-rails" class="post-tag grid--cell" title="show questions tagged 'ruby-on-rails'" rel="tag">ruby-on-rails</a> <a href="../../questions/tagged/testing" class="post-tag grid--cell" title="show questions tagged 'testing'" rel="tag">testing</a> <a href="../../questions/tagged/rspec" class="post-tag grid--cell" title="show questions tagged 'rspec'" rel="tag">rspec</a> <a href="../../questions/tagged/cucumber" class="post-tag grid--cell" title="show questions tagged 'cucumber'" rel="tag">cucumber</a> <a href="../../questions/tagged/webrat" class="post-tag grid--cell" title="show questions tagged 'webrat'" rel="tag">webrat</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Aug 13 '09 at 12:52">asked Aug 13 '09 at 12:52</time> <a href="../../users/18434/matthew-savage" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/18434.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Matthew Savage" /> </a> <div class="s-user-card--info"> <a href="../../users/18434/matthew-savage" class="s-user-card--link">Matthew Savage</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">3,794</li> <li class="s-award-bling s-award-bling__gold" title="10 gold badges">10</li> <li class="s-award-bling s-award-bling__silver" title="43 silver badges">43</li> <li class="s-award-bling s-award-bling__bronze" title="53 bronze badges">53</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/cucumber_page=8" rel="prev" title="Go to page 8">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/cucumber_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/cucumber_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/cucumber_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/cucumber_page=99" rel="" title="Go to page 99">99</a> <a class="s-pagination--item" href="../../questions/tagged/cucumber_page=100" rel="" title="Go to page 100">100</a> <a class="s-pagination--item" href="../../questions/tagged/cucumber_page=10" rel="next" title="Go to page 10"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>