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 -
  • 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 -
  3. Some good sites for starters:


Cucumber CheatSheet

After all the cheatsheets for QTP,  selemium, webdriver regular expressions, agile. Here is Cucumber:

Best cheatsheet is defnly:

cucumber --help

Output formats


Notification formats, in increasing order of verbosity:

cucumber --format progress

cucumber --format stepdefs

cucumber --format html

cucumber --format pdf

--format rerun would be helpful, as it enables automatically re-running failing tests. However that is broken (but they're working on it) in Cucumber 0.5.1 as of Dec 21 2009.

--format junit would also be useful: it produces an XML report format like JUnit's. That report can be consumed by CruiseControl and numerous other tools. But that format also appears (I only checked on 1 machine so far) broken as of 12/22/2009.


In order of usefulness.

cucumber --format usage --dry-run

cucumber --format tag_cloud

cucumber --format usage

cucumber --format debug

Note that usage performs profiling when invoked without --dry-run.


Most deps are installed automatically. But some must be manually installed:

gem install prawn

Prawn is needed for PDF output.

Test Automation + Geeks = Low Maintenance

Here are some amazing snapshots that will make you think and be proud to be an automation engineer:


QC cannot run manual BPT components

Have you ever tried to run manual components in any version that supports BPT framework. You would be surprised that you get a wrong error message stating:

"Cannot run component xyz in busines process test xyz. This version of Quality Center does not support running components of the type MANUAL."

Really? No that's a wrong error message. What happens is QC is  it would always try to run the components automated first, even if the components in the test  are "manual" components.

Solution : When you go to run the test, make sure you click on the little black down arrow next to the Run button. From there select, "Run Manually"

All in One - HP changes the way we automate and test

  • Hewlett-Packard is incorporating three different components, previously available separately, into its HP Unified Functional Testing (UFT) automated testing application so developers can test all aspects of a multi-tiered application from a single interface.
  • The company will also offer a cloud service that will allow developers to test mobile applications.
  • UFT 11.5, due to be released early next month, has been updated to better accommodate this more rapid pace of development
  • UFT 11.5 simplifies the testing process by combining a number of different tests into one screen
  • Now, developers can test, from a single console, all three layers: the interface, the service layer and the database layer.
  • The consolidation of features also better supports continuous integration, a practice of frequently testing the software being developed, through the use of tools such as Jenkins, to which UFT can be connected.
  • UFT 11.5 also includes a new patented recognition technology that can scan applications and document how they operate.



dynaTrace Ajax + QTP/Selenium = More than automation

Ever wondered apart from the plain raw automated scripts what MORE could we achieve which will help the business achieve MORE with the same cost.
Performance is what we are looking for with the same old GUI automation!

  • GUI Automation + Performance = Value Added Automation
  • GUI Automation + Performance =
    • Selenium + dynaTrace Ajax
    • QTP + dynaTrace Ajax
    • Any automation tool + dynaTrace Ajax
      • Request Start Time Business Event Time
      • DNS/Network Time
      • OnLoad Time Latency
      • Rendering Time
      • JS Execution Time
      • Resource Download Time
Problem areas when it comes to testing web 2.0 applications:
  1. JavaScript
  2. XmlHttpRequests
  3. DOM Manipulations
  4. Frameworks
  5. Layouting
  6. Rendering.
dynaTrace AJAX Edition has been built to address all these issues to help understand what is causing performance- and functional-related problems in modern AJAX Applications.

Here is a Step-by-Step Guide to dynaTrace Ajax Edition:


Skillset for a Selenium Automation tester

As always here is another interesting job requirement and we can map our skillset to this posting for a "Selenium Automation tester"

A very challenging automated testing position has emerged for one of the most exciting companies based in the city of London. My Client a Global Hedgefund company, incubating start up greenfield projects, they are in the market for a technical, innovative and passionate Automated Tester. This brilliant opportunity is open to an experienced Automated tester with a strong programming knowledge, ideally in C# or any object orientated language. The successful Automate tester will be designing, implementing, and executing manual and automated tests and must have experience using Selenium to build their own test frameworks in C#. The successful Automated tester will be part of a test team set revolutionise the financial industry with state of the art technology..

The successful QA Test Analyst will also have the following skill set:

- A background in development, ideally C# or ASP.Net

- Solid experience of building their own test automation frameworks from scratch

- Experience in API testing and Proficient in using tools such as JUnit, NUnit, Nhibernate

- Performance/Load testing of websites and webservices

- Experience of a complete software development life cycle

- Building Test Harnesses

- Agile / Scrum / TDD / BDD

- Scripting skills in one of the following - TCL, Perl, Python, HTML, Shell, Unix

Note the Skillset category is just to gauge where you stand in terms of the skills required for the role