Skip to content

jchapman68/onse-lab-bdd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BDD Lab (Social Network)

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.

Development Setup

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

Running tests

The following commands can be executed inside your pipenv shell.

Style & Linting

flake8

Unit Tests

python -m pytest

Acceptance Tests (features)

behave

PyCharm Run Configuration

Add a run configuration of type Python tests -> pytest with the following settings:

PyCharm Test Config

REMARK:

The BDD support is available only in the PyCharm Professional Edition, not in the Community Edition.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Gherkin 50.9%
  • Python 49.1%