QaaS.Framework.Executions¶
QaaS.Framework.Executions is the shared execution-infrastructure package in the Framework solution. It is not the full application layer for Runner or Mocker. Instead, it provides the common runtime base classes, loader behavior, CLI helpers, and logging setup that those higher-level applications build on.
What this project contains¶
Runtime contracts and base types¶
The minimal execution surface is defined by:
IRunner.cs, which exposesRun()BaseExecution.cs, which holdsContext,ExecutionType,Start(), andDispose()BaseExecutionBuilder.cs, which standardizes how runtime packages build validated execution instancesLogics/ILogic.cs, which currently exposes a singleRun(ExecutionData)method
This package no longer defines mode-specific logic such as ShouldRun(ExecutionType) in ILogic. That older shape is not the current interface.
Loader and logging support¶
The loader and logging layer lives in:
Loaders/BaseLoader.csOptions/LoggerOptions.csExecutionLogging.cs
BaseLoader<TOptions, TRunner> validates the supplied options, configures logging, and leaves concrete runner creation to the derived loader. ExecutionLogging.cs contains the shared default logger setup and the optional Elasticsearch sink integration used by downstream applications.
Shared CLI helpers¶
The CommandLineBuilders folder contains:
ParserBuilder.csHelpTextBuilder.cs
These files centralize the shared command-line parsing rules and help-text formatting used by applications built on this package.
Compatibility surface¶
Constants.cs still exists as an obsolete compatibility wrapper so downstream consumers can migrate without breaking immediately.
Current behavior¶
The current implementation focuses on a narrow but important set of responsibilities:
BaseExecutionBuilder<TContext, TExecutionData>validates the configuredDataSourcesand then leavesBuildDataSources()andBuild()to the concrete application layer.BaseExecutionprovides the common runtime shape that downstream applications extend with their own start and cleanup behavior.BaseLoader<TOptions, TRunner>validates options recursively before runner creation.- The loader can create a console logger or a YAML-configured Serilog pipeline, depending on the provided logging configuration.
ExecutionLogging.cscan enrich logging with an Elasticsearch sink, while also keeping a console-only default logger path available.ParserBuilder.csconfigures case-insensitive parsing behavior for the shared CLI layer.HelpTextBuilder.csinjects the framework's custom usage-line formatting.
Main source areas¶
The most important files in this package are:
BaseExecution.csBaseExecutionBuilder.csIRunner.csLogics/ILogic.csLoaders/BaseLoader.csOptions/LoggerOptions.csExecutionLogging.csCommandLineBuilders/ParserBuilder.csCommandLineBuilders/HelpTextBuilder.csConstants.cs
Companion tests¶
QaaS.Framework.Executions.Tests validates the shared execution layer without relying on the higher-level applications.
The current test suite covers:
- default logger-option values
- recursive option validation and invalid-configuration failures
- YAML logger-configuration-file support
- parser enum case-insensitivity and invalid-verb behavior
- help-text usage output
- elastic-sink warnings for missing, partial, and invalid connection settings
- default logger initialization
- compatibility constants
- the basic
BaseExecutionandBaseExecutionBuildercontract
Representative test files include:
ExecutionsBehaviorTests.csExecutionsCoverageEdgeCaseTests.cs