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.1.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.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for jleechanorg_testing_utils-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b1dc0f83b5e2eae83238f770707d296d88caa15a719972fff2763dc7e65f14a3
MD5 88e3a8bcd60b8dd4f85b5bde1a5bb752
BLAKE2b-256 6881b9a311f192c0e9c3e225188f8f3caf3e4ca0138ba114e34381912c637ef3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jleechanorg_testing_utils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e309e39482a125dce3f1b541e88dc59fe9b2d9ae66ebc45910c029b5416e0860
MD5 06357d0ea314a7fcb203fd9738eb0175
BLAKE2b-256 555b64d787cd8a9fdb9acabdb16a1e4ae245c37dfc79bf94b11cd295e65aa1e2

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