skip to navigation
skip to content

behave-django 0.3.0

Behave BDD integration for Django

Package Documentation

Latest Version: 1.1.0

Behave BDD integration for Django


  • Web Browser Automation ready
  • Database transactions per scenario
  • Use Django’s testing client
  • Use unittest + Django assert library
  • Use behave’s command line arguments
  • Use behave’s configuration file
  • Fixture loading


behave-django supports all current Django and Python versions. Specifically, our tests cover:

Django 1.4.22, 1.5.12, 1.6.11, 1.7.10, 1.8.4, and Python 2.6, 2.7, 3.3, 3.4.


Install using pip

$ pip install behave-django

Add behave_django to your INSTALLED_APPS

INSTALLED_APPS += ('behave_django',)

Create the features directory in your project’s root directory. (Next to


Run python behave

$ python behave
Creating test database for alias 'default'...
Feature: Running tests # features/running-tests.feature:1
  In order to prove that behave-django works
  As the Maintainer
  I want to test running behave against this features directory
  Scenario: The Test                       # features/running-tests.feature:6
    Given this step exists                 # features/steps/ 0.000s
    When I run "python behave"   # features/steps/ 0.000s
    Then I should see the behave tests run # features/steps/ 0.000s

1 features passed, 0 failed, 0 skipped
1 scenarios passed, 0 failed, 0 skipped
3 steps passed, 0 failed, 0 skipped, 0 undefined
Destroying test database for alias 'default'...


Starting with version 0.2.0, you no longer need to insert the environment.before_scenario() and environment.after_scenario() functions in your file. The hooks are now included via monkey patching.


How to Contribute

Please, read the contributing guide.

File Type Py Version Uploaded on Size
behave-django-0.3.0.tar.gz (md5) Source 2015-10-27 5KB