This repository provides stuctured steps to learn how to use behave and gherkin:
Behave is a python framework for the BDD technique
https://behave.readthedocs.io/en/stable/
Behavior-driven development (or BDD) is an agile software development technique that encourages collaboration between developers, QA and non-technical or business participants in a software project. We have a page further describing this philosophy.
Check also the cucumber project to get some usefull information
https://cucumber.io/docs/bdd/history/
You can also find other examples in the following links:
https://jenisys.github.io/behave.example/index.html
This repository provides an initiation to behave though the following examples. Those examples does not explore the all power of behave. You can see them as a smooth initiation.
Each step is based on the previous one, improving the way it is done by a new behave concept.
- 00 basics : Minimal getting started with Behave and Gherkin
- 01 print and logging : Introduce behvae.ini and how to display some debug logs.
- 02 context : Introduce the context attribute
- 03 environment file : Introduce the environment file and special functions (before and after)
- 04 step parametrization : Introduce step parametrization
- 05 scenario outline : How to run the same scenario multiple times with parameters ?
- 06 tags and fixtures : How to inject fixture with tags ?
- 07 html report : Generate html report
- 08 hamcrest : Hamcrest
- 09 advanced logging : How to use the logging capture to fill the test report
# Install from the github to get the lastest cool features
pip install git+https://github.com/behave/behave
# Install the html formater, for your bosses :-)
pip install behave-html-formatter
# Top Asserts !
pip install PyHamcrest