Overview
Section titled “Overview”TestingConfig extends BaseConfig from quadkit.config with environment prefix QK_TESTING__. It controls test environment behavior.
from quadkit.testing.config import TestingConfig
# Defaultsconfig = TestingConfig()
# From YAMLconfig = TestingConfig.from_yaml("application.yaml")Options
Section titled “Options”| Key | Type | Default | Env Var | Description |
|---|---|---|---|---|
enabled | bool | True | QK_TESTING__ENABLED | Whether testing module is enabled |
db_reuse | bool | True | QK_TESTING__DB_REUSE | Reuse test databases between tests |
mock_external_services | bool | True | QK_TESTING__MOCK_EXTERNAL_SERVICES | Mock external service calls |
cleanup_temp_files | bool | True | QK_TESTING__CLEANUP_TEMP_FILES | Clean up temporary files after tests |
YAML Example
Section titled “YAML Example”testing: enabled: true db_reuse: true mock_external_services: false cleanup_temp_files: falseEnvironment Variables
Section titled “Environment Variables”export QK_TESTING__ENABLED=trueexport QK_TESTING__DB_REUSE=falseexport QK_TESTING__MOCK_EXTERNAL_SERVICES=falseBest Practices
Section titled “Best Practices”- Use
mock_external_services: falsein integration test environments where real services are available - Disable
cleanup_temp_filesduring debugging to inspect generated artifacts - Override via environment variables in CI without modifying
application.yaml