Skip to main content

Bridge package to integrate test results with Maxtest test management system

Project description

Maxtest Bridge - Python

Bridge package to integrate test results with Maxtest test management system.

Installation

pip install maxtest-bridge

Quick Start

CLI Usage

# Set environment variables
export MAXTEST_BASE_URL=https://maxtest.example.com
export MAXTEST_API_KEY=your-api-key

# Upload results
maxtest-upload --results-dir ./allure-results --launch-name "Nightly Run"

Programmatic Usage

from maxtest_bridge import upload_results

result = upload_results(
    results_dir="./allure-results",
    base_url="https://maxtest.example.com",
    api_key="your-api-key",
    launch_name="Regression Tests",
    environment="staging"
)

print(result)

Pytest Plugin

Install the package and enable the plugin:

# Run tests with automatic upload
pytest --maxtest-upload \
       --maxtest-launch-name "CI Pipeline" \
       --maxtest-environment "production"

Or configure in pytest.ini:

[pytest]
addopts = 
    --maxtest-upload
    --maxtest-launch-name "Automated Tests"

Configuration

Configuration can be provided via:

  1. Function arguments (highest priority)
  2. Environment variables
  3. CLI arguments

Environment Variables

Variable Description Required
MAXTEST_BASE_URL Base URL of Maxtest API Yes
MAXTEST_API_KEY API key for authentication Yes
MAXTEST_PROJECT_ID Project identifier No
MAXTEST_LAUNCH_NAME Test launch name No
MAXTEST_ENVIRONMENT Test environment (e.g., staging) No
MAXTEST_FAIL_ON_ERROR Fail pipeline on upload error (default: false) No

CLI Arguments

maxtest-upload \
  --results-dir ./allure-results \
  --base-url https://maxtest.example.com \
  --api-key your-api-key \
  --project-id my-project \
  --launch-name "Nightly Tests" \
  --environment staging \
  --fail-on-error \
  --timeout 60 \
  --verbose

Features

  • Framework Agnostic: Works with any test framework that generates allure-results
  • Cross-Platform: Works on Windows, Linux, and macOS
  • Pytest Integration: Optional plugin for automatic uploads
  • Configurable Error Handling: Choose whether upload failures should break the pipeline
  • Clean Code: Separation of concerns with dedicated modules
  • Type Safe: Full type hints with Pydantic validation

Error Handling

By default, upload failures will NOT break your CI/CD pipeline. This is intentional - your tests should pass/fail based on test results, not reporting issues.

To change this behavior:

# CLI
maxtest-upload --results-dir ./allure-results --fail-on-error

# Programmatic
upload_results(results_dir="./allure-results", fail_on_upload_error=True)

# Environment variable
export MAXTEST_FAIL_ON_ERROR=true

Development

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Run linting
black maxtest_bridge/
flake8 maxtest_bridge/
mypy maxtest_bridge/

License

MIT

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

maxtest_bridge-0.1.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

maxtest_bridge-0.1.1-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file maxtest_bridge-0.1.1.tar.gz.

File metadata

  • Download URL: maxtest_bridge-0.1.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for maxtest_bridge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 62f2ce9ddbf110f5101e18cfd3a01355589f9ed8d454b7e99baa7bf76b57cc22
MD5 f3dd34cf0e9c983a69f62a2512cfa12d
BLAKE2b-256 fc8fb13ff4c9ad5de7d6233f5a0cfd1303290afc84a0166d61132b21d8fde6bd

See more details on using hashes here.

File details

Details for the file maxtest_bridge-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: maxtest_bridge-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for maxtest_bridge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cfa1d9a9985bf17b26bb6e7370de071bc9c5d256dc7d8dc1d7b7c512605d93fb
MD5 519bf8fc34251e7bc88b7cfaddde2ba6
BLAKE2b-256 76439de44c6d2203716ff661d7dcfbaa659a3c1177eb629e25251e419cd524a2

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