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.
  • Could filter the list of containers to check by a substring in their names.
  • 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

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.6.tar.gz (4.7 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.6-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vedro_logs_checker-0.0.6.tar.gz
  • Upload date:
  • Size: 4.7 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.6.tar.gz
Algorithm Hash digest
SHA256 475e2fd1765c06dbc90aadc4075442544c2506f71916f76b398df328b7357cd4
MD5 8242f9d5e25c264f0217b47fdb884644
BLAKE2b-256 c91fbd79a004799ad56598652d73204e33f980eb288f722f0249aed50d67c7cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vedro_logs_checker-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad120a007f8fad3923852fea998f3c95c4e26117acd58356d2566a272e93e37
MD5 8810fdf4e84ec82367ca98cf6fa29688
BLAKE2b-256 e7cc851a80f3ca6523ff2c2c099dc38e05fc94e9e256668d0c33d4472f242b0e

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