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'...

See the, running-tests.feature and steps/ files in the features folder of the project repository for implementation details of this very example. See the folder also for more useful examples.


The behave docs provide additional helpful information on using behave with Django and various test automation libraries.