--- id: behave version: "1.3.3" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # behave — behave is behaviour-driven development, Python style License: permissive · Maintenance: active · Downloads: 6.0M/mo ## What it is and what it does behave is a Python implementation of behavior-driven development that bridges the gap between business requirements and test automation. It uses Gherkin—a plain-English syntax for writing test scenarios—paired with Python step implementations to create executable specifications that both technical and non-technical stakeholders can understand and collaborate on. The framework reads .feature files containing human-readable scenarios (Given-When-Then format), maps each step to Python functions you write, and executes them as tests. It's designed for acceptance testing and cross-team communication rather than unit testing, making it useful when you need to document and validate business behavior in a format that bridges development and QA. Use it for: - Write acceptance tests in plain English that product managers and QA can read and verify without reading Python code. - Document system behavior as executable specifications that stay in sync with actual functionality. - Automate end-to-end workflows where each step represents a user action or system state change. - Enable non-technical stakeholders to contribute test scenarios by writing Gherkin without touching Python. - Build a shared test suite that developers, QA, and business analysts can collaborate on and maintain together. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. behave is a behavior-driven development (BDD) framework that lets you write test scenarios in plain Gherkin language, backed by Python step implementations, to enable collaboration between developers, QA, and business stakeholders. Yes. behave is actively maintained, has no known vulnerabilities, carries permissive licensing, and low install friction. It's a mature choice (Production/Stable status since 2011) for teams that want BDD-style acceptance testing with readable, collaborative test scenarios. Install it if your workflow involves non-technical stakeholders in test design or if you want executable specifications written in natural language. ## Install pip install behave uv add behave poetry add behave ## Installing behave Before you install: Low install friction with a pure-Python wheel distribution. The package is actively maintained with recent commits and carries 15 runtime dependencies including parsing libraries (parse, parse-type, cucumber-expressions) and compatibility shims (six, pathlib2, enum34) to support older Python versions. License in practice: Licensed under BSD-2-Clause (permissive), which allows free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install behave # Create features/example.feature with Gherkin scenarios # Create features/steps/example_steps.py with step implementations from behave import given, when, then @given('a precondition') def step_impl(context): pass # Run: behave Requires a features/ directory structure with .feature files (Gherkin syntax) and a steps/ subdirectory containing Python step definitions to function. Verify before relying: - Whether the 15 runtime dependencies (including older Python compatibility shims like enum34, pathlib2) are all actively maintained or if some are legacy holdovers. - Performance characteristics or scalability limits when running large numbers of scenarios or steps. ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 6.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags BDD testing framework, Gherkin test scenarios, behavior-driven development Python, cucumber-like testing, natural language test automation, acceptance testing framework, feature file testing, bdd, acceptance-testing, gherkin [View on SkillFed](https://skillfed.io/packages/behave) · [View on PyPI](https://pypi.org/project/behave/)