QaaS.Mocker
2.0.0-alpha.4
See the version list below for details.
dotnet add package QaaS.Mocker --version 2.0.0-alpha.4
NuGet\Install-Package QaaS.Mocker -Version 2.0.0-alpha.4
<PackageReference Include="QaaS.Mocker" Version="2.0.0-alpha.4" />
<PackageVersion Include="QaaS.Mocker" Version="2.0.0-alpha.4" />
<PackageReference Include="QaaS.Mocker" />
paket add QaaS.Mocker --version 2.0.0-alpha.4
#r "nuget: QaaS.Mocker, 2.0.0-alpha.4"
#:package QaaS.Mocker@2.0.0-alpha.4
#addin nuget:?package=QaaS.Mocker&version=2.0.0-alpha.4&prerelease
#tool nuget:?package=QaaS.Mocker&version=2.0.0-alpha.4&prerelease
QaaS.Mocker
QaaS.Mocker runs configurable mock servers for QaaS workloads.
Supported protocols:
Http/HttpsGrpc/GrpcsSocket- Optional Redis controller API (ping + runtime commands)
Project Flow
Bootstrap.New(args)parses CLI options intoMockerOptions.MockerLoaderbuildsInternalContextfrom YAML + overwrite files/arguments + env variables.ExecutionBuildervalidates config, loads hooks, builds:- Data sources
- Transaction stubs
- Server implementation (
HttpServer,GrpcServer, orSocketServer) - Optional controller
Execution.Start()runs one mode:Run: starts server (and controller when configured)Lint: validates configuration/build pathTemplate: prints or writes a generated template YAML
- Server state objects route incoming actions/RPCs/messages to transaction stubs and cache input/output for controller consume commands.
Hook loading uses QaaS provider modules (HooksLoaderModule<T>) and resolves hooks from loaded assemblies.
This keeps processor integrations pluggable: you can add processors from YAML or by code configuration as long as
the assembly containing those ITransactionProcessor implementations is available at runtime.
Solution Layout
QaaS.Mocker: CLI, bootstrap, execution orchestrationQaaS.Mocker.Stubs: stub factory + transaction stub executionQaaS.Mocker.Servers: HTTP/gRPC/socket servers and state routingQaaS.Mocker.Controller: Redis control handlersQaaS.Mocker.Example: runnable example configs/processorsQaaS.Mocker.*.Tests: NUnit unit tests
Code Configuration
ExecutionBuilder supports code-first CRUD operations:
- Data sources:
CreateDataSource,ReadDataSource,UpdateDataSource,DeleteDataSource - Stubs:
CreateStub,ReadStub,UpdateStub,DeleteStub - Server/controller:
Read*,Update*,Replace*,DeleteController
TransactionStubBuilder supports configuring processor hook names and configuration objects in code (Configure(object)).
Prerequisites
- .NET SDK
10.0.x - Docker Desktop (optional, for image build/run)
dotnet dev-certs(included with .NET SDK) for local TLS example
Build And Test
dotnet restore QaaS.Mocker.sln
dotnet build QaaS.Mocker.sln -c Release -warnaserror
dotnet test QaaS.Mocker.sln -c Release --no-build
Run Example Without Any Script
No script is required.
- Generate a dev certificate file expected by example YAML:
dotnet dev-certs https -ep QaaS.Mocker.Example/Certificates/devcert.pfx -p qaas-dev-cert
- Trust the certificate (local machine):
dotnet dev-certs https --trust
- Run HTTPS example:
cd QaaS.Mocker.Example
dotnet run --project . -- mocker.qaas.yaml
- Verify endpoint:
curl -k https://localhost:8443/health
Run gRPC Example
cd QaaS.Mocker.Example
dotnet run --project . -- mocker.grpc.qaas.yaml
The gRPC service listens on localhost:50051 with TLS and exposes EchoService/Echo.
Build And Run Docker Image
- Ensure
QaaS.Mocker.Example/Certificates/devcert.pfxexists (see cert generation command above). - Build image:
docker build -t qaas-mocker-example .
- Run image (default entrypoint uses
mocker.qaas.yaml):
docker run --rm -p 8443:8443 qaas-mocker-example
CI / Publish
Workflow: .github/workflows/ci.yml
- Restores, builds with
-warnaserror, and runs tests - Uses workflow concurrency to cancel duplicate branch/PR runs in progress
- On tags: validates SemVer, packs
QaaS.Mocker, pushes NuGet package
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CommandLineParser (>= 2.9.1)
- QaaS.Framework.Executions (>= 1.1.0-alpha.3)
- QaaS.Mocker.Controller (>= 2.0.0-alpha.4)
- QaaS.Mocker.Servers (>= 2.0.0-alpha.4)
- System.IO.Abstractions (>= 22.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.2.0 | 0 | 3/31/2026 |
| 2.1.1 | 108 | 3/28/2026 |
| 2.1.0 | 74 | 3/25/2026 |
| 2.0.6 | 101 | 3/23/2026 |
| 2.0.6-alpha.1 | 37 | 3/22/2026 |
| 2.0.5 | 132 | 3/21/2026 |
| 2.0.5-alpha.4 | 35 | 3/22/2026 |
| 2.0.5-alpha.3 | 38 | 3/21/2026 |
| 2.0.5-alpha.1 | 39 | 3/21/2026 |
| 2.0.4 | 87 | 3/21/2026 |
| 2.0.3 | 82 | 3/17/2026 |
| 2.0.2 | 76 | 3/17/2026 |
| 2.0.1 | 87 | 3/16/2026 |
| 2.0.0 | 84 | 3/16/2026 |
| 2.0.0-alpha.12 | 43 | 3/15/2026 |
| 2.0.0-alpha.11 | 41 | 3/15/2026 |
| 2.0.0-alpha.7 | 47 | 3/11/2026 |
| 2.0.0-alpha.6 | 39 | 3/6/2026 |
| 2.0.0-alpha.5 | 38 | 3/5/2026 |
| 2.0.0-alpha.4 | 38 | 3/5/2026 |