Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Behave

behave.readthedocs.io

  • Free plan
  • Windows
  • macOS
  • Linux

What Behave is

Behave is a free, open-source behavior-driven development tool for Python projects. Teams write feature files as plain-text UTF-8 descriptions of expected outcomes, then connect Given, When, Then, and Step statements to Python implementations in a steps directory. Scenario outlines repeat a scenario for each row in an examples table, and steps can receive text blocks or tables through the context object. Environment hooks can run before or after steps, scenarios, feature files, tags, or an entire test run. Fixtures support setup and cleanup. Tags select scenarios, while a work-in-progress option runs tagged cases, disables output capture, and stops at the first error. Documentation covers Selenium WebDriver browser use, Django and Flask integration, pip, source-distribution, and GitHub installation. Behave runs locally on Linux, macOS, and Windows.

Who it suits

It suits Python teams using Gherkin-style BDD and collaboration between developers, QA, and business participants. It also fits projects needing browser scenarios through Selenium or web-framework guidance.

Good to know, and what to watch

  • Free and open source
  • Uses readable feature files
  • Supports scenario outlines and tables
  • Provides hooks and fixtures
  • Runs on Linux, macOS, and Windows
  • Focused on Python projects
  • Runs locally
  • Comparison documentation may be outdated

The verdict

Behave connects natural-language scenarios with Python code while providing hooks, fixtures, tags, and repeatable examples. Its integrations and installation options make it suitable for local Python BDD workflows.

What the maker publishes

BDD collaboration
Its documentation describes BDD as encouraging collaboration among developers, QA, and non-technical or business participants. source
Browser tooling
The documentation lists Selenium WebDriver as software that can be combined with Behave to drive a browser. source
Collaboration
Its documentation describes BDD as a way to encourage collaboration among developers, QA, and non-technical or business participants. source
Editor support
The ecosystem page lists IDE and editor plugins with Behave or Gherkin support, including entries for PyCharm and VS Code. source
Extensibility
Optional formatter dependencies can add formatters from behave-contrib to those provided by default. source
Feature files
Feature files are plain-text UTF-8 files that describe features and expected outcomes using representative examples. source
Feature files
Behave uses Gherkin feature files as both human-readable documentation and automated tests. source
Fixtures
Behave fixtures support setup and cleanup tasks during test execution. source
Hooks
Optional environment controls can run code before and after steps, scenarios, features, or the whole test run. source
Install
The installation guide provides pip, source-distribution, and GitHub repository installation methods. source
Installation
The documentation gives pip and source-distribution installation instructions and also describes installing from the GitHub repository. source
Integrations
The documentation includes integration guidance for Django and Flask and examples using Selenium for browser interaction. source
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. source
Optional packages
Optional installation extras include documentation and development dependencies, plus additional formatters from behave-contrib. source
Purpose
Behave is a Python-style behavior-driven development tool that uses natural-language-style tests backed by Python code. source
Purpose
Behave is a Python-style behavior-driven development tool that runs tests written in a natural-language style backed by Python code. source
Python steps
Scenarios are backed by Python step implementations stored in a steps directory. source
Scenario data
Scenario outlines run once for each example row, and steps can receive associated text blocks or tables through the context object. source
Scenario outlines
Scenario outlines use example tables to run a scenario repeatedly with substituted values. source
Security
The Behave GitHub repository has a Security tab, but the opened page did not state specific security or compliance claims. source
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. source
Step implementations
Behave maps Given, When, Then, and Step decorators in Python files to steps written in feature scenarios. source
Support and community
The project documentation directs users to GitHub issues to discuss bugs and features. source
Support and contribution
The project invites bug reports and enhancement contributions through GitHub issues and pull requests. source

Checked against the maker's pages on 9 Oct 2026.