For new users, that want to read, understand and explore the concepts in Gherkin and behave (after reading the behave documentation):
The following small tutorials provide an introduction how you use behave in a specific testing domain:
Warning
A word of caution if you are new to “behaviour-driven development” (BDD). In general, you want to avoid “user interface” (UI) details in your scenarios, because they describe how something is implemented (in this case the UI itself), like:
press this button
enter this text into the text field
In BDD (or testing in general), you should describe what should be done (meaning the intention). This will make your scenarios much more robust and stable because you can change the underlying implementation of:
without changing the scenarios.
Behave is covered in the following books:
[TDD-Python] Harry Percival, Test-Driven Web Development with Python, O’Reilly, June 2014, Appendix E: BDD (covers behave)
JetBrains PyCharm:
See also