Skip to main content

vedro-logs-checker for the vedro.io framework

Project description

vedro-logs-checker

A plugin for the vedro.io testing framework that inspects Docker container logs during test execution and searches for messages based on specified substrings.

This plugin helps ensure that there are no errors or other message types in running containers during test execution.

Installation:

pip install vedro-logs-checker

Features:

  • Monitors logs of Docker containers during test execution.
  • Detects specific messages by substrings in logs.
  • Skips specific test scenarios based on prefixes in the 'subject' attribute and/or by @skip_logs_check decorator.
  • Could filter the list of containers to check by regex.
  • Marks tests as FAILED (optional) when errors are found in logs.

Configuration (vedro.cfg.py)

The plugin reads its settings from vedro.cfg.py.

Example configuration:

import vedro
from vedro_logs_checker import vedro_logs_checker

class Config(vedro.Config):
    class Plugins:
        class VedroLogsChecker(vedro_logs_checker.VedroLogsChecker):
            enabled = True
            show_found_logs_in_cli = True # If True, the found logs will be displayed among the steps of the failed test
            search_for = ["ERROR", "CRITICAL"]  # Substrings to check in logs
            ignore_prefixes = ["try to", "experimental"]  # Scenarios with these prefixes will be ignored
            fail_when_found = True  # If True, test is marked as FAILED when substrings are found
            project_name = "my_project"  # Only check containers with this substring in the name. To check all running containers just don't specify the value
            regex_container_names_to_check = [r"^grpc", "api", r"^e2e"] # Optional way to filter containers by regex. To check all containers with "project_name" in the container name just don't specify the value
            regex_container_names_to_ignore: = []  # Optional way to ignore containers by regex.
            silent: bool = False  # Hide config message on startup

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

vedro_logs_checker-1.0.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

vedro_logs_checker-1.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file vedro_logs_checker-1.0.1.tar.gz.

File metadata

  • Download URL: vedro_logs_checker-1.0.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for vedro_logs_checker-1.0.1.tar.gz
Algorithm Hash digest
SHA256 af0546d095adad5762996e5e431b25199917f0b82063b0bb64aa0980baab5f67
MD5 87cdbf288d4d4ba744ce72850fec7f30
BLAKE2b-256 1f44679befc828df43291f4e49fa32fa0951ea9ac227aba932e0c535c21ebd87

See more details on using hashes here.

File details

Details for the file vedro_logs_checker-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for vedro_logs_checker-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6bb40a202ffe293d8858632c5531e63fd3d1c38cfc1d3be7823b16b00706b69
MD5 4640d2ca7ccd8206592e6c220f43da93
BLAKE2b-256 374ec9f36441a9bcdec52eb7ae7ff654443bbca47f07007c214deedf0fc8159a

See more details on using hashes here.

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