Skip to content

Configuration

TestingConfig extends BaseConfig from quadkit.config with environment prefix QK_TESTING__. It controls test environment behavior.

from quadkit.testing.config import TestingConfig
# Defaults
config = TestingConfig()
# From YAML
config = TestingConfig.from_yaml("application.yaml")
KeyTypeDefaultEnv VarDescription
enabledboolTrueQK_TESTING__ENABLEDWhether testing module is enabled
db_reuseboolTrueQK_TESTING__DB_REUSEReuse test databases between tests
mock_external_servicesboolTrueQK_TESTING__MOCK_EXTERNAL_SERVICESMock external service calls
cleanup_temp_filesboolTrueQK_TESTING__CLEANUP_TEMP_FILESClean up temporary files after tests
application.yaml
testing:
enabled: true
db_reuse: true
mock_external_services: false
cleanup_temp_files: false
Terminal window
export QK_TESTING__ENABLED=true
export QK_TESTING__DB_REUSE=false
export QK_TESTING__MOCK_EXTERNAL_SERVICES=false
  • Use mock_external_services: false in integration test environments where real services are available
  • Disable cleanup_temp_files during debugging to inspect generated artifacts
  • Override via environment variables in CI without modifying application.yaml