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
            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-0.0.8.tar.gz (5.3 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-0.0.8-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vedro_logs_checker-0.0.8.tar.gz
Algorithm Hash digest
SHA256 2726af5b07cd0ee84029d6daf78e38b764f27486cc478968fb872b1e33a94cbd
MD5 2929aa0fc79e48f896530c9c664c8b2f
BLAKE2b-256 20c74c600f939fe74c38a57afa67b3521bf98f8ed51e49b3c62cda1c48e97b64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vedro_logs_checker-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 884d834fb6d16277dc347529105ae92e717aafa789e2cf63950d788ba1172ff9
MD5 ef8dd2428dfa996872bccb296880e177
BLAKE2b-256 eee11db04acf5e84beb55b76aae8b142deb0b1e5a16ec85995c3236316e9ccc6

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