A simple BDD example using Python and Behave.
-
Clone this repository or download the folder:
git clone https://github.com/Pruebas-de-Software/Behave-hello-world.git cd belly-bdd -
(Optional but recommended) Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # Linux/macOS .\venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
Just run:
behaveYou should see output indicating which scenarios passed or failed.
belly-bdd/
├── belly.py
├── requirements.txt
├── features/
│ ├── belly.feature
│ └── steps/
│ └── belly_steps.py
└── README.md
(The same file .feature than Hello World Cucumber)
Happy testing! 💚