Cucumber - A testing tool?
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 :
- You need Ruby installed.
- Then just run gem install cucumber from a command prompt.
- Now, run cucumber --help
- The user describes the behavior of the system with natural language with some specific keywords
- The process starts with creating a feature file, which explains a feature of the system and some scenarios of different test situations.
- 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.
- The step definitions are written in Ruby.