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)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_b_logger-1.2.3.tar.gz | 55.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|