| 1 |
.. _id.appendix.more_info: |
| 2 |
|
| 3 |
More Information about Behave |
| 4 |
============================================================================== |
| 5 |
|
| 6 |
|
| 7 |
Tutorials |
| 8 |
------------------------------------------------------------------------------ |
| 9 |
|
| 10 |
For new users, that want to read, understand and explore the concepts in Gherkin |
| 11 |
and `behave`_ (after reading the behave documentation): |
| 12 |
|
| 13 |
* "`Behave by Example <http://behave.github.io/behave.example/>`_" |
| 14 |
(on `github <https://github.com/behave/behave.example>`_) |
| 15 |
|
| 16 |
The following small tutorials provide an introduction how you use `behave`_ |
| 17 |
in a specific testing domain: |
| 18 |
|
| 19 |
* Phillip Johnson, `Getting Started with Behavior Testing in Python with Behave`_ |
| 20 |
* `Bdd with Python, Behave and WebDriver`_ |
| 21 |
* Wayne Witzel III, `Using Behave with Pyramid`_, 2014-01-10. |
| 22 |
|
| 23 |
.. _`Getting Started with Behavior Testing in Python with Behave`: https://semaphoreci.com/community/tutorials/getting-started-with-behavior-testing-in-python-with-behave |
| 24 |
.. _`Bdd with Python, Behave and WebDriver`: https://testingbot.com/support/getting-started/behave.html |
| 25 |
.. _`Using Behave with Pyramid`: https://www.safaribooksonline.com/blog/2014/01/10/using-behave-with-pyramid/ |
| 26 |
|
| 27 |
.. warning:: |
| 28 |
|
| 29 |
A word of caution if you are new to **"behaviour-driven development" (BDD)**. |
| 30 |
In general, you want to avoid "user interface" (UI) details in your |
| 31 |
scenarios, because they describe **how something is implemented** |
| 32 |
(in this case the UI itself), like: |
| 33 |
|
| 34 |
* ``press this button`` |
| 35 |
* then ``enter this text into the text field`` |
| 36 |
* ... |
| 37 |
|
| 38 |
In **BDD** (or testing in general), you should describe **what should be done** |
| 39 |
(meaning the intention). This will make your scenarios much more robust |
| 40 |
and stable because you can change the underlying implementation of: |
| 41 |
|
| 42 |
* the "system under test" (SUT) or |
| 43 |
* the test automation layer, that interacts with the SUT. |
| 44 |
|
| 45 |
without changing the scenarios. |
| 46 |
|
| 47 |
|
| 48 |
Books |
| 49 |
------------------------------------------------------------------------------ |
| 50 |
|
| 51 |
`Behave`_ is covered in the following books: |
| 52 |
|
| 53 |
.. |
| 54 |
|
| 55 |
[TDD-Python] Harry Percival, |
| 56 |
`Test-Driven Web Development with Python`_, O'Reilly, June 2014, |
| 57 |
`Appendix E: BDD <http://chimera.labs.oreilly.com/books/1234000000754/ape.html>`_ |
| 58 |
(covers behave) |
| 59 |
|
| 60 |
.. _`Test-Driven Web Development with Python`: http://chimera.labs.oreilly.com/books/1234000000754 |
| 61 |
|
| 62 |
|
| 63 |
Presentation Videos |
| 64 |
------------------------------------------------------------------------------ |
| 65 |
|
| 66 |
* Benno Rice: `Making Your Application Behave`_ (30min), |
| 67 |
2012-08-12, PyCon Australia. |
| 68 |
|
| 69 |
* Selenium: `First behave python tuorial with selenium`_ (8min), 2015-01-28, |
| 70 |
http://www.seleniumframework.com/python-basic/first-behave-gherkin/ |
| 71 |
|
| 72 |
* Jessica Ingrasselino: `Automation with Python and Behave`_ (67min), 2015-12-16 |
| 73 |
|
| 74 |
* `Selenium Python Webdriver Tutorial - Behave (BDD)`_ (14min), 2016-01-21 |
| 75 |
|
| 76 |
|
| 77 |
.. hidden: |
| 78 |
|
| 79 |
PREPARED: |
| 80 |
--------------------- |
| 81 |
|
| 82 |
.. ifconfig:: not supports_video |
| 83 |
|
| 84 |
* Benno Rice: `Making Your Application Behave`_ (30min), |
| 85 |
PyCon Australia, 2012-08-12 |
| 86 |
|
| 87 |
* Selenium: `First behave python tuorial with selenium`_ (8min), 2015-01-28, |
| 88 |
http://www.seleniumframework.com/python-basic/first-behave-gherkin/ |
| 89 |
|
| 90 |
* Jessica Ingrasselino: `Automation with Python and Behave`_ (67min), 2015-12-16 |
| 91 |
|
| 92 |
* `Selenium Python Webdriver Tutorial - Behave (BDD)`_ (14min), 2016-01-21 |
| 93 |
|
| 94 |
|
| 95 |
.. hint:: |
| 96 |
|
| 97 |
Manually install `sphinxcontrib-youtube`_ |
| 98 |
(from "youtube" subdirectory in sphinx-extensions bundle) |
| 99 |
to have embedded videos on this page (when this page is build). |
| 100 |
|
| 101 |
|
| 102 |
.. ifconfig:: supports_video |
| 103 |
|
| 104 |
Benno Rice: `Making Your Application Behave`_ |
| 105 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 106 |
|
| 107 |
:Conference: PyCon Australia |
| 108 |
:Date: 2012-08-12 |
| 109 |
:Duration: 30min |
| 110 |
|
| 111 |
.. youtube:: u8BOKuNkmhg |
| 112 |
:width: 600 |
| 113 |
:height: 400 |
| 114 |
|
| 115 |
Selenium: `First behave python tuorial with selenium`_ |
| 116 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 117 |
|
| 118 |
:Date: 2015-01-28 |
| 119 |
:Duration: 8min |
| 120 |
|
| 121 |
.. youtube:: D24_QrGUCFk |
| 122 |
:width: 600 |
| 123 |
:height: 400 |
| 124 |
|
| 125 |
RELATED: http://www.seleniumframework.com/python-basic/what-is-python/ |
| 126 |
|
| 127 |
Jessica Ingrasselino: `Automation with Python and Behave`_ |
| 128 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 129 |
|
| 130 |
:Date: 2015-12-16 |
| 131 |
:Duration: 67min |
| 132 |
|
| 133 |
.. youtube:: e78c7h6DRDQ |
| 134 |
:width: 600 |
| 135 |
:height: 400 |
| 136 |
|
| 137 |
`Selenium Python Webdriver Tutorial - Behave (BDD)`_ |
| 138 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 139 |
|
| 140 |
:Date: 2016-01-21 |
| 141 |
:Duration: 14min |
| 142 |
|
| 143 |
.. youtube:: mextSo0UExc |
| 144 |
:width: 600 |
| 145 |
:height: 400 |
| 146 |
|
| 147 |
|
| 148 |
.. _`Making Your Application Behave`: https://www.youtube.com/watch?v=u8BOKuNkmhg |
| 149 |
.. _`First behave python tuorial with selenium`: https://www.youtube.com/watch?v=D24_QrGUCFk |
| 150 |
.. _`Automation with Python and Behave`: https://www.youtube.com/watch?v=e78c7h6DRDQ |
| 151 |
.. _`Selenium Python Webdriver Tutorial - Behave (BDD)`: https://www.youtube.com/watch?v=mextSo0UExc |
| 152 |
|
| 153 |
.. _sphinxcontrib-youtube: https://bitbucket.org/birkenfeld/sphinx-contrib |
| 154 |
|
| 155 |
|
| 156 |
Tool-oriented Tutorials |
| 157 |
------------------------------------------------------------------------------ |
| 158 |
|
| 159 |
JetBrains PyCharm: |
| 160 |
|
| 161 |
* Blog: `In-Depth Screencast on Testing`_ (2016-04-11; video offset=2:10min) |
| 162 |
* Docs: `BDD Testing Framework Support in PyCharm 2016.1 |
| 163 |
<https://www.jetbrains.com/help/pycharm/2016.1/bdd-testing-framework.html>`_ |
| 164 |
|
| 165 |
|
| 166 |
.. _`Getting Started with PyCharm`: https://www.youtube.com/playlist?list=PLQ176FUIyIUZ1mwB-uImQE-gmkwzjNLjP |
| 167 |
.. _`PyCharm In-Depth: Testing`: https://youtu.be/nmBbR97Vsv8?list=PLQ176FUIyIUZ1mwB-uImQE-gmkwzjNLjP |
| 168 |
.. _`In-Depth Screencast on Testing`: https://blog.jetbrains.com/pycharm/2016/04/in-depth-screencast-on-testing/ |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
Find more Information |
| 173 |
------------------------------------------------------------------------------ |
| 174 |
|
| 175 |
.. seealso:: |
| 176 |
|
| 177 |
* google:`python-behave examples <https://www.google.com/?q=python-behave%20examples>`_ |
| 178 |
* google:`python-behave tutorials <https://www.google.com/?q=python-behave%20tutorials>`_ |
| 179 |
* google:`python-behave videos <https://www.google.com/?q=python-behave%20videos>`_ |
| 180 |
|
| 181 |
|
| 182 |
.. _Behave: https://github.com/behave/behave |
| 183 |
.. _behave: https://github.com/behave/behave |
| 184 |
.. _Selenium: http://docs.seleniumhq.org/ |
| 185 |
.. _behave4cmd: https://github.com/behave/behave4cmd |
| 186 |
.. _behave-django: https://github.com/behave/behave-django |