Skip to main content

A modern, real-time console report formatter for Behave.

Project description

Behave Modern Console Report

PyPI Python CI License

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

Formatters

Formatter Description
modern Playwright-like report with feature grouping, scenario/step lines, and end-of-run summary.
modern-live Live-updating version of modern using Rich Live for real-time status colors.
progress Single-line live progress bar that updates in place.
log Timestamped log output for every completed scenario and step.
ci CI-friendly output with colored status tags and end-of-run failure summary.
minimal Plain text output with only scenario names and a final summary.

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

  1. Create or update behave.ini in your Behave project root:
[behave]
default_format=modern

[behave.formatters]
modern = behave_modern_console_report.formatters.modern:ModernFormatter
  1. 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

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

Development

pytest
ruff check .
mypy behave_modern_console_report

Changelog

See CHANGELOG.md.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

behave_modern_console_report-1.0.0.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

behave_modern_console_report-1.0.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file behave_modern_console_report-1.0.0.tar.gz.

File metadata

File hashes

Hashes for behave_modern_console_report-1.0.0.tar.gz
Algorithm Hash digest
SHA256 85ec4da5c6de790b5e4127c2cf515562ce4324ada54c67524b4e3e6d0c954d8d
MD5 1aae5a9d6f60edc048a2d7004d3f997a
BLAKE2b-256 612d2babd9f22479755f533fb7b17864806a4a0feee525bb6c25c3e63470a4d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for behave_modern_console_report-1.0.0.tar.gz:

Publisher: release.yml on MathiasPaulenko/behave-modern-console-report

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file behave_modern_console_report-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for behave_modern_console_report-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a01c1b0cd0ca6f2a5ff20697c0d90e2ec3152c1977a5f7fe0932d7571d091dd
MD5 4153ab4f216fbfd37e440c5aaedaaf30
BLAKE2b-256 b686c4870461ae3fc1d7634bcbaf5d622d6deedce29be7504f82b03abfb90fa9

See more details on using hashes here.

Provenance

The following attestation bundles were made for behave_modern_console_report-1.0.0-py3-none-any.whl:

Publisher: release.yml on MathiasPaulenko/behave-modern-console-report

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page