Cucumber - A testing tool?



A lot of test engineers in India do not know or have never even heard of a tool called cucumber, Jbehave is the alternative tool being used but not in big numbers. So for all my fellow testers here is an update on what is cucumber and why do we use it and where does it fit in the testing world ?

Cucumber is a tool for running automated acceptance tests written in a behavior driven development (BDD) style.
  • Cucumber is Aslak Hellesøy’s rewrite of RSpec’s “Story runner”, which was originally written by Dan North.
  • written in the Ruby programming language
  • The language that Cucumber understands is called Gherkin
  • Cucumber was the second most popular testing framework after RSpec in the Ruby Toolbox.
  • Best website to refer - http://cukes.info/
  • 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.
  • While Cucumber can be thought of as a “testing” tool, the intent of the tool is to support BDD
  • Cucumber works with Ruby, Java, .NET, Flex or web applications written in any language
  • Translated in close to 40 spoken languages
  • Cucumber also supports more succinct tests in tables - similar to what FIT does

To use Cucumber :
  1. You need Ruby installed.
  2. Then just run  gem install cucumber from a command prompt.
  3. Now, run cucumber --help
  4. The user describes the behavior of the system with natural language with some specific keywords
  5. The process starts with creating a feature file, which explains a feature of the system and some scenarios of different test situations.
  6. As Cucumber doesn’t know how to interpret the features by itself, the next step is to create step definitions explaining it what to do when finding that step in one of the scenarios.
  7. The step definitions are written in Ruby.
  8. It can use and already has step definitions for Webrat, an acceptance testing tool for Ruby, which simulates a browser without Javascript support. But it can also be combined with a web automation framework like webdriver / waitir.
Best place for tutorials:
  1. Wiki - https://github.com/cucumber/cucumber/wiki
  2. https://github.com/cucumber/cucumber/wiki/tutorials-and-related-blog-posts
  3. Some good sites for starters:
    1. http://blog.spritecloud.com/2010/03/web-testing-with-cucumber/
    2. http://cuke4ninja.com/sec_why_cucumber.html

Comments

  1. Thanks, Glad that helped!

    ReplyDelete
  2. SInce early 2012 there is also Cucumber-JVM - an implementation that runs natively on the JVM.

    There's also Behat (for PHP), Cucumber.js and SpecFlow (for .NET) among others.

    ReplyDelete
  3. When I originally commented I seem to have clicked the -Notify me when new comments are added- checkbox and now whenever a comment is added I receive 4 emails with the same comment. Is there a means you are able to remove me from that service? Thanks!
    Hadoop Online Training

    ReplyDelete
  4. Hi William Thanks for posting very Good Content On Selenium

    ReplyDelete
  5. Nice post Thankyou sharing the post i have a confusion between QA and QC and Performance testing and Load Testing can you tell me about this.

    visit here

    ReplyDelete
  6. Very nice posts,keep update more info.

    learn cognos tm1

    ReplyDelete
  7. Really you have done a good job. Thanks for sharing this valuable information....
    Advantages of Cucumber Framework in BDD
    Behaviour Driven Development

    ReplyDelete
  8. Anonymous17/6/22

    j'y ai pensé Dolabuy Prada blog réplique louis vuitton vous pouvez essayer ceci répliques de sacs gucci

    ReplyDelete

Post a Comment

Popular posts from this blog

Software Testing @ Microsoft

Trim / Remove spaces in Xpath?