A modern, real-time console report formatter for Behave.
Project description
Behave Modern Console Report
A modern console report formatter for Behave that provides rich terminal output with colors, progress indicators, execution summaries, timings, and failure diagnostics.
Inspired by modern developer tools such as Playwright CLI, pytest, and Cargo.
Table of Contents
- Features
- Formatters
- Installation
- Quick start
- Configuration
- Example output
- CI/CD
- Architecture
- Documentation
- Development
- Changelog
- License
Features
- Six formatters:
modern,modern-live,progress,log,ci, andminimal— each designed for a different use case. - Real-time output: Live scenario status updates as tests execute.
- Progress bar: Completion percentage and scenario count during execution.
- Colored status icons: Unicode icons (✓ ✗ ⏭ ? P) with color-coded results via Rich.
- Failure diagnostics: Scenario name, error type, short message, and optional traceback.
- Per-formatter configuration:
mcr.<formatter>.<key>with globalmcr.<key>fallback. - CI-friendly: The
ciformatter produces compact, log-friendly output with colored status tags. - Lightweight: Only
richandcoloramaas dependencies. - Cross-platform: Works on Windows, macOS, and Linux.
Formatters
| Formatter | Description | Best for |
|---|---|---|
modern |
Playwright-like report with feature grouping, scenario/step lines, and end-of-run summary. | Local development. |
modern-live |
Live-updating version of modern using Rich Live for real-time status colors. |
Interactive terminals. |
progress |
Single-line live progress bar that updates in place. | Quick runs, overview. |
log |
Timestamped log output for every completed scenario and step. | CI logs, debugging. |
ci |
CI-friendly output with colored status tags and end-of-run failure summary. | CI/CD pipelines. |
minimal |
Plain text output with only scenario names and a final summary. | Minimal noise, piping. |
Formatter examples
modern — grouped by feature with steps:
Feature: Authentication
✓ Login (602ms)
✓ Given I am on the login page
✓ When I enter valid credentials
✓ Then I should be logged in
✗ Locked account shows error (604ms)
✓ Given I am on the login page
✗ When I enter credentials for a locked account
✗ Then I should see an error message
RESULTS
Passed 18
Failed 1
Skipped 1
⏱ Duration 9.1s
progress — single-line live update:
████████████████████ 100% 20/20 - done
log — timestamped lines:
2026-06-30 12:00:01 [PASS] Login (602ms)
2026-06-30 12:00:02 [FAIL] Locked account shows error (604ms)
2026-06-30 12:00:02 [SKIP] Login with social provider (0ms)
ci — colored status tags:
PASS Login (602ms)
FAIL Locked account shows error (604ms)
SKIP Login with social provider (0ms)
████████████████████ 100% 20/20
RESULTS
Passed 18
Failed 1
Skipped 1
Duration 9.1s
minimal — plain text only:
Login
Locked account shows error
Login with social provider
Passed: 18 Failed: 1 Skipped: 1 Duration: 9.1s
Installation
Install from PyPI:
pip install behave-modern-console-report
Or install from source:
git clone https://github.com/MathiasPaulenko/behave-modern-console-report.git
cd behave-modern-console-report
pip install -e .
For development:
pip install -e ".[dev]"
Quick start
- Create or update
behave.iniin your Behave project root:
[behave]
default_format=modern
[behave.formatters]
modern = behave_modern_console_report.formatters.modern:ModernFormatter
modern-live = behave_modern_console_report.formatters.modern_live:ModernLiveFormatter
progress = behave_modern_console_report.formatters.progress:ProgressFormatter
log = behave_modern_console_report.formatters.log:LogFormatter
ci = behave_modern_console_report.formatters.ci:CIFormatter
minimal = behave_modern_console_report.formatters.minimal:MinimalFormatter
- Run Behave:
behave
You can also select a formatter from the command line:
behave --format=modern-live
Or use the full module path without registering:
behave -f behave_modern_console_report.formatters.modern:ModernFormatter
Configuration
All options are passed through Behave's userdata mechanism. Add a [behave.userdata] section to behave.ini:
[behave.userdata]
mcr.colors = true
mcr.show_steps = true
mcr.show_traceback = true
Each formatter reads its own mcr.<formatter>.<key> namespace with fallback to global mcr.<key> keys. The show_progress option is formatter-specific (no global fallback).
| Option | Default | Description |
|---|---|---|
mcr.colors |
true |
Enable/disable colored output. |
mcr.show_steps |
true |
Show step-level details. |
mcr.show_traceback |
true |
Show tracebacks for failed steps. |
mcr.<formatter>.show_progress |
true |
Show progress bar (formatter-specific, no global fallback). |
Override from the command line:
behave --format=modern -D mcr.colors=false -D mcr.show_steps=false
See docs/configuration.md for the full reference.
Example output
🚀 Behave Modern Console Report
Feature: Authentication
✓ Login (602ms)
✗ Locked account shows error (604ms)
⏭ Login with social provider (0ms)
RESULTS
Passed 18
Failed 1
Skipped 1
⏱ Duration 9.1s
CI/CD
The ci formatter is designed for CI pipelines — compact, colored status tags, and a final failure summary.
behave --format=ci -D mcr.colors=false
GitHub Actions
name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -e ".[dev]"
- run: behave --format=ci -D mcr.colors=false
Combining with the Markdown report
Show console output and generate a Markdown report at the same time:
behave -f ci -o /dev/null -f behave_modern_md_report.formatter:BehaveMarkdownFormatter -o report.md
See docs/ci-cd.md for GitLab CI, Azure DevOps, and Jenkins examples.
Architecture
Behave → BaseFormatter → Collector → Models → Render → Console
| Layer | File | Responsibility |
|---|---|---|
| BaseFormatter | base.py |
Receives Behave events and forwards them to the Collector. |
| Collector | collector.py |
Builds the Execution model from Behave objects. |
| Models | models.py |
Pure dataclasses for Execution, Feature, Scenario, Step, and Error. |
| Render | render.py |
Converts the model into Rich Text objects for terminal output. |
| Formatters | formatters/ |
Each formatter renders the model differently. |
| Config | config.py |
Resolves per-formatter and global settings from Behave user data. |
See docs/architecture.md for details.
Documentation
- docs/configuration.md — all
mcr.*options and per-formatter overrides. - docs/usage.md — usage examples and combining formatters.
- docs/ci-cd.md — GitHub Actions, GitLab CI, Azure DevOps, and Jenkins examples.
- docs/architecture.md — layered architecture and data flow.
- docs/contributing.md — development setup, code style, and submitting changes.
Development
pytest
ruff check .
mypy behave_modern_console_report
Changelog
See CHANGELOG.md.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file behave_modern_console_report-1.0.1.tar.gz.
File metadata
- Download URL: behave_modern_console_report-1.0.1.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af14b903f5f65584b6dadec30cf3c53160175f0b471987a136c0795f65d4165d
|
|
| MD5 |
c0ed536096cef10df92b443480af9dde
|
|
| BLAKE2b-256 |
56758bf02c44097acebb269a4bca330994c3025d4e21889dd580eb2bf8b8cfe0
|
Provenance
The following attestation bundles were made for behave_modern_console_report-1.0.1.tar.gz:
Publisher:
release.yml on MathiasPaulenko/behave-modern-console-report
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
behave_modern_console_report-1.0.1.tar.gz -
Subject digest:
af14b903f5f65584b6dadec30cf3c53160175f0b471987a136c0795f65d4165d - Sigstore transparency entry: 2032810976
- Sigstore integration time:
-
Permalink:
MathiasPaulenko/behave-modern-console-report@51983b5dc283ddc3f0ade8a86e661e2880bdad05 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MathiasPaulenko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@51983b5dc283ddc3f0ade8a86e661e2880bdad05 -
Trigger Event:
push
-
Statement type:
File details
Details for the file behave_modern_console_report-1.0.1-py3-none-any.whl.
File metadata
- Download URL: behave_modern_console_report-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
add400d8749c5b366ccbfdc0e1ba25e841184c2e4c4867effba0be0e71dc0c63
|
|
| MD5 |
c48a0206b79b518b83697a0abf7df9b2
|
|
| BLAKE2b-256 |
b7fe3797be8aff09b7589bb4f01f90aa0506d5f0796761be611ea0c09828e95d
|
Provenance
The following attestation bundles were made for behave_modern_console_report-1.0.1-py3-none-any.whl:
Publisher:
release.yml on MathiasPaulenko/behave-modern-console-report
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
behave_modern_console_report-1.0.1-py3-none-any.whl -
Subject digest:
add400d8749c5b366ccbfdc0e1ba25e841184c2e4c4867effba0be0e71dc0c63 - Sigstore transparency entry: 2032811333
- Sigstore integration time:
-
Permalink:
MathiasPaulenko/behave-modern-console-report@51983b5dc283ddc3f0ade8a86e661e2880bdad05 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MathiasPaulenko
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@51983b5dc283ddc3f0ade8a86e661e2880bdad05 -
Trigger Event:
push
-
Statement type: