--- id: behave-django version: "2.0.0" license: MIT license_treatment: permissive maintenance: active --- # behave-django — Behave BDD integration for Django License: permissive · Maintenance: active · Downloads: 264.1K/mo ## What it is and what it does behave-django bridges Behave, a Gherkin-based behavior-driven development framework, into Django projects. It lets you write acceptance tests in plain-language feature files and execute them against a Django application with full access to the test client, Django's assertion library, and database transaction isolation per scenario. The package handles the plumbing: it configures Behave to run within Django's test environment, manages database state between scenarios, and provides hooks for fixture loading and page object patterns. It's designed for teams that want to write acceptance criteria in Gherkin (readable by non-developers) while leveraging Django's testing infrastructure and optionally automating browser interactions via beautifulsoup4. Use it for: - Write acceptance tests in Gherkin that non-technical stakeholders can read and understand alongside developers. - Test Django views and workflows end-to-end with clean database state between each scenario. - Automate web UI testing using Django's test client or browser automation without leaving the Behave framework. - Validate complex user journeys across multiple Django views in a single feature file. - Integrate BDD testing into CI/CD pipelines using Behave's command-line interface and configuration files. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Integrates Behave BDD testing into Django projects, enabling scenario-driven testing with database isolation, Django's test client, and browser automation support. Yes, if you're running Django 5.2 or 6.0 on Python 3.10+ and want to adopt BDD testing with Gherkin scenarios. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It's well-suited for teams that value readable acceptance criteria and Django's test infrastructure together. ## Install pip install behave-django uv add behave-django poetry add behave-django ## Installing behave-django Before you install: Low friction installation with a wheel distribution. Actively maintained as of 71 days ago with recent commits and a stable codebase. Requires Python 3.10 or later and is tested against Django 5.2 and 6.0. License in practice: MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute behave-django freely provided you include the license notice. Quickstart: pip install behave-django from behave_django import * # In features/steps/steps.py: from behave import given, when, then @given('a Django test environment') def step_impl(context): pass Requires Python 3.10 or later and a Django project (5.2 or 6.0) already set up. Verify before relying: - Whether page object patterns are built-in or require manual implementation. - Specific browser automation libraries supported beyond beautifulsoup4. - Whether fixture loading covers Django fixtures or custom formats. - Performance characteristics when running large scenario suites. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 264.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags behave django bdd testing, django scenario testing, bdd framework django, django acceptance testing, gherkin django tests, django feature testing, behavior driven development django, bdd, django-integration, acceptance-testing [View on SkillFed](https://skillfed.io/packages/behave-django) · [View on PyPI](https://pypi.org/project/behave-django/)