Skip to main content

BLogger — Pytest Logging Plugin

Full README.md available at GitHub


Overview

BLogger is a Pytest plugin for enhanced test logging and generating convenient and lightweight reports.
It supports structured test steps, descriptions, info notes, known bugs, and automatic screenshots.
Works seamlessly with Selenium WebDriver and Playwright Page instances.
Integrates with Allure and Qase for fewer duplicates like .steps, .attach etc.

Report Examples

Sample HTML reports and screenshots are available in the GitHub repository.


Installation

pip install pytest-b-logger

Setup

!!! Add blog.config.yaml file to the root of your project. !!!

project_name

Bare minimum for everything to work is project_name:

project_name: 'Project Name'

Can be changed later via CLI when running tests

pytest --blog-project-name '...'

timezone

Then you can set the desired Time Zone (IANA format e.g. Europe/Moscow, UTC, America/New_York).
The list of available timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

project_name: 'Project Name'

tz: 'Europe/Moscow'

integrations

By default, integrations are turned off.
If you are using Allure and want steps, info, description etc. to be duplicated to Allure, simply add integrations block and set allure: True

project_name: 'Project Name'

tz: 'Europe/Moscow'

integrations:
  allure: True

hide_passwords

By default, passwords inside parameters are hidden.

If you want passwords to be shown simply set hide_passwords: False

project_name: 'Project Name'

tz: 'Europe/Moscow'

integrations:
  allure: True

hide_passwords: False

env and base_url

You can add env and base url here.

project_name: 'Project Name'

tz: 'Europe/Moscow'

integrations:
  allure: True

hide_passwords: True

env: 'prod' # optional
base_url: 'https://base-url.com' # optional

Which, could also be passed as command line options on test run, e.g. when using CI/CD:

pytest --blog-env 'prod' --blog-base-url 'https://base-url.com'

!!! Note !!! Options apply in the following order: blog.config.yaml > blog methods inside code > Command Line Arguments

Now you are all set up.
Simply run pytest and b_logs folder will be generated with blog_report.html and blog_summary.html
For more advanced usage please review BLogger API

BLogger API

Please see API Reference at GitHub

Metadata

Release files for pytest-b-logger 1.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-b-logger 1.2.3
File Size Uploaded
pytest_b_logger-1.2.3.tar.gz 55.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-b-logger 1.2.3
File Interpreter ABI Platform
pytest_b_logger-1.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 114.2 kB

Release files / pytest_b_logger-1.2.3.tar.gz

Download URL pytest_b_logger-1.2.3.tar.gz
Size 55.5 kB
Tags Source
SHA-256 checksum
How to use checksums
74f33cbb4ffcb483d816e85e1d3000473801645854a261c72668bbc464636aca
BLAKE2b-256 checksum
How to use checksums
5b6caa7e46bfd452eb069e46ef67d9a5d5fec8e5c500c17bba77d136d3aa4465
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / pytest_b_logger-1.2.3-py3-none-any.whl

Download URL pytest_b_logger-1.2.3-py3-none-any.whl
Size 58.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c5b807c4f59a3f345227c34d2295f52f53822df5d005417f2fd7f00019f92a7
BLAKE2b-256 checksum
How to use checksums
e97753cbb611029084010d7451026d9963b293033475669591bfab86d6725f2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page