This is the source material for the BDD lab.
The goal of this lab is to show how to use human readable specifications to drive the development of a system - by using behave, the cucumber-clone BDD framework for Python, to make the specifications into automated tests.
Instructions on how to do this lab can be found in the exercises repository.
Make sure you have the latest version of Python installed (currently 3.7.1) from the Python website.
From within the repository folder, please install the following in order to run the project:
# install the dependencies from Pipfile:
pipenv install --dev
# activate this project's virtualenv:
pipenv shell
Pipenv "automatically creates and manages a virtualenv for your projects, as well as adds/removes packages from your Pipfile as you install/uninstall packages. It also generates the ever-important Pipfile.lock, which is used to produce deterministic builds." 1
The following commands can be executed inside your pipenv shell
.
flake8
python -m pytest
behave
Add a run configuration of type Python tests -> pytest
with the following
settings:
REMARK:
The BDD support is available only in the PyCharm Professional Edition, not in the Community Edition.