Skip to main content

Shared testing utilities: centralized test config, server management, and test environment setup

Project description

jleechanorg-testing-utils

Shared testing utilities: centralized test configuration, test server management, and test environment setup for browser and HTTP tests.

Install

pip install jleechanorg-testing-utils

Usage

from testing_util import (
    TestConfig,
    TestType,
    TestMode,
    get_browser_base_url,
    get_http_base_url,
    setup_test_environment,
    TestServerManager,
    start_test_server,
    stop_test_server,
    test_server,
)

# Configuration
url = get_browser_base_url()  # http://localhost:8081
config = TestConfig.get_server_config(TestType.BROWSER)

# Server management
with test_server(TestType.HTTP) as port:
    # run tests against server on port
    pass

API

  • TestConfig – Centralized test server configuration (ports, URLs)
  • TestType – BROWSER | HTTP | INTEGRATION | DEVELOPMENT
  • TestMode – MOCK | REAL | INTEGRATION
  • TestServerManager – Manages Flask test server lifecycle
  • test_server – Context manager for temporary test server
  • setup_test_environment – Initialize test environment variables

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

jleechanorg_testing_utils-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

jleechanorg_testing_utils-0.1.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file jleechanorg_testing_utils-0.1.0.tar.gz.

File metadata

File hashes

Hashes for jleechanorg_testing_utils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 30a869be289e9a4cc0c844e55d03e7f323aaf9f42bbc83c0d313f8951adaa593
MD5 37efcdfca1e6801bb29720d252b3b3ee
BLAKE2b-256 ed6999ce6a67e88fb273476e2f0f42855027fe1d62ad9694f8200f72626f424f

See more details on using hashes here.

File details

Details for the file jleechanorg_testing_utils-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jleechanorg_testing_utils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 957286a494a2fcd9428332116256cd2b6b87693eaf07725057d0502a80b5ed2e
MD5 b1ac713a09a03b81dd196beffaac5108
BLAKE2b-256 8dc760f06a7e72673862ca75b5a61ec254d26039f2a30266e908149d2572e7f2

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