behave-testinglisted
Install: claude install-skill testland/qa
# behave-testing
## Overview
Per [behave-docs][bd]:
[bd]: https://behave.readthedocs.io/en/latest/
> "**behave is behaviour-driven development, Python style.**" It
> employs "tests written in a natural language style, backed up
> by Python code."
Per [behave-docs][bd]: "Behavior-driven development encourages
collaboration between developers, QA and non-technical or business
participants in a software project."
Per [`cucumber-install`](https://cucumber.io/docs/installation/),
Behave is in the **semi-official** Cucumber tier (uses Cucumber
components but maintained outside the main org).
## When to use
- The codebase is Python and the team uses BDD.
- Acceptance criteria are authored in Gherkin (per
`gherkin-from-stories`).
- pytest with parametrize isn't sufficient - non-engineers read
the tests.
## Step 1 - Install
```bash
pip install behave
```
## Step 2 - Project layout
Behave's conventional layout:
```
project/
├── features/
│ ├── cart.feature # Gherkin features
│ ├── steps/
│ │ ├── cart_steps.py # step implementations
│ │ └── shared_steps.py
│ └── environment.py # setup/teardown hooks
└── ...
```
## Step 3 - Author a Feature
```gherkin
# features/cart.feature
Feature: Apply promo code at checkout
Background:
Given a logged-in user
And the cart contains 1 of "BOOK-001" at $24.99
Scenario: Apply valid promo
When I enter "WELCOME10" in the promo input
And I click "Apply"
Then t