Freedom251 › BDD Testing Tools
Behave

What Behave is
Behave is a free, open-source Python tool for behavior-driven development. It lets teams describe features and expected outcomes in plain-text UTF-8 files, then connect scenario steps to Python implementations. Given, When, Then, and Step decorators map the written steps to code. Scenario outlines can repeat a scenario for each row in an examples table, and steps can receive text blocks or tables through a context object. Environment hooks can run code around steps, scenarios, feature files, tags, or a full test run; fixtures support setup and cleanup. Tags select scenarios for execution, and a work-in-progress option runs tagged scenarios, turns off output capture, and stops at the first error. Behave runs locally on Linux, macOS, and Windows. Its documentation covers Django and Flask integration and describes pairing it with Selenium WebDriver for browser interaction. Installation guidance covers pip, a source distribution, and the GitHub repository. The project also points users to GitHub issues and pull requests for discussion and contributions.
Who it suits
Behave suits Python development teams that want to express expected behavior in Gherkin-style feature files and connect it to code. Its documentation frames BDD as a way for developers, QA, and business or non-technical participants to collaborate.
What it does well
- Free and open source
- Scenario outlines use example-table rows
- Hooks and fixtures support test setup and cleanup
- Tags can select scenarios
- Works with Selenium WebDriver
What to know first
- The comparison page may be out of date
- Python step implementations are required
- Runs locally
Limits
Behave runs locally and relies on Python step implementations. Extra formatters, documentation, and development dependencies are optional installations rather than part of the core package.
Getting started
- Install Behave with pip
- Install from the source distribution or GitHub repository instead
- Create UTF-8 feature files with scenarios and examples
- Add Python step implementations in a steps directory
- Use hooks or fixtures for setup and cleanup
- Add optional documentation, development, or formatter packages if needed
Verdict
Behave links readable feature scenarios with Python code and provides hooks, fixtures, and selection controls for test runs. Its documentation cautions that its comparison page may be out of date.
Questions
Is Behave free?
Yes. Behave is free and open source.
Which operating systems does Behave support?
Behave supports Linux, macOS, and Windows.
How can Behave be installed?
The documentation provides pip, source-distribution, and GitHub repository installation methods.
Does Behave support browser testing?
Yes. Behave can be combined with Selenium WebDriver to drive a browser.
Can Behave integrate with web frameworks?
Its documentation describes Django integration options and links to Flask integration guidance.
Where can users discuss bugs or contribute?
The project directs users to GitHub issues for bugs and feature discussions, and accepts enhancement contributions through pull requests.
Facts from Behave's own pages
- BDD collaboration
- Its documentation describes BDD as encouraging collaboration among developers, QA, and non-technical or business participants. · behave.readthedocs.io, 9 Oct 2026
- Browser tooling
- The documentation lists Selenium WebDriver as software that can be combined with Behave to drive a browser. · behave.readthedocs.io, 4 Oct 2026
- Collaboration
- Its documentation describes BDD as a way to encourage collaboration among developers, QA, and non-technical or business participants. · behave.readthedocs.io, 4 Oct 2026
- Editor support
- The ecosystem page lists IDE and editor plugins with Behave or Gherkin support, including entries for PyCharm and VS Code. · behave.readthedocs.io, 9 Oct 2026
- Extensibility
- Optional formatter dependencies can add formatters from behave-contrib to those provided by default. · behave.readthedocs.io, 9 Oct 2026
- Feature files
- Behave uses Gherkin feature files as both human-readable documentation and automated tests. · behave.readthedocs.io, 9 Oct 2026
- Fixtures
- Behave fixtures support setup and cleanup tasks during test execution. · behave.readthedocs.io, 4 Oct 2026
- Hooks
- Optional environment controls can run code before and after steps, scenarios, features, or the whole test run. · behave.readthedocs.io, 9 Oct 2026
- Install
- The installation guide provides pip, source-distribution, and GitHub repository installation methods. · behave.readthedocs.io, 9 Oct 2026
- Installation
- The documentation gives pip and source-distribution installation instructions and also describes installing from the GitHub repository. · behave.readthedocs.io, 4 Oct 2026
- Integrations
- The documentation includes integration guidance for Django and Flask and examples using Selenium for browser interaction. · behave.readthedocs.io, 9 Oct 2026
- Limits
- The documentation says Behave is one of several options for Gherkin-based BDD in Python and warns that its comparison page may be out of date. · behave.readthedocs.io, 9 Oct 2026
- Optional packages
- Optional installation extras include documentation and development dependencies, plus additional formatters from behave-contrib. · behave.readthedocs.io, 4 Oct 2026
- Purpose
- Behave is a Python-style behavior-driven development tool that runs tests written in a natural-language style backed by Python code. · behave.readthedocs.io, 9 Oct 2026
- Python steps
- Scenarios are backed by Python step implementations stored in a steps directory. · behave.readthedocs.io, 9 Oct 2026
- Scenario data
- Scenario outlines run once for each example row, and steps can receive associated text blocks or tables through the context object. · behave.readthedocs.io, 4 Oct 2026
- Scenario outlines
- Scenario outlines use example tables to run a scenario repeatedly with substituted values. · behave.readthedocs.io, 9 Oct 2026
- Security
- The Behave GitHub repository has a Security tab, but the opened page did not state specific security or compliance claims. · github.com, 4 Oct 2026
- Selection and debugging
- Tags can selectively run scenarios, and a work-in-progress option runs tagged scenarios, disables output capture, and stops at the first error. · behave.readthedocs.io, 4 Oct 2026
- Step implementations
- Behave maps Given, When, Then, and Step decorators in Python files to steps written in feature scenarios. · behave.readthedocs.io, 4 Oct 2026
- Support and community
- The project documentation directs users to GitHub issues to discuss bugs and features. · behave.readthedocs.io, 4 Oct 2026
- Support and contribution
- The project invites bug reports and enhancement contributions through GitHub issues and pull requests. · behave.readthedocs.io, 9 Oct 2026
- Tags
- Tags can select which features or scenarios to include in a test run, and tag information is accessible to the backing Python code. · behave.readthedocs.io, 9 Oct 2026
- Test controls
- Environment hooks can run before and after steps, scenarios, feature files, tags, or the whole test run. · behave.readthedocs.io, 4 Oct 2026
Where Behave stands on Freedom251
- BDD Testing Tools#10 of 30