More Information about Behave¶
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:
- Phillip Johnson, Getting Started with Behavior Testing in Python with Behave
- Bdd with Python, Behave and WebDriver
- Wayne Witzel III, Using Behave with Pyramid, 2014-01-10.
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:
- the “system under test” (SUT) or
- the test automation layer, that interacts with the SUT.
without changing the scenarios.
Behave is covered in the following books:
- Benno Rice: Making Your Application Behave (30min), 2012-08-12, PyCon Australia.
- Selenium: First behave python tutorial with selenium (8min), 2015-01-28, http://www.seleniumframework.com/python-basic/first-behave-gherkin/
- Jessica Ingrasselino: Automation with Python and Behave (67min), 2015-12-16
- Selenium Python Webdriver Tutorial - Behave (BDD) (14min), 2016-01-21