In the field of software engineering, Behaviour Driven Development(BDD) is the one of the emerging development approach, based on the passing of the acceptance testing criteria, for each feature or functionality, to be development.
In Behaviour Driven Development, firstly, test scripts are created for each of the functionality or requirements, in the consultation with the developers/programmers and the users/client/stakeholder and thereafter, developed code is made to pass through these test cases. If the code fails, it is refactored/corrected accordingly, to pass these test cases.
It is one of the unique methodology, where test scripts are made first, and accordingly codes are developed to pass these tests, so as to ensure that all the codes, being developed are meeting the specified requirements and specifications.
To Support the development process, using BDD approach, there are numerous tools and frameworks, are readily available in the market. Cucumber is one of the widely known and used tool/framework, used for the purpose of supporting the behaviour driven development. So, let's have an overview of the cucumber, so as to understand, its advantage and preference over other tools/frameworks.
Cucumber is an open source tool/framework, built for the purpose of supporting behaviour driven development methodology. This tool is used in developing the acceptance test scripts for the purpose of automation, especially for the web applications, by implementing business rules and requirements, along with the possible test scenarios.
It is written in the ruby programming language. However, it is a cross platform tool and may be used for other projects also, involving programming languages, other than the ruby.
This tool makes use of the Gherkin parser, a plain English text, used for the purpose of defining and creating the test cases. This plain English text, helps in defining and outlining the user stories, business requirements, test scenarios, etc. in a non-technical and a simple readable & understandable format, so as to provide easiness to the developers, testers, along with the non-technical users, such as business analyst, users, etc., to have clear understanding of the product and prevents the consideration of unambiguous requirements.
The Cucumber software tool usually comprises of feature file, which may be further divided into following components:
Advertisement: