You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Cucumber is a testing tool that supports Behavior Driven Development (BDD). It offers a way to write tests that anybody can understand, regardless of their technical knowledge. In BDD, users (business analysts, product owners) first write scenarios or acceptance tests that describe the behavior of the system from the customer's perspective, for review and sign-off by the product owners before developers write their codes. Cucumber framework uses Ruby programming.


In Cucumber Behavior Driven Development, whatever you write must go into Given-When-Then steps.

Example

Given that a library is added to simply 
And I am logged in
When I shall press get 
Or I press borrow
Or I press reserve
And I have internet connection
And My account has no fines
And My account has not expired
Then Book is on my bookshelf

Gherkin is the a defined syntax for the above test scenario.  It is a set of special keywords to give structure and meaning to executable spec

More can be learned here https://cucumber.io/docs/gherkin/


  • No labels