BDD vs Gherkin


Index

  1. Thanks
  1. BDD (Behavior Driven Development)
  1. Gherkin
  1. BDD test frameworks
  1. Bibliography


1. Thanks


2. BDD (Behavior Driven Development)

BDD (Behavior Driven Development) is an agile software development process.
It encourages better collaboration among the three amigos:

  1. Developers.
  2. QAs.
  3. POs (Product Owners) or BAs (Business Analysts).

The three amigos must be on the same page so that the feature is described, developed and tested the same way.

What should be accomplished by the three amigos doing meetings is described in the quote below.

“Ideally, when The Three Amigos meet during grooming and planning, they would formalize acceptance criteria as Gherkin features.”

– Andrew Knight

What will bring value to the user is how the feature being developed behaves.
Behavior (feature function) = A scenario of inputs, actions and outcomes.
A product or feature exhibits countless behaviors.


3. Gherkin

Gherkin it’s a test specification language, not a programming language.
It uses a set of special keywords to give meaning and structure to executable specifications.

The structure of a gherkin file consists in describing the feature being tested, the scenarios that will be tested and its steps.

For more information of how gherkin works go to:
https://cucumber.io/docs/gherkin/reference/


4. BDD test frameworks

Based on the gherkin steps texts the BDD test frameworks glue each one of these steps to the programming language being used so that the BDD test frameworks can run all the scenarios like scripts.

List of some python BDD test frameworks:

  • Behave (Similar to cucumber).
  • Radish (More friendly for programmatic testing).
  • Lettuce (Similar to cucumber, but the community is not very much active anymore).
  • Pytest-bdd (Plugin for pytest).

The end.


5. Bibliography

Leave a Comment

Your email address will not be published. Required fields are marked *