Developer(s) | Aslak Hellesøy, Joseph Wilk, Matt Wynne, Gregory Hnatiuk, Mike Sassak |
---|---|
Stable release |
1.3.15 / May 9, 2014
|
Written in | Ruby |
Operating system | Cross-platform |
Type | Behavior driven development framework / Test tool |
License | MIT License |
Website | cucumber |
Cucumber is a software tool used by computer programmers for testing other software. It runs automated acceptance tests written in a behavior-driven development (BDD) style. Cucumber is written in the Ruby programming language. Cucumber projects are available for other platforms beyond Ruby. Some use Ruby Cucumber with a bridge into the target language (e.g. cuke4php and cuke4lua). Others use the Gherkin parser but implement everything else in the target language. Cucumber allows the execution of feature documentation written in business-facing text.Capybara, which is a part of the Cucumber testing framework, is an example of a web based test automation software.
Gherkin is the language that Cucumber uses to define test cases. It is designed to be non-technical and human readable, and collectively describes use cases relating to a software system. The purpose behind Gherkin's syntax is to promote Behavior Driven Development practices across an entire development team, including business analysts and managers. It seeks to enforce firm, unambiguous requirements starting in the initial phases of requirements definition by business management and in other stages of the development lifecycle.
In addition to providing a script for automated testing, Gherkin's natural language syntax is designed to provide simple documentation of the code under test. Gherkin currently supports keywords in dozens of languages.
Language Operations
Syntax is centered around a line-oriented design, similar to that of Python. The structure of a file is defined using whitespace and other control characters.#
is used as the line-comment character, and can be placed anywhere in a file. Instructions are any non-empty and non-comment line. They consist of a recognized Gherkin keyword followed by a string.
All Gherkin files have the .feature
file extension. They contain a single Feature definition for the system under test and are an executable test script.